Commit 13e9f2ac authored by Łukasz Nowak's avatar Łukasz Nowak Committed by Rafael Monnerat

playbook: Use correctly roles/vars

The previous usage lead to impossilibity of overriding variables defined
in role, because they were included forcibly in the tasks for
standalone-shared.

By using default Ansible apporach to role vars, they can be overriden on
playbook basis.

/reviewed-on nexedi/slapos.package!48
parent 96f9d021
---
- include: debian9-gcc-4.9.yml
- name: fetch shared vars
include_vars: erp5-common.yml
- name: Store public IPv4 for other scripts
copy: content="{{ ansible_default_ipv4.address }}" dest=/tmp/playbook-public-ipv4 mode=0644
......
  • This seems not enough to fix the problem.

    The roles vars still been used instead the playbook ones (at least on 2.x):

    http://docs.ansible.com/ansible/latest/user_guide/playbooks_variables.html#id18

    So I will remove request_instance_template from vars/main.yml and make it mandatory to be declared on the playbook.

  • This seems not enough to fix the problem.

    That's bad, thank you for checking it out.

    The roles vars still been used instead the playbook ones (at least on 2.x): http://docs.ansible.com/ansible/latest/user_guide/playbooks_variables.html#id18

    So it seems that variable order is quite complex in ansible, and relying on it is dangerous.

    So I will remove request_instance_template from vars/main.yml and make it mandatory to be declared on the playbook.

    Ok, please ping me when it is done or you have MR.

Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment