From 2e190597bb383f2eeac94bb716870e5286b31ebc Mon Sep 17 00:00:00 2001
From: Mark Goddard <mark@stackhpc.com>
Date: Wed, 16 May 2018 13:13:06 +0100
Subject: [PATCH] Fix missed kolla_action and kolla_serial

In change I78cb60168aaa40bb6439198283546b7faf33917c, action was changed
to kolla_action, and serial to kolla_serial, to avoid Ansible warnings
due to use of reserved keywords. In that change, some keywords were
missed, and some changes that were merged since then have not switched
to the new variables. This change fixes all current instances of those
issues.

Change-Id: I357dffdfcb2b405e280a962d366ee65eebf0a8d1
Implements: blueprint migrate-to-ansible-2-2-0
---
 ansible/kolla-host.yml                     |  4 ++--
 ansible/roles/blazar/handlers/main.yml     |  4 ++--
 ansible/roles/blazar/tasks/config.yml      |  2 +-
 ansible/roles/blazar/tasks/main.yml        |  2 +-
 ansible/roles/freezer/handlers/main.yml    |  2 +-
 ansible/roles/ironic/handlers/main.yml     | 10 +++++-----
 ansible/roles/ironic/tasks/config.yml      |  2 +-
 ansible/roles/kafka/handlers/main.yml      |  2 +-
 ansible/roles/kafka/tasks/config.yml       |  2 +-
 ansible/roles/kafka/tasks/main.yml         |  2 +-
 ansible/roles/mongodb/handlers/main.yml    |  2 +-
 ansible/roles/mongodb/tasks/config.yml     |  2 +-
 ansible/roles/neutron/handlers/main.yml    |  2 +-
 ansible/roles/prometheus/handlers/main.yml |  8 ++++----
 ansible/roles/prometheus/tasks/config.yml  |  2 +-
 ansible/roles/prometheus/tasks/main.yml    |  2 +-
 ansible/roles/zookeeper/handlers/main.yml  |  2 +-
 ansible/roles/zookeeper/tasks/config.yml   |  2 +-
 ansible/roles/zookeeper/tasks/main.yml     |  2 +-
 19 files changed, 28 insertions(+), 28 deletions(-)

diff --git a/ansible/kolla-host.yml b/ansible/kolla-host.yml
index 4668f38422..e0b9bec9be 100644
--- a/ansible/kolla-host.yml
+++ b/ansible/kolla-host.yml
@@ -6,7 +6,7 @@
 # Ansible gathering facts twice.
 - name: Gather facts for all hosts
   hosts: all
-  serial: '{{ serial|default("0") }}'
+  serial: '{{ kolla_serial|default("0") }}'
   gather_facts: false
   tasks:
     - setup:
@@ -21,7 +21,7 @@
 # which can be very inefficient.
 - name: Gather facts for all hosts (if using --limit)
   hosts: all
-  serial: '{{ serial|default("0") }}'
+  serial: '{{ kolla_serial|default("0") }}'
   gather_facts: false
   tasks:
     - setup:
diff --git a/ansible/roles/blazar/handlers/main.yml b/ansible/roles/blazar/handlers/main.yml
index db24311643..668305d78f 100644
--- a/ansible/roles/blazar/handlers/main.yml
+++ b/ansible/roles/blazar/handlers/main.yml
@@ -14,7 +14,7 @@
     image: "{{ service.image }}"
     volumes: "{{ service.volumes }}"
   when:
-    - action != "config"
+    - kolla_action != "config"
     - inventory_hostname in groups[service.group]
     - service.enabled | bool
     - config_json.changed | bool
@@ -37,7 +37,7 @@
     image: "{{ service.image }}"
     volumes: "{{ service.volumes }}"
   when:
-    - action != "config"
+    - kolla_action != "config"
     - inventory_hostname in groups[service.group]
     - service.enabled | bool
     - config_json.changed | bool
