Hi,
I'm trying to override some default variables in a rolebook that I'm using
from ansible galaxy. In my playbook I have the following:
---
- hosts: all
vars_files:
- "vars/main.yml"
tasks:
- name: Update apt cache if needed.
apt: update_cache=yes cache_valid_time=3600
roles:
- { role: geerlingguy.apache }
and in my vars/main.yml I have the following:
apache_listen_port: 80
apache_packages:
- apache2
The apache_packages var is defined in the rolebook under /vars
When I run the provision (through vagrant) it still reads the default vars
from the role and not my override. I'm still new to ansible but read the
documentation on variable inheritance which says this should be possible.
I'm not really sure what I'm doing wrong, any pointers would be greatly
appreciated.
--
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/e160737b-e671-4d82-8742-951c04500894%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.