Testing Ansible
This is a collection of Ansible Playbook for experimenting Varnish Plus Products. It currently supports VAC, VCS, Varnish, Varnish-agent, Vstatdprobe, VHA at the current stage.
Here is a list the top YML files to be called.
vac.yml
- roles:
vac
- roles:
vcs.yml
- roles:
vcs
- roles:
varnish-cache.yml
- roles:
varnish-cache
- roles:
varnish-agent.yml
- roles:
varnish-agent
- required:
-e vac_server=IP/HOSTNAME
- required:
- roles:
vstatdprobe.yml
- roles:
vstatdprobe
- required:
-e vcs_server=IP/HOSTNAME
- required:
- roles:
vha.yml
- roles:
vha
- required:
-e other_vha_node=IP/HOSTNAME
- required:
- roles:
There are also a serveral alias YML files to run some roles at once. Just for convenience.
vac-vcs.yml
- roles:
vac
vcs
- roles:
vcp
- roles:
varnish-cache
varnish-agent
vstatdprobe
- roles:
vcp-vha
- roles:
varnish-cache
varnish-agent
vstatdprobe
vha
- roles:
To run the playbook, you run it by ansible-playbook /path/to/YML/file.yml
and then pass required varibles -e
or scope down your target hosts with -l
regarding your ansible hosts file /etc/ansible/hosts
.
# for example
# /etc/ansible/hosts
[cache-servers]
10.0.0.1
10.0.0.2
[vac]
10.0.0.100
# on terminal
$ ansible-playbook /root/ansible-repo/vcp.yml -l cache-servers -e vac_server=10.0.1.100 -e vcs_server=10.0.1.100