Commit 38a8e148 authored by Łukasz Nowak's avatar Łukasz Nowak

playbook: Extract SlapOS master URLs to separate setting

It is required in order to being able to use vars_prompt in slapos
playbook, while keeping compatiblity with other playbooks.
parent 8da6c799
......@@ -4,6 +4,7 @@
vars_files:
- settings/imt.yml
- settings/slapos-master.yml
  • This will make imt settings be overwritten by slapos-master.yml one, no?

  • I will check the behaviour on how ansible merges information from those files.

    Content of those files does not overlap, and such situation -- more than one var_files is common in our playbooks.

    See diff between those files:

    --- settings/imt.yml    2018-02-28 11:31:19.570870369 +0100
    +++ settings/slapos-master.yml  2018-02-28 15:05:04.492877931 +0100
    @@ -1,6 +1,3 @@
     ---
    -re6st_registry_url: http://slapos.tl.teralab-datascience.fr:8088/
    -slapos_master_url: https://slap.imt.vifib.com/
    -slapos_web_master_url: https://slapos.tl.teralab-datascience.fr/
    -interface_name: lo
    -re6st_annon: False
    +slapos_master_url: https://slap.vifib.com/
    +slapos_web_master_url: https://slapos.vifib.com/
  • I tested it and it works as expected:

    TASK: [imt-slapos | Debug] ****************************************************
    ok: [127.0.0.1] => {
        "msg": "some_value_only_in_imt = Only in IMT some_value_also_in_slapos_master = In SlapOS master"
    }

    some_value_only_in_imt is variable set only in settings/imt.yml, and it is used from there.

    some_value_also_in_slapos_master is variable set in settings/imt.yml AND settings/slapos-master.yml - and in this case it is used from the settings/slapos-master.yml, as this one is added later.

    So my change really provides backward compatibility with using vars_prompt for slapos-master.yml playbook itself.

Please register or sign in to reply
vars_prompt:
- name: "computer_name"
......
---
slapos_master_url: https://slap.vifib.com/
slapos_web_master_url: https://slapos.vifib.com/
\ No newline at end of file
---
re6st_registry_url: http://re6stnet.nexedi.com/
re6st_fingerprint: sha256:61a8f3ef4bdf12aca0dad5c17e8fadd15966bdd68b1400c91ef8ee53f17c0d65
slapos_master_url: https://slap.vifib.com/
slapos_web_master_url: https://slapos.vifib.com/
interface_name: lo
re6st_annon: True
re6sttoken: noname
......@@ -4,6 +4,7 @@
vars_files:
- settings/vifib.yml
- settings/slapos-master.yml
vars:
interface_name: eth0
......
......@@ -8,6 +8,7 @@
vars_files:
- settings/vifib.yml
- settings/upgrader.yml
- settings/slapos-master.yml
vars_prompt:
- name: "computer_name"
......
......@@ -8,6 +8,7 @@
vars_files:
- settings/vifib.yml
- settings/upgrader.yml
- settings/slapos-master.yml
vars_prompt:
- name: "computer_name"
......
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