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

Unsupported parameters for (ansible.builtin.user) module #650

Closed
MaxPowers1337 opened this issue Mar 8, 2023 · 4 comments · Fixed by #657
Closed

Unsupported parameters for (ansible.builtin.user) module #650

MaxPowers1337 opened this issue Mar 8, 2023 · 4 comments · Fixed by #657

Comments

@MaxPowers1337
Copy link

MaxPowers1337 commented Mar 8, 2023

Description

Task "Set password ageing for existing regular (non-system, non-root) accounts" fails on fresh ubuntu 22.04.

ansible-galaxy collection install devsec.hardening
- hosts: localhost
  collections:
    - devsec.hardening
  roles:
    - os_hardening
    - ssh_hardening
  vars:
    sysctl_overwrite:
      # Enable IPv4 traffic forwarding for docker.
      net.ipv4.ip_forward: 1`

Reproduction steps

1. Fresh install of ubuntu 22.04
2. run os and ssh hardening roles in version 8.60

Current Behavior

TASK [devsec.hardening.os_hardening : Set password ageing for existing regular (non-system, non-root) accounts] ********************************************************************************************* failed: [localhost] (item=fallback) => {"ansible_loop_var": "item", "changed": false, "item": "fallback", "msg": "Unsupported parameters for (ansible.builtin.user) module: password_expire_max, password_expire_min Supported parameters include: append, authorization, comment, create_home, expires, force, generate_ssh_key, group, groups, hidden, home, local, login_class, move_home, name, non_unique, password, password_lock, profile, remove, role, seuser, shell, skeleton, ssh_key_bits, ssh_key_comment, ssh_key_file, ssh_key_passphrase, ssh_key_type, state, system, uid, update_password"}

Expected Behavior

no error :)

OS / Environment

$ uname -a
Linux mydomain 5.15.0-67-generic #74-Ubuntu SMP Wed Feb 22 14:14:39 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux

$ cat /etc/os-release 
PRETTY_NAME="Ubuntu 22.04.2 LTS"
NAME="Ubuntu"
VERSION_ID="22.04"
VERSION="22.04.2 LTS (Jammy Jellyfish)"
VERSION_CODENAME=jammy
ID=ubuntu
ID_LIKE=debian
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
UBUNTU_CODENAME=jammy

Ansible Version

$ ansible --version
ansible 2.10.8
  config file = None
  configured module search path = ['/root/.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.10.6 (main, Nov 14 2022, 16:10:14) [GCC 11.3.0]

Collection Version

$ ansible-galaxy collection list | grep dev
devsec.hardening  8.6.0

Additional information

...

@rndmh3ro
Copy link
Member

rndmh3ro commented Mar 8, 2023

The installed version 2.10.8 is out of support from ansible.
we can check if we could work around this but generally you should install a supported version.

@MaxPowers1337
Copy link
Author

MaxPowers1337 commented Mar 8, 2023 via email

@koolwilly72
Copy link

Is this issue resolved now?

@airglow923
Copy link

airglow923 commented Jun 6, 2023

Hi @koolwilly72, ansible from system repositories can be outdated. You can install the latest version from pip.

$ pip3 install ansible

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

Successfully merging a pull request may close this issue.

5 participants