- sudo apt güncelleme -y && sudo apt yükseltme -y
- sudo apt install ansible sshpass -y
- sudo nano /etc/ansible/hosts
[servers]
server1 ansible_host=192.168.56.103
server2 ansible_host=192.168.56.105
[all:vars]
ansible_python_interpreter=/usr/bin/python3
- ansible-envanter --list -y
- sudo nano /etc/ansible/ansible.cfg
[defaults]
host_key_checking = False
ansible_user = sysadmin
ask_pass = True
ask_become_pass = True
- Ping Test:
ansible all -m ping -u sysadmin --ask-pass
- Run Command Playbooks:
ansible-playbook -i /etc/ansible/hosts ymlname.yml --ask-pass --ask-become-pass
- Playbook Repo: https://github.com/buusratekiin/ansible_playbook
Top comments (0)