From 8e1940d47a19253cf0873f19590b6899b987ae0f Mon Sep 17 00:00:00 2001 From: James Benson Date: Thu, 20 Jul 2017 09:54:54 -0500 Subject: [PATCH] ntpd behind proxy fails Change-Id: I0447e90f53f9b04315bc4e6618e528351521e05d Closes-Bug: #1705558 --- ansible/roles/baremetal/defaults/main.yml | 2 ++ ansible/roles/baremetal/tasks/post-install.yml | 17 +++++++++++++---- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/ansible/roles/baremetal/defaults/main.yml b/ansible/roles/baremetal/defaults/main.yml index 64710701cf..a62df02ec5 100644 --- a/ansible/roles/baremetal/defaults/main.yml +++ b/ansible/roles/baremetal/defaults/main.yml @@ -9,6 +9,8 @@ customize_etc_hosts: True create_kolla_user: True +enable_host_ntp: True + docker_storage_driver: "" debian_pkg_install: diff --git a/ansible/roles/baremetal/tasks/post-install.yml b/ansible/roles/baremetal/tasks/post-install.yml index c8a6bc2320..64fc6f3a5f 100644 --- a/ansible/roles/baremetal/tasks/post-install.yml +++ b/ansible/roles/baremetal/tasks/post-install.yml @@ -66,18 +66,23 @@ name: ntp state: stopped become: True - when: ansible_os_family == "Debian" + when: + - ansible_os_family == "Debian" + - enable_host_ntp | bool - name: Stop time service service: name: ntpd state: stopped become: True - when: ansible_os_family == "RedHat" + when: + - ansible_os_family == "RedHat" + - enable_host_ntp | bool - name: Synchronizing time one-time command: ntpd -gq become: True + when: enable_host_ntp | bool - name: Start time sync service service: @@ -85,7 +90,9 @@ state: started enabled: yes become: True - when: ansible_os_family == "Debian" + when: + - ansible_os_family == "Debian" + - enable_host_ntp | bool - name: Start time sync service service: @@ -93,7 +100,9 @@ state: started enabled: yes become: True - when: ansible_os_family == "RedHat" + when: + - ansible_os_family == "RedHat" + - enable_host_ntp | bool - name: Reboot command: reboot -f