diff --git a/modules/openstack_project/manifests/server.pp b/modules/openstack_project/manifests/server.pp index c5d001ceb3..0e6066199d 100644 --- a/modules/openstack_project/manifests/server.pp +++ b/modules/openstack_project/manifests/server.pp @@ -19,11 +19,6 @@ class openstack_project::server ( include ::apt } - ########################################################### - # Manage ntp - - include '::ntp' - ########################################################### # Process if ( $high_level_directive ) blocks diff --git a/playbooks/roles/base-server/defaults/main.yaml b/playbooks/roles/base-server/defaults/main.yaml index 570a19838f..dbc13b26c3 100644 --- a/playbooks/roles/base-server/defaults/main.yaml +++ b/playbooks/roles/base-server/defaults/main.yaml @@ -5,6 +5,7 @@ base_packages: - at - git - lvm2 + - ntp - openssh-server - parted - rsync diff --git a/playbooks/roles/base-server/tasks/main.yaml b/playbooks/roles/base-server/tasks/main.yaml index 2ccbf01ca1..fd14067d1e 100644 --- a/playbooks/roles/base-server/tasks/main.yaml +++ b/playbooks/roles/base-server/tasks/main.yaml @@ -60,6 +60,12 @@ src: bash-history.sh dest: /etc/profile.d/bash-history.sh +- name: Ensure NTP service is running + service: + name: "{{ ntp_service_name }}" + enabled: yes + state: started + - name: Include OS-specific tasks include_tasks: "{{ lookup('first_found', file_list) }}" vars: diff --git a/playbooks/roles/base-server/vars/Debian.yaml b/playbooks/roles/base-server/vars/Debian.yaml index 3df5c620b0..a66551d829 100644 --- a/playbooks/roles/base-server/vars/Debian.yaml +++ b/playbooks/roles/base-server/vars/Debian.yaml @@ -5,3 +5,4 @@ distro_packages: - vim-nox sftp_path: /usr/lib/openssh/sftp-server ssh_service_name: ssh +ntp_service_name: ntp diff --git a/playbooks/roles/base-server/vars/RedHat.yaml b/playbooks/roles/base-server/vars/RedHat.yaml index b787d335bd..ce56b09ccf 100644 --- a/playbooks/roles/base-server/vars/RedHat.yaml +++ b/playbooks/roles/base-server/vars/RedHat.yaml @@ -11,3 +11,4 @@ distro_packages: - yum-cron sftp_path: /usr/libexec/openssh/sftp-server ssh_service_name: sshd +ntp_service_name: ntpd diff --git a/playbooks/roles/base-server/vars/Ubuntu.trusty.yaml b/playbooks/roles/base-server/vars/Ubuntu.trusty.yaml index b9c4325a2f..4083e0f933 100644 --- a/playbooks/roles/base-server/vars/Ubuntu.trusty.yaml +++ b/playbooks/roles/base-server/vars/Ubuntu.trusty.yaml @@ -5,3 +5,4 @@ distro_packages: - vim-nox sftp_path: /usr/lib/openssh/sftp-server ssh_service_name: ssh +ntp_service_name: ntp