From 962155e4635e7a7163c1f1d0363ef18613be38e7 Mon Sep 17 00:00:00 2001 From: Spencer Smith Date: Thu, 12 May 2016 09:06:31 -0700 Subject: [PATCH] updated names and removed checks for rhel, as we already know we have systemd inside that play --- roles/docker/tasks/systemd-proxies.yml | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/roles/docker/tasks/systemd-proxies.yml b/roles/docker/tasks/systemd-proxies.yml index 10fafb618..38bbd716d 100644 --- a/roles/docker/tasks/systemd-proxies.yml +++ b/roles/docker/tasks/systemd-proxies.yml @@ -1,21 +1,17 @@ --- -- name: create docker service directory for RHEL family +- name: create docker service directory for systemd file: path=/etc/systemd/system/docker.service.d state=directory - when: ansible_distribution in ["CentOS","RedHat"] and - ansible_distribution_major_version >= 7 -- name: drop docker environment for RHEL family +- name: drop docker environment conf to enable proxy usage template: src: http-proxy.conf.j2 dest: /etc/systemd/system/docker.service.d/http-proxy.conf - when: ansible_distribution in ["CentOS","RedHat"] and - ansible_distribution_major_version >= 7 - register: rheldockerproxy + register: systemddockerproxy -- name: reload systemctl daemons for RHEL family +- name: reload systemctl daemons shell: systemctl daemon-reload - when: rheldockerproxy.changed + when: systemddockerproxy.changed -- name: restart docker for RHEL family +- name: restart docker so configs are applies service: name=docker state=restarted - when: rheldockerproxy.changed + when: systemddockerproxy.changed