|
16 | 16 | src: "{{ playbook_dir }}/templates/userdata.cfg.tpl.j2" |
17 | 17 | dest: "{{ playbook_dir }}/templates/userdata.cfg.tpl" |
18 | 18 |
|
19 | | -# Provision the infrastructure |
20 | | -# The CaaS puts hosts for accessing the OpenStack API into the 'openstack' group |
| 19 | +# Provision the infrastructure The CaaS puts hosts for accessing the OpenStack |
| 20 | +# API into the 'openstack' group |
21 | 21 | - hosts: openstack |
22 | 22 | roles: |
23 | 23 | - cluster_infra |
24 | 24 |
|
25 | 25 | - hosts: localhost |
26 | 26 | tasks: |
27 | | - # Check whether an ans_vlt_pwd variable is defined and if so, save it into a file called '~/vault.password'. If it doesn't exist, create a the '~/vault.password' file with ans_vlt_pwd = "password_not_set" as the password. |
| 27 | + # Check whether an ans_vlt_pwd variable is defined and if so, save it into a |
| 28 | + # file called '~/vault.password'. If it doesn't exist, create a the |
| 29 | + # '~/vault.password' file with ans_vlt_pwd = "password_not_set" as the |
| 30 | + # password. |
28 | 31 | - name: Create vault password file |
29 | 32 | vars: |
30 | 33 | ans_dflt: 'default_password' |
|
33 | 36 | dest: "~/vault.password" |
34 | 37 | mode: 0600 |
35 | 38 |
|
36 | | - # - block: |
37 | | - # # Install the ansible requirements |
38 | | - # - name: Install ansible posix |
39 | | - # command: ansible-galaxy collection install ansible.posix |
40 | | - |
41 | | - # # Install the ansible requirements |
42 | | - # - name: Install ansible community general |
43 | | - # command: ansible-galaxy collection install community.general |
44 | | - |
45 | | - # # Install the ansible requirements |
46 | | - # - name: Install ansible requirements |
47 | | - # command: ansible-galaxy install -r ansible/requirements.yml |
48 | | - |
49 | | - |
50 | | - # - name: Deploy ansible playbook manually |
51 | | - # command: ansible-playbook -i ansible/inventory.yml ansible/configure-hosts.yml |
52 | | - # vars: |
53 | | - # terraform_binary_directory: "{{ playbook_dir }}/../bin" |
54 | | - # terraform_binary_path: "{{ terraform_binary_directory }}/../terraform" |
55 | | - # terraform_project_path: "{{ playbook_dir }}" |
56 | | - |
57 | | -# - debug: var=outputs |
58 | | -# vars: |
59 | | -# outputs: |
60 | | -# cluster_access_ip: "{{ hostvars[groups['openstack'][0]].cluster_gateway_ip }}" |
61 | | - |
62 | | - # - name: Debug groups |
63 | | - # debug: |
64 | | - # msg: "{{ groups | to_yaml }}" |
65 | | -# when: cluster_state != "absent" |
66 | | - |
67 | 39 | # If openstack_deploy is true then continue if not end the playbook. |
68 | 40 |
|
69 | 41 | # Import the playbook to start configuring the multi-node hosts. |
|
82 | 54 | cmd: "bash ~/deploy-openstack.sh" |
83 | 55 | when: openstack_deploy == true |
84 | 56 |
|
85 | | - |
86 | | -# - hosts: ansible_control |
87 | | -# vars: |
88 | | -# ansible_pipelining: true |
89 | | -# ansible_ssh_pipelining: true |
90 | | -# tasks: |
91 | | -# - name: Deploy OpenStack. |
92 | | -# ansible.builtin.shell: |
93 | | -# cmd: "./deploy-openstack.sh" |
94 | | - |
| 57 | +# This is to get the ip of the ansible-controller host. |
95 | 58 | - hosts: localhost |
96 | 59 | tasks: |
97 | 60 | - debug: var=outputs |
|
0 commit comments