Hi there,
I'm trying to build python 3.4.2 in a semi-idempotent way. I see mpdehaan's
comments on it and didn't have any issues following those.
The issue I'm having is that the variables defined in common.yml aren't
being carried through to the second play (python-app-server). I would like
to simply define vars_files in the first play and have it carry forward. Am
I just thinking about it wrong?
Here's my playbook's site.yml file, as I would like it to look:
---
# file: site.yml
- hosts: all
user: '{{ deploy_user }}'
sudo: yes
vars_files:
- vars/common.yml
- [ "vars/{{ ansible_os_family }}.yml", "vars/os_defaults.yml" ]
roles:
- base
- redacted-base
- hosts: python-app-server
user: '{{ deploy_user }}'
roles:
- python-app-server
And here's how it has to look in order to work at the moment:
---
# file: site.yml
- hosts: all
user: '{{ deploy_user }}'
sudo: yes
vars_files:
- vars/common.yml
- [ "vars/{{ ansible_os_family }}.yml", "vars/os_defaults.yml" ]
roles:
- base
- redacted-base
- hosts: python-app-server
user: '{{ deploy_user }}'
vars_files:
- vars/common.yml
roles:
- python-app-server
I'm totally unconcerned about adding two lines, I just want a much cleaner
way to express this. Thoughts?
Thanks,
~ B
--
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/b015d643-17f6-4298-8c5e-64a5e32804d9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.