$ brew install ansible
$ vi ~/hosts
[do]
134.122.x.x
138.197.x.x
142.93.x.x
157.230.x.x
161.35.x.x
167.71.x.x
178.128.x.x
[app]
116.202.x.x
$ ansible all --inventory-file=~/hosts -u root -m ping
$ ansible all --inventory-file=~/hosts -u root -a 'uptime'
first_playbook.yml dosyasi
- name: Run serp script
hosts: do
tasks:
- name: running bash script
command: zsh a.sh 10 200 200
$ ansible-playbook --inventory-file=~/hosts -u root first_playbook.yml
$ export ANSIBLE_HOST_KEY_CHECKING=False
$ export ANSIBLE_HOSTS=~/hosts