geerlingguy / ansible-role-ntp

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

CentOS: Unable to enable service ntpd: Failed to execute operation: Interactive authentication required #52

Closed tobiasehlert closed 6 years ago

tobiasehlert commented 6 years ago

Describe the bug

fatal: [fra1-centos-001]: FAILED! => {
    "changed": false,
    "invocation": {
        "module_args": {
            "daemon_reload": false,
            "enabled": true,
            "force": null,
            "masked": null,
            "name": "ntpd",
            "no_block": false,
            "state": "started",
            "user": false
        }
    },
    "msg": "Unable to enable service ntpd: Failed to execute operation: Interactive authentication required.\n"
}

Installation method/version

ansible 2.6.1

  config file = /home/tobias/.ansible.cfg
  configured module search path = [u'/home/tobias/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python2.7/site-packages/ansible
  executable location = /usr/bin/ansible
  python version = 2.7.5 (default, Jul 13 2018, 13:06:57) [GCC 4.8.5 20150623 (Red Hat 4.8.5-28)]

Targetted hosts Concerns the following OS(es):

Expected behavior The ansible script is supposed to not crash =P

Additional context no configuration changes.. it's right out of the box kind of.

geerlingguy commented 6 years ago

@tobiasehlert - You can use:


  roles:
    - role: geerlingguy.ntp
      become: yes

And your user must be able to use sudo non-interactively (so use the 'ask password' cli option if your user account requires a password to use sudo).