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

[os-hardening] libpam-modules version check for the "Configure tally2" breaks with newer version. #665

Open
Stanislasss opened this issue Apr 21, 2023 · 0 comments
Labels

Comments

@Stanislasss
Copy link

Description

When running the os.hardening playbook with default configuration, the step:

TASK [devsec.hardening.os_hardening : Configure tally2]

Throw the followring error:

fatal: [chemocompile.mvz-eichsfeld]: FAILED! => {"msg": "The conditional check 'ansible_facts.packages['libpam-modules'][0].version is version('1.4.0', '<')' failed. The error was: name 'PEP440Version' is not defined\n\nThe error appears to be in '/home/mps/offsite_ithaca/playbooks/chemocompile/collections/ansible_collections/devsec/hardening/roles/os_hardening/tasks/pam_debian.yml': line 32, column 7, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n  block:\n    - name: Configure tally2\n      ^ here\n"}

Why is this version check set on lower than 1.40?
The current latest release seems to be 1.5.2-6.
Our System version is 1.4.0-11ubuntu2.3.

This forces us to deactivate the libpam configuration for the moment which is not ideal.

Let me know if you need more info.

Thanking you in advance for the support. 😉

Reproduction steps

Run the collection with default settings on Ubuntu 22.04 with libpam version `1.4.0-11ubuntu2.3`.

Current Behavior

TASK [devsec.hardening.os_hardening : Configure tally2] ******************************************************************************************************************************************************************************************************
fatal: [chemocompile.mvz-eichsfeld]: FAILED! => {"msg": "The conditional check 'ansible_facts.packages['libpam-modules'][0].version is version('1.4.0', '<')' failed. The error was: name 'PEP440Version' is not defined\n\nThe error appears to be in '/home/mps/offsite_ithaca/playbooks/chemocompile/collections/ansible_collections/devsec/hardening/roles/os_hardening/tasks/pam_debian.yml': line 32, column 7, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n block:\n - name: Configure tally2\n ^ here\n"}

Expected Behavior

TASK [devsec.hardening.os_hardening : Configure tally2] ******************************************************************************************************************************************************************************************************
ok: [MY_HOST]

OS / Environment

Ubuntu 22.04.2 LTS
Linux chemocompile-mvz-eichsfeld 5.15.0-70-generic #77-Ubuntu SMP Tue Mar 21 14:02:37 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux

Ansible Version

ansible-playbook [core 2.14.1]
  config file = None
  configured module search path = ['/home/mps/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/local/lib/python3.10/dist-packages/ansible
  ansible collection location = /home/mps/.ansible/collections:/usr/share/ansible/collections
  executable location = /usr/local/bin/ansible-playbook
  python version = 3.10.6 (main, Mar 10 2023, 10:55:28) [GCC 11.3.0] (/usr/bin/python3)
  jinja version = 3.0.3
  libyaml = True

Collection Version

8.4.0

Additional information

...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant