Problem:
Hello
I imported ansible roles in foreman but cant import ansible variables (no errormessage).
Where foreman/foreman-proxy search for ansible variables?
My roles looks like:
rolepath/roles/apache
- doku
- handlers
- meta
- tasks
- templates
- vars
and in folder vars i defined a lot off variables for example:
Hi,
proxy searches the defaults dir in your roles. Role vars have very high priority and are difficult to override, is there a specific reason why you are using them?
When you do: mv rolepath/roles/apache/vars/debian.yml rolepath/roles/apache/defaults/debian.yml
proxy should find the variables from debian.yml.
You can have role-path/defaults/main/{debian,ubuntu}.yml and Ansible will find them (tested on Ansible 2.7.8).
The role-path/defaults/debian.yml is ignored by Ansible, but proxy will import defaults from there as well, we are globbing the whole defaults dir. This might need a change to have the same behavior as Ansible.
Thank you for your help. But the problem still exists.
The VariableExtractor Class --> /usr/lib/ruby/vendor_ruby/smart_proxy_ansible/variables_extractor.rb <--
The contents of each variables file is a simple YAML dictionary, like this:
---
# in the above example, this would be vars/external_vars.yml
somevar: somevalue
password: magic
variable files look different to playbook files. Therfore the VariableExtractor violates
the ansible specs.
Thanks for your help. I see the new version looks good but cant currently install. I included the foreman repos and with apt install i dont get the new version. Maybe i have to wait.