From d75d479263975b5987bfe5985d1e10892539fab8 Mon Sep 17 00:00:00 2001 From: Sam Yaple Date: Mon, 17 Aug 2015 05:03:18 +0000 Subject: [PATCH] Remove start.yml abstraction for kolla-ansible Change-Id: If2e6d5cd5530c1e17f34415e169f82465f8362a1 Partially-Implements: blueprint remove-abstraction-ansible --- ansible/roles/common/defaults/main.yml | 12 +++--------- ansible/roles/common/tasks/start.yml | 22 ++++++++++++++++------ 2 files changed, 19 insertions(+), 15 deletions(-) diff --git a/ansible/roles/common/defaults/main.yml b/ansible/roles/common/defaults/main.yml index e6a59a4fee..2e972e44f4 100644 --- a/ansible/roles/common/defaults/main.yml +++ b/ansible/roles/common/defaults/main.yml @@ -2,12 +2,6 @@ #################### # Docker #################### -docker_ansible_registry: "{{ docker_registry ~ '/' if docker_registry else '' }}" -docker_ansible_namespace: "{{ docker_namespace }}" -kolla_ansible_base_distro: "{{ kolla_base_distro }}" -kolla_ansible_install_type: "{{ kolla_install_type }}" -kolla_ansible_container_name: "kolla-ansible" - -docker_ansible_image: "{{ docker_ansible_registry }}{{ docker_ansible_namespace }}/{{ kolla_ansible_base_distro }}-{{ kolla_ansible_install_type }}-{{ kolla_ansible_container_name }}" -docker_ansible_tag: "{{ openstack_release }}" -docker_ansible_image_full: "{{ docker_ansible_image }}:{{ docker_ansible_tag }}" +ansible_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/{{ kolla_base_distro }}-{{ kolla_install_type }}-kolla-ansible" +ansible_tag: "{{ openstack_release }}" +ansible_image_full: "{{ ansible_image }}:{{ ansible_tag }}" diff --git a/ansible/roles/common/tasks/start.yml b/ansible/roles/common/tasks/start.yml index b63722b97d..13c9a410cb 100644 --- a/ansible/roles/common/tasks/start.yml +++ b/ansible/roles/common/tasks/start.yml @@ -1,9 +1,19 @@ --- -- include: ../../start.yml - vars: - container_command: "/bin/sleep infinity" - container_environment: +- name: Starting Ansible container + docker: + docker_api_version: "{{ docker_api_version }}" + net: host + pull: "{{ docker_pull_policy }}" + restart_policy: "{{ docker_restart_policy }}" + restart_policy_retry: "{{ docker_restart_policy_retry }}" + state: reloaded + registry: "{{ docker_registry }}" + username: "{{ docker_registry_username }}" + password: "{{ docker_registry_password }}" + insecure_registry: "{{ docker_insecure_registry }}" + name: kolla_ansible + image: "{{ ansible_image_full }}" + env: ANSIBLE_NOCOLOR: "1" ANSIBLE_LIBRARY: "/usr/share/ansible" - container_image: "{{ docker_ansible_image_full }}" - container_name: "kolla_ansible" + command: "/bin/sleep infinity"