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.