Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /etc/ansible/ansible.cfg
- [defaults]
- inventory = /etc/ansible/hosts
- #library = /usr/share/my_modules/
- remote_tmp = $HOME/.ansible/tmp
- local_tmp = $HOME/.ansible/tmp
- #forks = 5
- #poll_interval = 15
- #sudo_user = root
- #ask_sudo_pass = True
- ask_pass = True
- #transport = smart
- remote_port = 22
- remote_user = root
- /etc/ansible/hosts
- #[dev-cassandra]
- #10.32.6.106
- #10.32.6.107
- #[ops-centos-7]
- #10.32.15.112
- #[ams-app]
- #10.32.6.138
- #[ams-db]
- #10.32.6.139
- #[ams-web]
- #10.32.6.140
- #[dev-ws]
- #10.32.6.[1:50]
- #[telco-ws]
- #10.32.9.[1:21]
- #[ga-ws]
- #10.32.11.[1:6]
- [inside]
- 10.32.100.1
- 10.32.7.253
- 10.32.5.69
- [intranet]
- 10.32.16.185
- 10.32.16.182
- 10.32.16.232
- 10.32.15.190
- 10.32.16.249
- 10.32.16.237
- [me]
- 10.32.5.4
- ;;execute
- ansible -m ping all --extra-vars "ansible_ssh_user=root ansible_ssh_pass=@1rstSTATION!"
- ansible-playbook playbook.yml --extra-vars "ansible_ssh_user=root ansible_ssh_pass=password"
- ansible -m command -a "df -h" me --extra-vars "ansible_ssh_user=ardi ansible_ssh_pass=pol8k09"
- ansible -m shell -a 'free -m' -k me
- ;;Alternatively, if you run the playbook with the -k option, ansible will prompt you for the ssh password
- ;;playbooks
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement