Drop unused vars for cells v2 discover tasks
Change-Id: I78a3c5361276d8f2a7cf42e95a32592f26606dee Signed-off-by: Bogdan Dobrelya <bdobreli@redhat.com>
This commit is contained in:
parent
4dea939ba0
commit
26c905e08b
|
@ -20,7 +20,6 @@
|
|||
vars:
|
||||
tripleo_cellv2_cell_name: "{{ tripleo_cellv2_cell_name }}"
|
||||
# containercli can be tropped when we fully switched to podman
|
||||
tripleo_cellv2_containercli: "{{ tripleo_cellv2_containercli }}"
|
||||
tripleo_cellv2_cellcontroller_group: "{{ groups['CellController'] }}"
|
||||
tasks:
|
||||
- import_role:
|
||||
|
@ -32,8 +31,6 @@
|
|||
gather_facts: true
|
||||
vars:
|
||||
tripleo_cellv2_cell_name: "{{ tripleo_cellv2_cell_name }}"
|
||||
# containercli can be tropped when we fully switched to podman
|
||||
tripleo_cellv2_containercli: "{{ tripleo_cellv2_containercli }}"
|
||||
tripleo_cellv2_cellcontroller_group: "{{ groups['CellController'] }}"
|
||||
tasks:
|
||||
- import_role:
|
||||
|
@ -45,8 +42,6 @@
|
|||
gather_facts: true
|
||||
vars:
|
||||
tripleo_cellv2_cell_name: "{{ tripleo_cellv2_cell_name }}"
|
||||
# containercli can be tropped when we fully switched to podman
|
||||
tripleo_cellv2_containercli: "{{ tripleo_cellv2_containercli }}"
|
||||
tripleo_cellv2_cellcontroller_group: "{{ groups['CellController'] }}"
|
||||
tasks:
|
||||
- import_role:
|
||||
|
@ -58,8 +53,6 @@
|
|||
gather_facts: true
|
||||
vars:
|
||||
tripleo_cellv2_cell_name: "{{ tripleo_cellv2_cell_name }}"
|
||||
# containercli can be tropped when we fully switched to podman
|
||||
tripleo_cellv2_containercli: "{{ tripleo_cellv2_containercli }}"
|
||||
tripleo_cellv2_cellcontroller_group: "{{ groups['CellController'] }}"
|
||||
tasks:
|
||||
- import_role:
|
||||
|
@ -69,11 +62,6 @@
|
|||
- hosts: Controller[0]
|
||||
remote_user: stack
|
||||
gather_facts: true
|
||||
vars:
|
||||
tripleo_cellv2_cell_name: "{{ tripleo_cellv2_cell_name }}"
|
||||
# containercli can be tropped when we fully switched to podman
|
||||
tripleo_cellv2_containercli: "{{ tripleo_cellv2_containercli }}"
|
||||
tripleo_cellv2_cellcontroller_group: "{{ groups['CellController'] }}"
|
||||
tasks:
|
||||
- import_role:
|
||||
name: tripleo_cellv2
|
||||
|
|
|
@ -19,8 +19,6 @@
|
|||
|
||||
tripleo_cellv2_debug: "{{ (ansible_verbosity | int) >= 2 | bool }}"
|
||||
tripleo_cellv2_cell_name: ""
|
||||
# containercli can be tropped when we fully switched to podman
|
||||
tripleo_cellv2_containercli: "docker"
|
||||
|
||||
tripleo_cellv2_cellcontroller_group: "{{ groups['CellController'] }}"
|
||||
tripleo_cellv2_cell_database_vip: "{{ hostvars[tripleo_cellv2_cellcontroller_group[0]]['cell_database_vip'] }}"
|
||||
|
|
|
@ -58,20 +58,13 @@
|
|||
|
||||
- name: Restart nova services
|
||||
become: true
|
||||
block:
|
||||
- name: nova restart podman
|
||||
systemd:
|
||||
name: "{{ item }}"
|
||||
state: restarted
|
||||
with_items:
|
||||
- tripleo_nova_api
|
||||
- tripleo_nova_conductor
|
||||
- tripleo_nova_scheduler
|
||||
when: tripleo_cellv2_containercli == "podman"
|
||||
|
||||
- name: nova restart docker
|
||||
command: docker restart nova_api nova_scheduler nova_conductor
|
||||
when: tripleo_cellv2_containercli == "docker"
|
||||
systemd:
|
||||
name: "{{ item }}"
|
||||
state: restarted
|
||||
with_items:
|
||||
- tripleo_nova_api
|
||||
- tripleo_nova_conductor
|
||||
- tripleo_nova_scheduler
|
||||
when:
|
||||
- hosts_result.changed or hosts_result2.changed
|
||||
tags:
|
||||
|
|
|
@ -16,19 +16,19 @@
|
|||
|
||||
- name: Check if cell exist
|
||||
block:
|
||||
- name: Fail if cell_name or containercli are not passed
|
||||
fail: msg="Both tripleo_cellv2_cell_name and tripleo_cellv2_containercli are mandatory parameters!"
|
||||
when: tripleo_cellv2_cell_name is not defined or tripleo_cellv2_containercli is not defined
|
||||
- name: Fail if cell_name is not passed
|
||||
fail: msg="tripleo_cellv2_cell_name is a mandatory parameter!"
|
||||
when: tripleo_cellv2_cell_name is not defined
|
||||
- name: Check if cell is already created
|
||||
become: true
|
||||
shell: |-
|
||||
set -o pipefail
|
||||
{{ tripleo_cellv2_containercli }} exec -i -u root nova_api \
|
||||
podman exec -i -u root nova_api \
|
||||
nova-manage {{ (tripleo_cellv2_debug | bool) | ternary('--debug', '') }} \
|
||||
cell_v2 list_cells | grep {{ tripleo_cellv2_cell_name }}
|
||||
failed_when: false
|
||||
register: cell_check_result
|
||||
- name: Fail if cell already exist
|
||||
- name: Fail if cell already exists
|
||||
fail: msg="Cell with name {{ tripleo_cellv2_cell_name }} already exist!"
|
||||
when: cell_check_result.rc == 0
|
||||
tags:
|
||||
|
|
|
@ -19,14 +19,14 @@
|
|||
block:
|
||||
- name: Create Cell
|
||||
shell: >-
|
||||
{{ tripleo_cellv2_containercli }} exec -i -u root nova_api
|
||||
podman exec -i -u root nova_api
|
||||
nova-manage cell_v2 create_cell --name {{ tripleo_cellv2_cell_name }}
|
||||
--database_connection "{scheme}://{username}:{password}@{{ tripleo_cellv2_cell_database_vip }}/nova?{query}"
|
||||
--transport-url "{{ tripleo_cellv2_cell_transport_url }}"
|
||||
|
||||
- name: List Cells
|
||||
shell: >
|
||||
{{ tripleo_cellv2_containercli }} exec -i -u root nova_api
|
||||
podman exec -i -u root nova_api
|
||||
nova-manage cell_v2 list_cells
|
||||
register: cells
|
||||
|
||||
|
|
|
@ -19,12 +19,12 @@
|
|||
block:
|
||||
- name: Discover hosts
|
||||
shell: >-
|
||||
{{ tripleo_cellv2_containercli }} exec -i -u root nova_api
|
||||
podman exec -i -u root nova_api
|
||||
nova-manage cell_v2 discover_hosts --by-service --verbose
|
||||
|
||||
- name: List Cells
|
||||
shell: >-
|
||||
{{ tripleo_cellv2_containercli }} exec -i -u root nova_api
|
||||
podman exec -i -u root nova_api
|
||||
nova-manage cell_v2 list_cells
|
||||
tags:
|
||||
- discover
|
||||
|
|
Loading…
Reference in New Issue