geerlingguy / ansible-role-ntp

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

Problem with task: Populate service facts #109

Closed chrisvanmeer closed 2 years ago

chrisvanmeer commented 2 years ago

When running the role on Ubuntu 20.04 it gets stuck on Populate service facts

PLAY [localhost] ********************************************************************************************************************************************************************************

TASK [Gathering Facts] **************************************************************************************************************************************************************************
ok: [localhost]

TASK [geerlingguy.ntp : Include OS-specific variables.] *****************************************************************************************************************************************
ok: [localhost]

TASK [geerlingguy.ntp : Set the ntp_driftfile variable.] ****************************************************************************************************************************************
ok: [localhost]

TASK [geerlingguy.ntp : Set the ntp_package variable.] ******************************************************************************************************************************************
ok: [localhost]

TASK [geerlingguy.ntp : Set the ntp_config_file variable.] **************************************************************************************************************************************
ok: [localhost]

TASK [geerlingguy.ntp : Set the ntp_daemon variable.] *******************************************************************************************************************************************
ok: [localhost]

TASK [geerlingguy.ntp : Ensure NTP package is installed.] ***************************************************************************************************************************************
ok: [localhost]

TASK [geerlingguy.ntp : Ensure tzdata package is installed (Linux).] ****************************************************************************************************************************
ok: [localhost]

TASK [geerlingguy.ntp : Set timezone.] **********************************************************************************************************************************************************
ok: [localhost]

TASK [geerlingguy.ntp : Populate service facts.] ************************************************************************************************************************************************
fatal: [localhost]: FAILED! => {"changed": false, "msg": "Malformed output discovered from systemd list-unit-files: accounts-daemon.service                enabled         enabled      "}

PLAY RECAP **************************************************************************************************************************************************************************************
localhost                  : ok=9    changed=0    unreachable=0    failed=1    skipped=0    rescued=0    ignored=0

/etc/lsb-release

DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=20.04
DISTRIB_CODENAME=focal
DISTRIB_DESCRIPTION="Ubuntu 20.04.3 LTS"

Ansible version

ansible 2.9.6
  config file = /etc/ansible/ansible.cfg
  configured module search path = ['/home/ubuntu/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python3/dist-packages/ansible
  executable location = /usr/bin/ansible
  python version = 3.8.10 (default, Sep 28 2021, 16:10:42) [GCC 9.3.0]
chrisvanmeer commented 2 years ago

It seems this is a bug in Ansible 2.9.6.
Upgrading to Ansible 2.9.8 or higher fixes the problem.