Link to this headingAnsible

Link to this headingConfigurations

Use Password (ansible.cfg):

#Enable Password auth hsot_key_checking = False

Link to this headingHosts File

Host Configurations:

[linux] 10.10.1.12 10.10.1.13 [linux:vars] ansible_user=root ansible_password=root

Link to this headingModules

Run a Module:

ansible linux -m ping ansible linux -m reboot

Run a Command:

ansible linux -a "cat /etc/hosts"

Run a Module:

ansible linux -m comunity.general.shutdown -b

Link to this headingPlaybook

Example playbook:

--- - name: test hosts: linux tasks: - name: Ensure nvim installed yum: name: neovim state: latest

Run Playbook:

ansible neovim.yml