added {{ host_group }} to all setup plays for consistency

This commit is contained in:
Kevin Carter 2014-09-02 21:46:17 -05:00
parent 8f7be6fe0c
commit 999de2851d
7 changed files with 12 additions and 9 deletions

View File

@ -14,7 +14,7 @@
# limitations under the License.
# Example usage:
# ansible-playbook -i inventory/dynamic_inventory.py -e "host_name=infra1,container_name=horizon_container" setup/archive-container.yml
# ansible-playbook -i inventory/dynamic_inventory.py -e "host_group=infra1,container_name=horizon_container" setup/archive-container.yml
# This will create a new archive of an existing container and then retreve
# the container storing the archive on the local system. Once the archive
@ -30,7 +30,7 @@
- name: Print information on all containers
debug: var=lxc_facts
- hosts: "{{ host_name|default('hosts') }}"
- hosts: "{{ host_group|default('hosts') }}"
user: root
roles:
- container_archive

View File

@ -18,6 +18,7 @@
roles:
- container_create
vars:
container_groups: "{{ groups[hostvars[inventory_hostname]['container_types']] }}"
default_container_groups: "{{ groups[hostvars[inventory_hostname]['container_types']] }}"
container_groups: "{{ container_group|default(default_container_groups) }}"
- include: containers-setup.yml

View File

@ -14,8 +14,8 @@
# limitations under the License.
# Example usage:
# ansible-playbook -i inventory/hosts -M library/lxc -e "group=infra1-keystone name=keystone new_name=keystone2 address=192.168.18.149" clone-container.yml
- hosts: "{{ group }}"
# ansible-playbook -i inventory/hosts -M library/lxc -e "host_group=infra1-keystone name=keystone new_name=keystone2 address=192.168.18.149" clone-container.yml
- hosts: "{{ host_group }}"
user: root
roles:
- container_clone

View File

@ -20,7 +20,8 @@
vars_files:
- vars/config_vars/container_interfaces.yml
vars:
container_groups: "{{ groups[hostvars[inventory_hostname]['container_types']] }}"
default_container_groups: "{{ groups[hostvars[inventory_hostname]['container_types']] }}"
container_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"

View File

@ -14,7 +14,7 @@
# limitations under the License.
# This playbook deploys All Containers.
- hosts: hosts
- hosts: "{{ host_group|default('hosts') }}"
user: root
gather_facts: false
roles:

View File

@ -19,4 +19,5 @@
roles:
- container_restart
vars:
container_groups: "{{ groups[hostvars[inventory_hostname]['container_types']] }}"
default_container_groups: "{{ groups[hostvars[inventory_hostname]['container_types']] }}"
container_groups: "{{ container_group|default(default_container_groups) }}"

View File

@ -13,7 +13,7 @@
# limitations under the License.
# This playbook deploys All Containers.
- hosts: hosts
- hosts: "{{ host_group|default('hosts') }}"
user: root
roles:
- safe_upgrade