# 上週重要回顧 ## ansible 執行原理 ### 基本元件:**Control node、Managed node** ##### Control Node - 適用環境Linux、MAC <font color=LightCoral>(Windows不支援當Control node!!!)</font> - Requirement: Python 2.x, Python 3.x, SSH ##### Managed Node - Requirement: Python 2.x, Python 3.x, SSH --- ## 事前準備 ### 重要檔案 ### 1. inventory - 設定欲連線機器資訊 - 若有多台機器可組成群組, e.g., [es] - node name可以取個有意義的名字 ``` [es] es1 ansible_host=ip ansible_user=登入名字 ansible_password=密碼 ansible_become_password=要切root的密碼 es2 ansible_host=ip ansible_user=登入名字 ansible_password=密碼 ansible_become_password=要切root的密碼 [kibana] kibana3 ansible_host=ip ansible_user=登入名字 ansible_password=密碼 ansible_become_password=要切root的密碼 ``` ### 2. playbook.yml --- ## 執行指令 ``` $ ansible-playbook -k -i hosts playbook.yml ```
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up