diff --git a/ansible/roles/blazar/tasks/config.yml b/ansible/roles/blazar/tasks/config.yml
index 8f93b5bf52..2e12df6d1c 100644
--- a/ansible/roles/blazar/tasks/config.yml
+++ b/ansible/roles/blazar/tasks/config.yml
@@ -90,7 +90,7 @@
     volumes: "{{ item.value.volumes }}"
   register: check_blazar_containers
   when:
-    - action != "config"
+    - kolla_action != "config"
     - inventory_hostname in groups[item.value.group]
     - item.value.enabled | bool
   with_dict: "{{ blazar_services }}"
diff --git a/ansible/roles/blazar/tasks/main.yml b/ansible/roles/blazar/tasks/main.yml
index b017e8b4ad..49a33b8492 100644
--- a/ansible/roles/blazar/tasks/main.yml
+++ b/ansible/roles/blazar/tasks/main.yml
@@ -1,2 +1,2 @@
 ---
-- include: "{{ action }}.yml"
+- include: "{{ kolla_action }}.yml"
diff --git a/ansible/roles/freezer/handlers/main.yml b/ansible/roles/freezer/handlers/main.yml
index 56a67c70d8..de7e77c851 100644
--- a/ansible/roles/freezer/handlers/main.yml
+++ b/ansible/roles/freezer/handlers/main.yml
@@ -38,7 +38,7 @@
     image: "{{ service.image }}"
     volumes: "{{ service.volumes }}"
   when:
-    - action != "config"
+    - kolla_action != "config"
     - inventory_hostname in groups[service.group]
     - service.enabled | bool
     - config_json.changed | bool
diff --git a/ansible/roles/ironic/handlers/main.yml b/ansible/roles/ironic/handlers/main.yml
index f32e73ada2..2c179a3d37 100644
--- a/ansible/roles/ironic/handlers/main.yml
+++ b/ansible/roles/ironic/handlers/main.yml
@@ -14,7 +14,7 @@
     image: "{{ service.image }}"
     volumes: "{{ service.volumes }}"
   when:
-    - action != "config"
+    - kolla_action != "config"
     - inventory_hostname in groups[service.group]
     - service.enabled | bool
     - config_json.changed | bool
@@ -38,7 +38,7 @@
     privileged: "{{ service.privileged | default(False) }}"
     volumes: "{{ service.volumes }}"
   when:
-    - action != "config"
+    - kolla_action != "config"
     - inventory_hostname in groups[service.group]
     - service.enabled | bool
     - config_json.changed | bool
@@ -61,7 +61,7 @@
     privileged: "{{ service.privileged | default(False) }}"
     volumes: "{{ service.volumes }}"
   when:
-    - action != "config"
+    - kolla_action != "config"
     - inventory_hostname in groups[service.group]
     - service.enabled | bool
     - config_json.changed | bool
@@ -82,7 +82,7 @@
     image: "{{ service.image }}"
     volumes: "{{ service.volumes }}"
   when:
-    - action != "config"
+    - kolla_action != "config"
     - inventory_hostname in groups[service.group]
     - service.enabled | bool
     - config_json.changed | bool
@@ -105,7 +105,7 @@
     volumes: "{{ service.volumes }}"
     cap_add: "{{ service.cap_add }}"
   when:
-    - action != "config"
+    - kolla_action != "config"
     - inventory_hostname in groups[service.group]
     - service.enabled | bool
     - config_json.changed | bool
diff --git a/ansible/roles/ironic/tasks/config.yml b/ansible/roles/ironic/tasks/config.yml
index 63e57c6cf7..689efdfb99 100644
--- a/ansible/roles/ironic/tasks/config.yml
+++ b/ansible/roles/ironic/tasks/config.yml
@@ -200,7 +200,7 @@
     volumes: "{{ item.value.volumes }}"
   register: check_ironic_containers
   when:
