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