$ ansible --version
ansible 2.3.1.0
config file = /etc/ansible/ansible.cfg
configured module search path = Default w/o overrides
python version = 2.7.14 (default, Oct 2 2017, 09:52:26) [GCC 4.2.1
Compatible OpenBSD Clang 4.0.0 (tags/RELEASE_400/final)]
I'm working on a role to manage NTP client setup on target hosts and
am confused about how to handle something. On recent Debian Linux
hosts, systemd is the service manager. I want to run the OpenNTPD
daemon with the "-s" argument, so in the task I add it in the
arguments parameter as shown below:
- name: enable ntp service
service:
name: '{{ ntpd_service_name }}'
enabled: '{{ ntpd_service_enabled }}'
state: '{{ ntpd_service_state }}'
arguments: '{% if ntpd_step_time %}-s{%endif %}'
use: '{{ ntpd_service_mgr }}'
tags: [ntp]
When the task runs it notes that systemd does not use the arguments parameter:
TASK [ntp_client : enable ntp service]