-    - action != "config"
+    - kolla_action != "config"
     - inventory_hostname in groups[item.value.group]
     - item.value.enabled | bool
   with_dict: "{{ ironic_services }}"
diff --git a/ansible/roles/kafka/handlers/main.yml b/ansible/roles/kafka/handlers/main.yml
index caf1100ec7..5571f6391e 100644
--- a/ansible/roles/kafka/handlers/main.yml
+++ b/ansible/roles/kafka/handlers/main.yml
@@ -14,7 +14,7 @@
     environment: "{{ service.environment }}"
     volumes: "{{ service.volumes }}"
   when:
-    - action != "config"
+    - kolla_action != "config"
     - inventory_hostname in groups[service.group]
     - service.enabled | bool
     - config_json.changed | bool
diff --git a/ansible/roles/kafka/tasks/config.yml b/ansible/roles/kafka/tasks/config.yml
index ab34244577..70ca82237d 100644
--- a/ansible/roles/kafka/tasks/config.yml
+++ b/ansible/roles/kafka/tasks/config.yml
@@ -54,7 +54,7 @@
     environment: "{{ item.value.environment }}"
   register: check_kafka_containers
   when:
-    - action != "config"
+    - kolla_action != "config"
     - inventory_hostname in groups[item.value.group]
     - item.value.enabled | bool
   with_dict: "{{ kafka_services }}"
diff --git a/ansible/roles/kafka/tasks/main.yml b/ansible/roles/kafka/tasks/main.yml
index b017e8b4ad..49a33b8492 100644
--- a/ansible/roles/kafka/tasks/main.yml
+++ b/ansible/roles/kafka/tasks/main.yml
@@ -1,2 +1,2 @@
 ---
-- include: "{{ action }}.yml"
+- include: "{{ kolla_action }}.yml"
diff --git a/ansible/roles/mongodb/handlers/main.yml b/ansible/roles/mongodb/handlers/main.yml
index d992ee8a82..75dab1a34e 100644
--- a/ansible/roles/mongodb/handlers/main.yml
+++ b/ansible/roles/mongodb/handlers/main.yml
@@ -14,7 +14,7 @@
     privileged: "{{ service.privileged | default(False) }}"
     volumes: "{{ service.volumes }}"
   when:
-    - action != "config"
+    - kolla_action != "config"
     - inventory_hostname in groups[service.group]
     - service.enabled | bool
     - config_json.changed | bool
diff --git a/ansible/roles/mongodb/tasks/config.yml b/ansible/roles/mongodb/tasks/config.yml
index 0236d1b09f..40061b9fbe 100644
--- a/ansible/roles/mongodb/tasks/config.yml
+++ b/ansible/roles/mongodb/tasks/config.yml
@@ -50,7 +50,7 @@
     volumes: "{{ item.value.volumes }}"
   register: check_mongodb_containers
   when:
-    - action != "config"
+    - kolla_action != "config"
     - inventory_hostname in groups[item.value.group]
     - item.value.enabled | bool
   with_dict: "{{ mongodb_services }}"
diff --git a/ansible/roles/neutron/handlers/main.yml b/ansible/roles/neutron/handlers/main.yml
index fe18ad8d41..4692d4e33d 100644
--- a/ansible/roles/neutron/handlers/main.yml
+++ b/ansible/roles/neutron/handlers/main.yml
@@ -312,7 +312,7 @@
     volumes: "{{ service.volumes }}"
     privileged: "{{ service.privileged | default(False) }}"
   when:
-    - action != "config"
+    - kolla_action != "config"
     - service.enabled | bool
     - service.host_in_groups | bool
     - config_json | changed
diff --git a/ansible/roles/prometheus/handlers/main.yml b/ansible/roles/prometheus/handlers/main.yml
index be79e58d2f..37369b811f 100644
--- a/ansible/roles/prometheus/handlers/main.yml
+++ b/ansible/roles/prometheus/handlers/main.yml
@@ -12,7 +12,7 @@
     image: "{{ service.image }}"
     volumes: "{{ service.volumes }}"
   when:
