From b24202f6a45afadd72f6803e5bc624034b0f5053 Mon Sep 17 00:00:00 2001 From: Guillaume Abrioux Date: Mon, 11 Feb 2019 12:00:25 +0100 Subject: [PATCH] facts: move two set_fact into ceph-facts those two set_fact tasks should be moved in ceph-facts. Signed-off-by: Guillaume Abrioux --- roles/ceph-facts/tasks/facts.yml | 12 ++++++++++++ roles/ceph-infra/tasks/setup_ntp.yml | 11 ----------- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/roles/ceph-facts/tasks/facts.yml b/roles/ceph-facts/tasks/facts.yml index 4da150627..16e5d2c0b 100644 --- a/roles/ceph-facts/tasks/facts.yml +++ b/roles/ceph-facts/tasks/facts.yml @@ -258,3 +258,15 @@ with_sequence: start=0 end={{ radosgw_num_instances|int - 1 }} when: - inventory_hostname in groups.get(rgw_group_name, []) + +- name: set ntp service name depending on OS family + block: + - name: set ntp service name for Debian family + set_fact: + ntp_service_name: ntp + when: ansible_os_family == 'Debian' + + - name: set ntp service name for Red Hat family + set_fact: + ntp_service_name: ntpd + when: ansible_os_family in ['RedHat', 'Suse'] diff --git a/roles/ceph-infra/tasks/setup_ntp.yml b/roles/ceph-infra/tasks/setup_ntp.yml index c46d57de7..485da72ac 100644 --- a/roles/ceph-infra/tasks/setup_ntp.yml +++ b/roles/ceph-infra/tasks/setup_ntp.yml @@ -1,15 +1,4 @@ --- -- name: set ntp service name depending on OS family - block: - - name: set ntp service name for Debian family - set_fact: - ntp_service_name: ntp - when: ansible_os_family == 'Debian' - - name: set ntp service name for Red Hat family - set_fact: - ntp_service_name: ntpd - when: ansible_os_family in ['RedHat', 'Suse'] - # Installation of NTP daemons needs to be a separate task since installations # can't happen on Atomic - name: install the ntp daemon