Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FAILED! => {"changed": false, "msg": "Malformed output discovered from systemd list-unit-files: apparmor.service enabled"} #669

Closed
ketan-vijayvargiya opened this issue Oct 12, 2020 · 5 comments
Labels
bug invalid This issue is due to incorrect settings by the reporter

Comments

@ketan-vijayvargiya
Copy link

ketan-vijayvargiya commented Oct 12, 2020

Hi,
I am facing the above-mentioned problem while trying to deploy.

Details:

  • OS: Canonical-Ubuntu-20.04-Minimal.
  • Command: ansible-playbook -i inventory/hosts setup.yml --tags=start. (setup-all succeeded earlier.)

Any ideas on how to fix this? (Please let me know if someone needs more details.)

Stack trace:

TASK [matrix-common-after : Ensure Matrix services are started] *********************************************************************************************************************
changed: [matrix.flister.cf] => (item=matrix-mailer)
changed: [matrix.flister.cf] => (item=matrix-postgres)
changed: [matrix.flister.cf] => (item=matrix-synapse)
changed: [matrix.flister.cf] => (item=matrix-client-element)
changed: [matrix.flister.cf] => (item=matrix-ma1sd)
changed: [matrix.flister.cf] => (item=matrix-nginx-proxy)
ok: [matrix.flister.cf] => (item=matrix-coturn)

TASK [matrix-common-after : Wait a bit, so that services can start (or fail)] *******************************************************************************************************
ok: [matrix.flister.cf -> 127.0.0.1]

TASK [matrix-common-after : Populate service facts] *********************************************************************************************************************************
fatal: [matrix.flister.cf]: FAILED! => {"changed": false, "msg": "Malformed output discovered from systemd list-unit-files: apparmor.service                       enabled         enabled      "}

PLAY RECAP **************************************************************************************************************************************************************************
matrix.flister.cf          : ok=18   changed=2    unreachable=0    failed=1    skipped=93   rescued=0    ignored=0   

@ketan-vijayvargiya
Copy link
Author

ubuntu@public-matrix-instance-1090:~/matrix-docker-ansible-deploy$ ansible --version
ansible 2.9.6
  config file = /home/ubuntu/matrix-docker-ansible-deploy/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.5 (default, Jul 28 2020, 12:59:40) [GCC 9.3.0]

I see a few posts on the internet that say that this issue is with Ansible 2.9.6 and upgrading to 2.9.7 should fix the problem. Let me try that out once.

@ketan-vijayvargiya
Copy link
Author

The problem went away once I migrated to 2.10.2 (Apparently, there are no builds beyond 2.9.6 for Ubuntu 20.04-Minimal, so I had to build from source.)

So, it seems like the minimal Ansible version this playbook works with is 2.9.7 - is this something that should be enforced through the version check inherent in the playbook?

In any case, please feel free to close this issue if you'd like.

@spantaleev
Copy link
Owner

It's a problem that happens with a specific (older) Ansible version and new systemd.

If we are to add some check to the playbook, it should try to match against both of these. It may be a bit tricky, so we're not doing it.


Ubuntu 20.04 still ships an old and buggy version of Ansible, even though this has been a known issue for months: https://bugs.launchpad.net/ubuntu/+source/ansible/+bug/1880359

It's not the first time we see such a thing (Ubuntu not updating software, despite known issues). It's even funnier, because 20.04 is labelled as LTS.

I think the proper solution is to avoid horrible distros like Ubuntu, which are obviously not your friend, as they are not even "short-term supported", let alone "long-term supported".

@aaronraimist
Copy link
Contributor

A note on https://github.com/spantaleev/matrix-docker-ansible-deploy/blob/master/docs/prerequisites.md that Ubuntu can work but isn't recommended might not be a bad idea, and maybe another note on https://github.com/spantaleev/matrix-docker-ansible-deploy/blob/master/docs/ansible.md#supported-ansible-versions that Ubuntu ships with a buggy version.

spantaleev added a commit that referenced this issue Oct 15, 2020
@spantaleev
Copy link
Owner

Good idea! I've added some notes via 3fd198e

@luixxiul luixxiul added bug invalid This issue is due to incorrect settings by the reporter labels Nov 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug invalid This issue is due to incorrect settings by the reporter
Projects
None yet
Development

No branches or pull requests

4 participants