From e435042b9beddc87937a998b1587560adbf539f0 Mon Sep 17 00:00:00 2001 From: SamYaple Date: Tue, 5 Jan 2016 17:52:38 +0000 Subject: [PATCH] Allow haproxy role to pull images Change-Id: I094f1d35f60bf566ba7382504a7425f16ae975d8 Partially-Implements: blueprint pre-pull-images --- ansible/roles/haproxy/tasks/deploy.yml | 6 ++++++ ansible/roles/haproxy/tasks/main.yml | 6 +----- ansible/roles/haproxy/tasks/pull.yml | 14 ++++++++++++++ 3 files changed, 21 insertions(+), 5 deletions(-) create mode 100644 ansible/roles/haproxy/tasks/deploy.yml create mode 100644 ansible/roles/haproxy/tasks/pull.yml diff --git a/ansible/roles/haproxy/tasks/deploy.yml b/ansible/roles/haproxy/tasks/deploy.yml new file mode 100644 index 0000000000..ab9215b168 --- /dev/null +++ b/ansible/roles/haproxy/tasks/deploy.yml @@ -0,0 +1,6 @@ +--- +- include: config.yml + when: inventory_hostname in groups['haproxy'] + +- include: start.yml + when: inventory_hostname in groups['haproxy'] diff --git a/ansible/roles/haproxy/tasks/main.yml b/ansible/roles/haproxy/tasks/main.yml index ab9215b168..b017e8b4ad 100644 --- a/ansible/roles/haproxy/tasks/main.yml +++ b/ansible/roles/haproxy/tasks/main.yml @@ -1,6 +1,2 @@ --- -- include: config.yml - when: inventory_hostname in groups['haproxy'] - -- include: start.yml - when: inventory_hostname in groups['haproxy'] +- include: "{{ action }}.yml" diff --git a/ansible/roles/haproxy/tasks/pull.yml b/ansible/roles/haproxy/tasks/pull.yml new file mode 100644 index 0000000000..f005168064 --- /dev/null +++ b/ansible/roles/haproxy/tasks/pull.yml @@ -0,0 +1,14 @@ +--- +- name: Pulling keepalived image + kolla_docker: + action: "pull_image" + common_options: "{{ docker_common_options }}" + image: "{{ keepalived_image_full }}" + when: inventory_hostname in groups['haproxy'] + +- name: Pulling haproxy image + kolla_docker: + action: "pull_image" + common_options: "{{ docker_common_options }}" + image: "{{ haproxy_image_full }}" + when: inventory_hostname in groups['haproxy']