I'm having some issues with variables scope and behavior, simplifying the
issue:
I have two environments:
- production
- development
which one with several machines and a common role, for example backups.
A variable backup_jobs define which files should be backup and when, so in
the production group_vars I set:
machine_a_backup_jobs: ...
machine_b_backup_jobs: ...
On machine_a group_vars I set:
backup_jobs: "{{ machine_a_backup_jobs }}"
And on machine_b group_vars:
backup_jobs: "{{ machine_b_backup_jobs }}"
In the development group_vars I don't set these variables since I don't
want backups
the expected behavior was that machine_a_backups and machine_b_backups
would be undefined for this environment, instead when I check the variable
I see that is replaced as a string:
"backup_jobs": "{{ machine_a_backup_jobs }}"
ansible --version
ansible 1.8.2
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/58ac71df-96fc-4156-bf58-2a430101b00b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.