Ansible - nalcheg/wiki GitHub Wiki
ansible all -m ping
ansible all -s -a "ip a l"
ansible all -m raw -a "ip a l"
ansible all -m apt -a "name=mc state=removed force=yes"
AWX (Ansible Tower)
https://github.com/ansible/awx
Playbook examples
Copy playbook
---
- hosts: all
tasks:
- name: copy something
copy:
src: /root/fileToCopy
dest: /tmp/fileToCopy
Enable PgUp, PgDown search in bash
---
- hosts: all
tasks:
- name: Uncomment strings for PgUp in /etc/inputrc
replace:
dest: /etc/inputrc
regexp: '(\s+)# "\\e\[5\~"\: history-search-backward(\s+.*)?$'
replace: '\1"\\e[5~": history-search-backward\2'
- name: Uncomment strings for PgDown in /etc/inputrc
replace:
dest: /etc/inputrc
regexp: '(\s+)# "\\e\[6\~"\: history-search-forward(\s+.*)?$'
replace: '\1"\\e[6~": history-search-forward\2'