This script can be used when you are required to read values of array of array i.e. double "for" loop. This playbook contains an example where user wants to execute command on various types of instances/servers.
- Ansible roles
- Seperate config file to maintain variable
- Host groups and their children
- Global varibles using all file
- Host specific variables under host_vars
- Global ansible variable are defined in group_vars/all. Please amend appropriately.
- Host specific ansible variabled can be setup at host_vars. Example: host_vars/kafka_2. Please amend approprietly.
- Host Key Checking is disabled in ansible.cfg at root level
- Hosts are maintained in host
ansible-playbook -i hosts master.yml -e "host=int-kafka" -e "@dynatrace_config.yaml"