Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- hosts.ini
- [group]
- dbclient.example.com ip=x.x.x.x
- db.example.com ip=y.y.y.y
- group_vars/group.yml
- ansible_host: "{{ip}}"
- playbook.yml
- hosts: dbclient.example.com
- tasks:
- - name: 'Test hostname'
- command: 'hostname'
- delegate_to: db.example.com
- expected output
- changed: [dbclient.example.com -> db.example.com] => {
- "changed": true,
- ...
- "stdout": "db.example.com"
- }
- actual output
- changed: [dbclient.example.com -> {{ip}}] => {
- "changed": true,
- ...
- "stdout": "dbclient.example.com"
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement