diff --git a/docs/rolereference.rst b/docs/rolereference.rst index 68af373fba627fde71e08d398f3d34d87ceabf68..f4d3912e1371feb0054ad56113422ff47d9d6fda 100644 --- a/docs/rolereference.rst +++ b/docs/rolereference.rst @@ -300,6 +300,8 @@ The role implements the following: custom script that outputs diffs if upgrades are available. Script is run via cronjob on hourly basis, and any output will be delivered to local ``root`` user. +* Optionally configures time synchronisation using NTP (if + ``ntp_servers`` parameter is set). Role dependencies @@ -400,6 +402,19 @@ Parameters higher than ``incoming_connection_limit``), even if it would go above the specified connection limit. +**ntp_servers** (list, optional, ``[]``) + List of NTP servers to use for synchronising the time on managed + machine using NTP. If no time synchronisation should be set-up, set + to empty list. Default is not to configure time synchronisation. + + If setting this parameter, it is recommended to set the list of + servers to list shipped by default Debian configuration:: + + - "0.debian.pool.ntp.org" + - "1.debian.pool.ntp.org" + - "2.debian.pool.ntp.org" + - "3.debian.pool.ntp.org" + **pipreqcheck_uid** (integer, optional, ``whatever OS picks``) UID for user running the pip requirements upgrade checks. User is created with name ``pipreqcheck``. diff --git a/docs/usage.rst b/docs/usage.rst index 436d682702b6076b0e7c163c8fa7f0b061a42bb7..cb1b89768ea7b5e34d4b05a01121b1f74f713624 100644 --- a/docs/usage.rst +++ b/docs/usage.rst @@ -448,6 +448,11 @@ Let's take care of this common configuration right away: common_packages: - emacs24-nox + .. note:: + The ``common`` role comes with ability to set-up time + synchronisation using NTP. This is not done by default. For + details see the role parameter ``ntp_servers``. + 6. That's all for configuration, time to apply the changes:: workon mysite && ansible-playbook playbooks/site.yml diff --git a/testsite/group_vars/all.yml b/testsite/group_vars/all.yml index 874b64cc4cc013cb950fe776d58bfa35e3f162f5..ac10537adf2b5a48cee78d12ab5b7caa804350bc 100644 --- a/testsite/group_vars/all.yml +++ b/testsite/group_vars/all.yml @@ -82,4 +82,11 @@ backup_ssh_key: "{{ lookup('file', inventory_dir + '/ssh/' + ansible_fqdn) }}" # Set-up prompt. prompt_colour: light_purple -prompt_id: MAR \ No newline at end of file +prompt_id: MAR + +# Set-up NTP time synchronisation. +ntp_servers: + - "0.debian.pool.ntp.org" + - "1.debian.pool.ntp.org" + - "2.debian.pool.ntp.org" + - "3.debian.pool.ntp.org"