|
1 | 1 | --- |
2 | | - |
3 | 2 | - name: Ensure dependencies are installed |
4 | 3 | hosts: controllers[0] |
5 | 4 | gather_facts: true |
6 | 5 | vars: |
7 | | - venv: '{{ virtualenv_path }}/openstack' |
| 6 | + venv: "{{ virtualenv_path }}/openstack" |
8 | 7 | tasks: |
9 | 8 | - name: Install python build dependencies |
10 | | - package: |
| 9 | + ansible.builtin.package: |
11 | 10 | name: "{{ packages | select | list }}" |
12 | 11 | cache_valid_time: "{{ apt_cache_valid_time if ansible_facts.os_family == 'Debian' else omit }}" |
13 | 12 | update_cache: "{{ True if ansible_facts.os_family == 'Debian' else omit }}" |
|
16 | 15 | vars: |
17 | 16 | packages: |
18 | 17 | - "{% if ansible_facts.os_family == 'RedHat' %}gcc{% else %}build-essential{% endif %}" |
19 | | - - "python3-dev{% if ansible_facts.os_family == 'RedHat' %}el{% endif %}" |
| 18 | + - python3-dev{% if ansible_facts.os_family == 'RedHat' %}el{% endif %} |
20 | 19 | - "{% if ansible_facts.os_family == 'Debian' %}python3-venv{% endif %}" |
21 | 20 |
|
22 | 21 | - name: Ensure latest version of pip is installed |
23 | | - pip: |
| 22 | + ansible.builtin.pip: |
24 | 23 | name: pip |
25 | 24 | state: latest |
26 | | - virtualenv: '{{ venv }}' |
27 | | - virtualenv_command: "/usr/bin/python3 -m venv" |
| 25 | + virtualenv: "{{ venv }}" |
| 26 | + virtualenv_command: /usr/bin/python3 -m venv |
28 | 27 |
|
29 | 28 | - name: Ensure python openstack client is installed |
30 | | - pip: |
| 29 | + ansible.builtin.pip: |
31 | 30 | name: python-openstackclient |
32 | | - virtualenv: '{{ venv }}' |
| 31 | + virtualenv: "{{ venv }}" |
33 | 32 | extra_args: -c "{{ pip_upper_constraints_file }}" |
34 | 33 |
|
35 | 34 | - name: Include kolla secrets |
36 | | - include_vars: |
37 | | - dir: '{{ kayobe_env_config_path }}/kolla/' |
| 35 | + ansible.builtin.include_vars: |
| 36 | + dir: "{{ kayobe_env_config_path }}/kolla/" |
38 | 37 | files_matching: passwords.yml |
39 | 38 | name: kolla_passwords |
40 | 39 |
|
41 | 40 | - name: Add an IP to connect to the instances |
42 | 41 | # FIXME: host configure will have bounced the bridge |
43 | 42 | # and removed the IP |
44 | | - command: ip a add 10.0.2.1/24 dev breth1 |
| 43 | + ansible.builtin.command: ip a add 10.0.2.1/24 dev breth1 |
45 | 44 | register: result |
46 | | - failed_when: 'result.rc !=0 and "RTNETLINK answers: File exists" not in |
47 | | - result.stderr' |
| 45 | + failed_when: 'result.rc != 0 and "RTNETLINK answers: File exists" not in result.stderr' |
48 | 46 | changed_when: result.rc == 0 |
49 | 47 | become: true |
50 | 48 |
|
51 | 49 | - name: Run init-run-once |
52 | | - script: |
| 50 | + ansible.builtin.script: |
53 | 51 | cmd: scripts/aio-init.sh |
54 | 52 | creates: /tmp/.init-runonce |
55 | 53 | environment: |
56 | | - KOLLA_OPENSTACK_COMMAND: '{{ venv }}/bin/openstack' |
| 54 | + KOLLA_OPENSTACK_COMMAND: "{{ venv }}/bin/openstack" |
57 | 55 | OS_PROJECT_DOMAIN_NAME: Default |
58 | 56 | OS_USER_DOMAIN_NAME: Default |
59 | 57 | OS_PROJECT_NAME: admin |
60 | 58 | OS_TENANT_NAME: admin |
61 | 59 | OS_USERNAME: admin |
62 | | - OS_PASSWORD: "{{ kolla_passwords.keystone_admin_password | mandatory('Could\ |
63 | | - \ not find keystone_admin_password in passwords.yml') }}" |
| 60 | + OS_PASSWORD: "{{ kolla_passwords.keystone_admin_password | mandatory('Could not find keystone_admin_password in passwords.yml') }}" |
64 | 61 | # Use kolla_external_fqdn in wallaby |
65 | | - OS_AUTH_URL: http://{{ kolla_external_fqdn | default(public_net_name |
66 | | - | net_fqdn) | default(public_net_name | net_vip_address, true) }}:5000 |
| 62 | + OS_AUTH_URL: http://{{ kolla_external_fqdn | default(public_net_name | net_fqdn) | default(public_net_name | net_vip_address, true) }}:5000 |
67 | 63 | OS_INTERFACE: public |
68 | 64 | OS_ENDPOINT_TYPE: publicURL |
69 | | - OS_IDENTITY_API_VERSION: 3 |
| 65 | + OS_IDENTITY_API_VERSION: "3" |
70 | 66 | OS_REGION_NAME: RegionOne |
71 | 67 | OS_AUTH_PLUGIN: password |
0 commit comments