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']