antony@notes:~/suse$ cat "SUSE-Manager-將檔案部署到所有-Client-上.md"
SUSE Manager 將檔案部署到所有 Client 上
SUSE Manager 將檔案部署到所有 Client 上
Step1: 建立 Config Channel
點選左側選單: Configuration -> Channels -> Create Config Channel

依序輸入個欄位的值 :
- Name:
test - Label:
test - Description:
test
確認都沒問題後點選 Create Config Channel 按鈕

- Name:
Step2: 將檔案上傳至 SUSE Manager
點選 Upload Configuration Files

點選 “選擇檔案” 按鈕

選擇要上傳的檔案

設定在 Client 主機的作業系統中,檔案要放哪個目錄和檔名 Filename/Path:
/root/bin/test.sh
調整檔案權限: File Permissions Mode:
655
點選 Upload Configuration File 按鈕

上傳成功畫面如下

Step3: 將各系統加入 System Set Manager (SSM)
- 點選左側選單 Systems -> System List -> All -> 點選 OS 的 Hostname

- 點選右上角的按鈕 Add to SSM

- 重複以上動作,將要派發檔案的主機都加入 SSM
Step4: 設定有加入 SSM 的主機都訂閱 Configuration Channels
- 左側選單 Systems -> System Set Manager -> Configuration -> Subscribe to Channels -> 勾選
testConfiguration Channel -> Continue
- 設定 Channel 的優先順序,由於只有一個 Channel,所以直接點選右下角 Apply Subscriptions

- 確認每一台 Client 主機訂閱 Configuration Channels 的資訊,沒問題就按右下角按鈕 Confirm

Step5: 將檔案部署至各台 Client 主機上
- 點選上方 Deploy Files 按鈕 -> 勾選要部署的檔案 -> 點選右下角 Schedule File Deploy 按鈕

- 選擇要部署的時間,預設是馬上部署,點選 Confirm File Deploy 按鈕

- 部署的動作開始執行的話會看到上方出現藍底黑字

Step6: 確認檔案是否已在各 Client 主機部署成功
- 點選左側選單: Salt -> Remote Commands -> 輸入要執行的命令 :
ls -l /root/bin/test.sh-> 輸入*代表所有主機 -> 點選 Find targets 按鈕
- 點選 Run Command 按鈕

- 點選各主機的方塊,展開命令執行的結果

- 檔案成功部署畫面:
