From 7ad552311325f53b1af6cfc625c16734578abc64 Mon Sep 17 00:00:00 2001 From: Vijay Katam Date: Thu, 10 Aug 2017 13:49:14 -0700 Subject: [PATCH] restrict rpm query to redhat --- roles/docker/tasks/systemd.yml | 2 +- roles/docker/templates/docker.service.j2 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/roles/docker/tasks/systemd.yml b/roles/docker/tasks/systemd.yml index 88b80c6e0..6880d9e27 100644 --- a/roles/docker/tasks/systemd.yml +++ b/roles/docker/tasks/systemd.yml @@ -13,7 +13,7 @@ - name: get systemd version command: rpm -q --qf '%{V}\n' systemd register: systemd_version - when: not (ansible_os_family in ["CoreOS", "Container Linux by CoreOS"] or is_atomic) + when: ansible_os_family == "RedHat" and not is_atomic - name: Write docker.service systemd file template: diff --git a/roles/docker/templates/docker.service.j2 b/roles/docker/templates/docker.service.j2 index c8951fa8e..29a80c107 100644 --- a/roles/docker/templates/docker.service.j2 +++ b/roles/docker/templates/docker.service.j2 @@ -24,7 +24,7 @@ ExecStart={{ docker_bin_dir }}/docker daemon \ $DOCKER_NETWORK_OPTIONS \ $DOCKER_DNS_OPTIONS \ $INSECURE_REGISTRY -{% if systemd_version.stdout|int >= 226 %} +{% if ansible_os_family == "RedHat" and systemd_version.stdout|int >= 226 %} TasksMax=infinity {% endif %} LimitNOFILE=1048576