From 8025799fe68370cab9bb5c20a5baaf1cf5ff8996 Mon Sep 17 00:00:00 2001 From: Yifei Xue Date: Fri, 22 Dec 2017 09:57:50 +0800 Subject: [PATCH] Fix the path of chrony.keys The path of chrony.keys on CentOS is different from the one on Ubuntu. So change the definition of keyfile to use variable defined in vars. Change-Id: Ibb54318d5fff452857d917e3b13af6bae26a1b55 Signed-off-by: Yifei Xue --- templates/chrony.conf.j2 | 2 +- vars/debian.yml | 1 + vars/redhat.yml | 1 + vars/suse.yml | 1 + 4 files changed, 4 insertions(+), 1 deletion(-) diff --git a/templates/chrony.conf.j2 b/templates/chrony.conf.j2 index 968abfb2..d7a6c8f1 100644 --- a/templates/chrony.conf.j2 +++ b/templates/chrony.conf.j2 @@ -27,7 +27,7 @@ server {{ ntp_server }} offline maxpoll 10 minpoll 8 # password is generated by a random process at install time. You may # change it if you wish. -keyfile /etc/chrony/chrony.keys +keyfile {{ chrony_key_file }} # Set runtime command key. Note that if you change the key (not the # password) to anything other than 1 you will need to edit diff --git a/vars/debian.yml b/vars/debian.yml index e89dffc4..1c5f1893 100644 --- a/vars/debian.yml +++ b/vars/debian.yml @@ -34,6 +34,7 @@ aide_cron_job_path: /etc/cron.daily/aide aide_database_file: /var/lib/aide/aide.db aide_database_out_file: /var/lib/aide/aide.db.new chrony_conf_file: /etc/chrony/chrony.conf +chrony_key_file: /etc/chrony/chrony.keys daemon_init_params_file: /etc/init.d/rc # Service name diff --git a/vars/redhat.yml b/vars/redhat.yml index 9949e871..8831b76b 100644 --- a/vars/redhat.yml +++ b/vars/redhat.yml @@ -30,6 +30,7 @@ aide_cron_job_path: /etc/cron.d/aide aide_database_file: /var/lib/aide/aide.db.gz aide_database_out_file: /var/lib/aide/aide.db.new.gz chrony_conf_file: /etc/chrony.conf +chrony_key_file: /etc/chrony.keys daemon_init_params_file: /etc/init.d/functions pkg_mgr_config: "{{ (ansible_pkg_mgr == 'yum') | ternary('/etc/yum.conf', '/etc/dnf/dnf.conf') }}" diff --git a/vars/suse.yml b/vars/suse.yml index f9ec6f35..6a7203d1 100644 --- a/vars/suse.yml +++ b/vars/suse.yml @@ -32,6 +32,7 @@ aide_cron_job_path: /etc/cron.daily/aide aide_database_file: /var/lib/aide/aide.db aide_database_out_file: /var/lib/aide/aide.db.new chrony_conf_file: /etc/chrony.conf +chrony_key_file: /etc/chrony.keys daemon_init_params_file: /etc/rc.status pkg_mgr_config: /etc/zypp/zypp.conf