Roots Discourse

Malformed output discovered from systemd list-unit-files - ntp populate service facts task

I know there is a similar thread to this, I’ve studied over it and the issue didn’t go away.

I am running Fedora 33

When doing a vagrant up --provision (or vagrant up initially as well), I’m greeted with an error during the task [ntp: Populate service facts] stage.

TASK [ntp : Populate service facts.] *******************************************
System info:
Ansible 2.9.4; Vagrant 2.2.9; Linux
Trellis 1.8.0: February 12th, 2021

Malformed output discovered from systemd list-unit-files: accounts-
daemon.service enabled enabled
fatal: [default]: FAILED! => {“changed”: false}

PLAY RECAP *********************************************************************
default : ok=29 changed=0 unreachable=0 failed=1 skipped=15 rescued=0 ignored=0

Ansible failed to complete successfully. Any error output should be
visible above. Please fix these errors and try again.


My galaxy.yml is completely up to date, I’m using ansible 2.9.4 and this is rolling up a brand new environment so Trellis is the latest release as well.

My galaxy.yml output is:

  • name: composer
    src: geerlingguy.composer
    version: 1.9.0

  • name: ntp
    src: geerlingguy.ntp
    version: 2.2.0

  • name: logrotate
    src: nickhammond.logrotate
    version: v0.0.5

  • name: swapfile
    src: oefenweb.swapfile
    version: v2.0.32

  • name: mailhog
    src: geerlingguy.mailhog
    version: 2.2.0

To add as well in ntp/tasks/main.yml is the populate service facts task

  • name: Populate service facts.
    service_facts:

Service facts appear to be empty but this could be intended.

Has anyone else run into this issue before?

Thanks

Upgrading to ansible 3.0.0 solved it. It was due to a new table column being added to the list-unit-files output

systemctl list-unit-files --no-pager --type service --all | grep -E ‘accounts|^UNIT’ provides a new column called VENDOR PRESET which causes an issue in processing the role Populate service facts.

This topic was automatically closed after 42 days. New replies are no longer allowed.