From cc9ae15a6b2c62f901ffb84caa0aa486f5e39bfc Mon Sep 17 00:00:00 2001 From: Andy McCrae Date: Wed, 3 Sep 2014 16:17:58 +0100 Subject: [PATCH] Fix container_group var for container playbooks Following on from #61, the container_group has to be specified each time, this patch fixes that. * Set the groups for "container_groups" appropriately --- rpc_deployment/playbooks/setup/build-containers.yml | 4 ++-- rpc_deployment/playbooks/setup/containers-setup.yml | 4 ++-- rpc_deployment/playbooks/setup/destroy-containers.yml | 4 ++-- rpc_deployment/playbooks/setup/restart-containers.yml | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/rpc_deployment/playbooks/setup/build-containers.yml b/rpc_deployment/playbooks/setup/build-containers.yml index f3c296164e..d89d3e4fe5 100644 --- a/rpc_deployment/playbooks/setup/build-containers.yml +++ b/rpc_deployment/playbooks/setup/build-containers.yml @@ -18,7 +18,7 @@ roles: - container_create vars: - default_container_groups: "{{ groups[hostvars[inventory_hostname]['container_types']] }}" - container_groups: "{{ groups[container_group]|default(default_container_groups) }}" + default_container_groups: "{{ hostvars[inventory_hostname]['container_types'] }}" + container_groups: "{{ groups[container_group|default(default_container_groups)] }}" - include: containers-setup.yml diff --git a/rpc_deployment/playbooks/setup/containers-setup.yml b/rpc_deployment/playbooks/setup/containers-setup.yml index 4438cb08d0..398d93b164 100644 --- a/rpc_deployment/playbooks/setup/containers-setup.yml +++ b/rpc_deployment/playbooks/setup/containers-setup.yml @@ -20,8 +20,8 @@ vars_files: - vars/config_vars/container_interfaces.yml vars: - default_container_groups: "{{ groups[hostvars[inventory_hostname]['container_types']] }}" - container_groups: "{{ groups[container_group]|default(default_container_groups) }}" + default_container_groups: "{{ hostvars[inventory_hostname]['container_types'] }}" + container_groups: "{{ groups[container_group|default(default_container_groups)] }}" required_container_config_options: - "lxc.mount.entry=/openstack/log/{{ hostvars[item]['container_name'] }} var/log/{{ hostvars[item]['service_name'] }} none defaults,bind,rw 0 0" - "lxc.mount.entry=/openstack/monitoring monitoring none defaults,bind,rw 0 0" diff --git a/rpc_deployment/playbooks/setup/destroy-containers.yml b/rpc_deployment/playbooks/setup/destroy-containers.yml index 16cf16b0a1..732085bd83 100644 --- a/rpc_deployment/playbooks/setup/destroy-containers.yml +++ b/rpc_deployment/playbooks/setup/destroy-containers.yml @@ -19,5 +19,5 @@ roles: - container_destroy vars: - default_container_groups: "{{ groups[hostvars[inventory_hostname]['container_types']] }}" - container_groups: "{{ groups[container_group]|default(default_container_groups) }}" + default_container_groups: "{{ hostvars[inventory_hostname]['container_types'] }}" + container_groups: "{{ groups[container_group|default(default_container_groups)] }}" diff --git a/rpc_deployment/playbooks/setup/restart-containers.yml b/rpc_deployment/playbooks/setup/restart-containers.yml index 49b292443f..a6ea07a259 100644 --- a/rpc_deployment/playbooks/setup/restart-containers.yml +++ b/rpc_deployment/playbooks/setup/restart-containers.yml @@ -19,5 +19,5 @@ roles: - container_restart vars: - default_container_groups: "{{ groups[hostvars[inventory_hostname]['container_types']] }}" - container_groups: "{{ groups[container_group]|default(default_container_groups) }}" + default_container_groups: "{{ hostvars[inventory_hostname]['container_types'] }}" + container_groups: "{{ groups[container_group|default(default_container_groups)] }}"