geerlingguy / ansible-role-ntp

Ansible Role - NTP
https://galaxy.ansible.com/geerlingguy/ntp/
MIT License
319 stars 243 forks source link

Restart crond when timezone is changed #68

Closed xescab closed 4 years ago

xescab commented 4 years ago

This PR is related to #60 , but fixes some merge conflicts. Could you pelase review it and merge it? Thanks!

As mentioned in issue #15 , as per https://docs.ansible.com/ansible/timezone_module.html#synopsis, it is recommended to restart crond if the timezone is changed.

This fix detect if cron service is running and then restarts it if needed.

geerlingguy commented 4 years ago

Not every server running NTP would also be running a cron daemon, so I'd rather make this a configurable (but disabled by default) option.

So adding a when condition to restart cron based on a variable like ntp_cron_handler_enabled, then also set ntp_cron_daemon: '' by default, and in the README add those variables and explain how they work together.

xescab commented 4 years ago

Wouldn't it be better to leave the ntp_cron_daemon as an OS-dependent variable?

stale[bot] commented 4 years ago

This pull request has been marked 'stale' due to lack of recent activity. If there is no further activity, the PR will be closed in another 30 days. Thank you for your contribution!

Please read this blog post to see the reasons why I mark pull requests as stale.

xescab commented 4 years ago

Jeff, can you take another look at this PR? All checks have passed.

stale[bot] commented 4 years ago

This issue is no longer marked for closure.