Skip to content
Snippets Groups Projects
Commit 4038c822 authored by Mark Goddard's avatar Mark Goddard
Browse files

Change reserved keyword 'action' to 'kayobe_action'

For several roles (cadvisor, inspection-store, docker-registry, etc.),
we use an 'action' variable, in a similar manner to kolla-ansible,
to determine the current action being performed (deploy,
reconfigure, upgrade). It is likely this information will be
useful for custom playbooks, so we should expose it. The 'action'
keyword is reserved, and its use triggers a warning, so we change its
name to kayobe_action before advertising it to users.

Change-Id: I5ffbb8b014a31e27141bfc8bf780297d81c840be
Story: 2001663
Task: 12604
parent 9ec76f9e
No related branches found
No related tags found
No related merge requests found
Showing
with 35 additions and 10 deletions
......@@ -12,3 +12,4 @@
- cadvisor
roles:
- role: cadvisor
cadvisor_action: "{{ kayobe_action }}"
......@@ -12,3 +12,4 @@
- docker-registry
roles:
- role: docker-registry
docker_registry_action: "{{ kayobe_action }}"
......@@ -12,6 +12,7 @@
- inspection-store
roles:
- role: inspection-store
inspection_store_action: "{{ kayobe_action }}"
inspection_store_enabled: "{{ inspector_store_enabled }}"
inspection_store_port: "{{ inspector_store_port }}"
inspection_store_config_path: "{{ config_path }}/inspection-store"
......@@ -12,3 +12,4 @@
- node-exporter
roles:
- role: node-exporter
nodeexporter_action: "{{ kayobe_action }}"
......@@ -12,3 +12,4 @@
- opensm
roles:
- role: opensm
opensm_action: "{{ kayobe_action }}"
---
# Roughly follows kolla-ansible's service deployment patterns.
# Action to perform. One of 'deploy', 'destroy', 'pull', 'reconfigure',
# 'upgrade'.
cadvisor_action: deploy
# Whether cAdvisor is enabled.
cadvisor_enabled: false
......
---
- include: "{{ action }}.yml"
- include: "{{ cadvisor_action }}.yml"
......@@ -7,4 +7,4 @@
with_dict: "{{ cadvisor_services }}"
when:
- item.value.enabled
- action != 'destroy'
- cadvisor_action != 'destroy'
---
# Roughly follows kolla-ansible's service deployment patterns.
# Action to perform. One of 'deploy', 'destroy', 'pull', 'reconfigure',
# 'upgrade'.
docker_registry_action: deploy
# Whether a docker registry is enabled.
docker_registry_enabled: true
......
---
- include: "{{ action }}.yml"
- include: "{{ docker_registry_action }}.yml"
......@@ -7,4 +7,4 @@
with_dict: "{{ docker_registry_services }}"
when:
- item.value.enabled
- action != 'destroy'
- docker_registry_action != 'destroy'
---
# Roughly follows kolla-ansible's service deployment patterns.
# Action to perform. One of 'deploy', 'destroy', 'pull', 'reconfigure',
# 'upgrade'.
inspection_store_action: deploy
# Whether an inspection store is enabled.
inspection_store_enabled: true
......
---
- include: "{{ action }}.yml"
- include: "{{ inspection_store_action }}.yml"
......@@ -7,4 +7,4 @@
with_dict: "{{ inspection_store_services }}"
when:
- item.value.enabled
- action != 'destroy'
- inspection_store_action != 'destroy'
---
# Roughly follows kolla-ansible's service deployment patterns.
# Action to perform. One of 'deploy', 'destroy', 'pull', 'reconfigure',
# 'upgrade'.
nodeexporter_action: deploy
# Whether Node Exporter is enabled.
nodeexporter_enabled: false
......
---
- include: "{{ action }}.yml"
- include: "{{ nodeexporter_action }}.yml"
......@@ -7,4 +7,4 @@
with_dict: "{{ nodeexporter_services }}"
when:
- item.value.enabled
- action != 'destroy'
- nodeexporter_action != 'destroy'
---
# Roughly follows kolla-ansible's service deployment patterns.
# Action to perform. One of 'deploy', 'destroy', 'pull', 'reconfigure',
# 'upgrade'.
opensm_action: deploy
# Whether OpenSM is enabled.
opensm_enabled: true
......
---
- include: "{{ action }}.yml"
- include: "{{ opensm_action }}.yml"
......@@ -7,4 +7,4 @@
with_dict: "{{ opensm_services }}"
when:
- item.value.enabled
- action != 'destroy'
- opensm_action != 'destroy'
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment