diff options
author | Sachin Prabhu <sprabhu@redhat.com> | 2021-02-23 19:05:49 +0000 |
---|---|---|
committer | Anoop C S <anoopcs@cryptolab.net> | 2021-03-23 16:47:53 +0530 |
commit | 1a6283a687787a569b978d62492d7b5db5f1b678 (patch) | |
tree | c220ee46ee464d957261f771fe612b0d59b8047d | |
parent | fe13be832b1f3e242cda6156aa1321fcdee457ca (diff) | |
download | samba-integration-1a6283a687787a569b978d62492d7b5db5f1b678.tar.gz samba-integration-1a6283a687787a569b978d62492d7b5db5f1b678.tar.xz samba-integration-1a6283a687787a569b978d62492d7b5db5f1b678.zip |
Generate distro-vars.yml and use it
The distro-vars.yml will be used to set variables for a specific distro.
This includes
vagrant_image, which is used to specify the image to be used by Vagrant and
distro_specific actions, which indicate the yaml file to include for
distribution specific actions.
Signed-off-by: Sachin Prabhu <sprabhu@redhat.com>
-rw-r--r-- | vagrant/ansible/client-test.yml | 1 | ||||
-rw-r--r-- | vagrant/ansible/setup-clients.yml | 1 | ||||
-rw-r--r-- | vagrant/ansible/setup-cluster.yml | 1 | ||||
-rw-r--r-- | vagrant/roles/local.prep/tasks/main.yml | 9 |
4 files changed, 12 insertions, 0 deletions
diff --git a/vagrant/ansible/client-test.yml b/vagrant/ansible/client-test.yml index cb93685..8a2b698 100644 --- a/vagrant/ansible/client-test.yml +++ b/vagrant/ansible/client-test.yml @@ -2,6 +2,7 @@ become: yes become_method: sudo vars_files: + - distro-vars.yml - cluster-vars.yml roles: - client.test.prep diff --git a/vagrant/ansible/setup-clients.yml b/vagrant/ansible/setup-clients.yml index 47eecbb..f041d14 100644 --- a/vagrant/ansible/setup-clients.yml +++ b/vagrant/ansible/setup-clients.yml @@ -2,6 +2,7 @@ become: yes become_method: sudo vars_files: + - distro-vars.yml - cluster-vars.yml roles: - common.prep diff --git a/vagrant/ansible/setup-cluster.yml b/vagrant/ansible/setup-cluster.yml index f3c19a9..e394d0e 100644 --- a/vagrant/ansible/setup-cluster.yml +++ b/vagrant/ansible/setup-cluster.yml @@ -2,6 +2,7 @@ become: yes become_method: sudo vars_files: + - distro-vars.yml - cluster-vars.yml roles: - common.prep diff --git a/vagrant/roles/local.prep/tasks/main.yml b/vagrant/roles/local.prep/tasks/main.yml index 732c79b..ddef820 100644 --- a/vagrant/roles/local.prep/tasks/main.yml +++ b/vagrant/roles/local.prep/tasks/main.yml @@ -1,3 +1,12 @@ +- name: Generate distro-vars.yml in ansible directory + block: + - set_fact: + t: + distro: "{{ distro }}" + - copy: + content: '{{ t| to_nice_yaml }}' + dest: ./ansible/distro-vars.yml + - name: copy vagrant generated inventory file - local machine copy: src: .vagrant/provisioners/ansible/inventory/vagrant_ansible_inventory |