40 lines
1.1 KiB
Markdown
40 lines
1.1 KiB
Markdown
# Ansible files and playbooks
|
|
|
|
This is Maruntiel's Ansible repository
|
|
|
|
INFRASTRUCTURE SETUP
|
|
====================
|
|
|
|
Examples:
|
|
|
|
# Ping all hosts to verify connectivity:
|
|
ansible all -m ping
|
|
|
|
# Show all facts about some hosts:
|
|
ansible mysql -m setup
|
|
|
|
# Run a command on all asterisk servers:
|
|
ansible asterisk -m shell -a "uname"
|
|
|
|
# Install/upgrade a package on MySQL servers:
|
|
ansible mysql -m apt -a "name=innotop state=latest"
|
|
|
|
# Provision the whole infrastructure:
|
|
ansible-playbook site.yml [--diff] [--tags=<tags>]
|
|
|
|
# Provision the whole infrastructure in dry run mode and see what would change:
|
|
ansible-playbook site.yml --check --diff
|
|
|
|
# Update the hosts file on all servers:
|
|
ansible-playbook tools/update_hosts.yml
|
|
|
|
|
|
Files:
|
|
|
|
ansible.cfg Ansible config file
|
|
inventory Hosts inventory file defining all hosts and groups
|
|
|
|
site.yml Main playbook: provision all hosts and services
|
|
playbook/*.yml Playbooks for provisioning services (included by site.yml)
|
|
tools/*.yml Playbooks for operations
|
|
others |