Using Variables — Ansible Documentation
docs.ansible.com › playbooks_variablesAnsible uses variables to manage differences between systems. With Ansible, you can execute tasks and playbooks on multiple different systems with a single command. To represent the variations among those different systems, you can create variables with standard YAML syntax, including lists and dictionaries.
Working with lists and dictionary variables in ansible ...
www.sbarjatiya.com › notes_wiki › indexMar 21, 2015 · Working with lists and dictionary variables in ansible. For working with lists and dictionary variables in ansible, refer to following example: --- - name: Test playbook for checking dictionaries hosts: all remote_user: root vars: dict1: {hostname: "test", ip: "127.0.0.1"} list_dict2: - {hostname: "test2", ip: "127.0.0.2"} - {hostname: "test3", ip: "127.0.0.3"} list_dict3: - {hostname: "test4", ip: [ "127.0.0.4", "127.0.0.5", "127.0.0.6" ] } tasks: - name: Accessing direct dictionary ...