Skip to content

antony@notes:~/suse$ cat "SUSE-Manager-將檔案部署到所有-Client-上.md"

SUSE Manager 將檔案部署到所有 Client 上

2025-05-23· suse

SUSE Manager 將檔案部署到所有 Client 上

Step1: 建立 Config Channel

  1. 點選左側選單: Configuration -> Channels -> Create Config Channel image

  2. 依序輸入個欄位的值 :

    • Name: test
    • Label: test
    • Description: test

    確認都沒問題後點選 Create Config Channel 按鈕 image

Step2: 將檔案上傳至 SUSE Manager

  1. 點選 Upload Configuration Files image

  2. 點選 “選擇檔案” 按鈕 image

  3. 選擇要上傳的檔案 image

  4. 設定在 Client 主機的作業系統中,檔案要放哪個目錄和檔名 Filename/Path: /root/bin/test.sh image

  5. 調整檔案權限: File Permissions Mode: 655 image

  6. 點選 Upload Configuration File 按鈕 image

  7. 上傳成功畫面如下 image

Step3: 將各系統加入 System Set Manager (SSM)

  1. 點選左側選單 Systems -> System List -> All -> 點選 OS 的 Hostname image
  2. 點選右上角的按鈕 Add to SSM image
  3. 重複以上動作,將要派發檔案的主機都加入 SSM

Step4: 設定有加入 SSM 的主機都訂閱 Configuration Channels

  1. 左側選單 Systems -> System Set Manager -> Configuration -> Subscribe to Channels -> 勾選 test Configuration Channel -> Continue image
  2. 設定 Channel 的優先順序,由於只有一個 Channel,所以直接點選右下角 Apply Subscriptions image
  3. 確認每一台 Client 主機訂閱 Configuration Channels 的資訊,沒問題就按右下角按鈕 Confirm image

Step5: 將檔案部署至各台 Client 主機上

  1. 點選上方 Deploy Files 按鈕 -> 勾選要部署的檔案 -> 點選右下角 Schedule File Deploy 按鈕 image
  2. 選擇要部署的時間,預設是馬上部署,點選 Confirm File Deploy 按鈕 image
  3. 部署的動作開始執行的話會看到上方出現藍底黑字 image

Step6: 確認檔案是否已在各 Client 主機部署成功

  1. 點選左側選單: Salt -> Remote Commands -> 輸入要執行的命令 : ls -l /root/bin/test.sh -> 輸入 * 代表所有主機 -> 點選 Find targets 按鈕 image
  2. 點選 Run Command 按鈕 image
  3. 點選各主機的方塊,展開命令執行的結果 image
  4. 檔案成功部署畫面: image