-    - action != "config"
+    - kolla_action != "config"
     - inventory_hostname in groups[service.group]
     - service.enabled | bool
     - config_json.changed | bool
@@ -33,7 +33,7 @@
     pid_mode: "{{ service.pid_mode | default(emit) }}"
     volumes: "{{ service.volumes }}"
   when:
-    - action != "config"
+    - kolla_action != "config"
     - inventory_hostname in groups[service.group]
     - service.enabled | bool
     - config_json.changed | bool
@@ -52,7 +52,7 @@
     image: "{{ service.image }}"
     volumes: "{{ service.volumes }}"
   when:
-    - action != "config"
+    - kolla_action != "config"
     - inventory_hostname in groups[service.group]
     - service.enabled | bool
     - config_json.changed | bool
@@ -72,7 +72,7 @@
     image: "{{ service.image }}"
     volumes: "{{ service.volumes }}"
   when:
-    - action != "config"
+    - kolla_action != "config"
     - inventory_hostname in groups[service.group]
     - service.enabled | bool
     - config_json.changed | bool
diff --git a/ansible/roles/prometheus/tasks/config.yml b/ansible/roles/prometheus/tasks/config.yml
index 3d8ce5e13f..286ff4af62 100644
--- a/ansible/roles/prometheus/tasks/config.yml
+++ b/ansible/roles/prometheus/tasks/config.yml
@@ -66,7 +66,7 @@
     volumes: "{{ item.value.volumes }}"
   register: check_prometheus_containers
   when:
-    - action != "config"
+    - kolla_action != "config"
     - inventory_hostname in groups[item.value.group]
     - item.value.enabled | bool
   with_dict: "{{ prometheus_services }}"
diff --git a/ansible/roles/prometheus/tasks/main.yml b/ansible/roles/prometheus/tasks/main.yml
index b017e8b4ad..49a33b8492 100644
--- a/ansible/roles/prometheus/tasks/main.yml
+++ b/ansible/roles/prometheus/tasks/main.yml
@@ -1,2 +1,2 @@
 ---
-- include: "{{ action }}.yml"
+- include: "{{ kolla_action }}.yml"
diff --git a/ansible/roles/zookeeper/handlers/main.yml b/ansible/roles/zookeeper/handlers/main.yml
index 3ba27a0c15..1c73c7992b 100644
--- a/ansible/roles/zookeeper/handlers/main.yml
+++ b/ansible/roles/zookeeper/handlers/main.yml
@@ -15,7 +15,7 @@
     environment: "{{ service.environment }}"
     volumes: "{{ service.volumes }}"
   when:
-    - action != "config"
+    - kolla_action != "config"
     - inventory_hostname in groups[service.group]
     - service.enabled | bool
     - config_json.changed | bool
diff --git a/ansible/roles/zookeeper/tasks/config.yml b/ansible/roles/zookeeper/tasks/config.yml
index b69c5b19e5..c389721e94 100644
--- a/ansible/roles/zookeeper/tasks/config.yml
+++ b/ansible/roles/zookeeper/tasks/config.yml
@@ -68,7 +68,7 @@
     environment: "{{ item.value.environment }}"
   register: check_zookeeper_containers
   when:
-    - action != "config"
+    - kolla_action != "config"
     - inventory_hostname in groups[item.value.group]
     - item.value.enabled | bool
   with_dict: "{{ zookeeper_services }}"
diff --git a/ansible/roles/zookeeper/tasks/main.yml b/ansible/roles/zookeeper/tasks/main.yml
index b017e8b4ad..49a33b8492 100644
--- a/ansible/roles/zookeeper/tasks/main.yml
+++ b/ansible/roles/zookeeper/tasks/main.yml
@@ -1,2 +1,2 @@
 ---
-- include: "{{ action }}.yml"
+- include: "{{ kolla_action }}.yml"