ansible-role-users icon indicating copy to clipboard operation
ansible-role-users copied to clipboard

User can not be created in Ubuntu 16.04

Open s4kharitonov opened this issue 1 year ago • 2 comments

Proposed feature

Hello. Please add: xenial: "#includedir /etc/sudoers.d" to _users_sudo_includedir in vars/main.yml for example:

_users_sudo_includedir:
  default: "@includedir /etc/sudoers.d"
  Amazon: "#includedir /etc/sudoers.d"
  Debian:
    focal: "#includedir /etc/sudoers.d"
    bionic: "#includedir /etc/sudoers.d"
    xenial: "#includedir /etc/sudoers.d"
    buster: "#includedir /etc/sudoers.d"
  RedHat:
    "8": "#includedir /etc/sudoers.d"
    "7": "#includedir /etc/sudoers.d"

Rationale

This task fails: TASK [robertdebock.users : Ensure the /etc/sudoers.d directory is included]

fatal: [redacted]: FAILED! => {
    "changed": false,
    "invocation": {
        "module_args": {
            "attributes": null,
            "backrefs": false,
            "backup": false,
            "create": false,
            "firstmatch": false,
            "group": null,
            "insertafter": null,
            "insertbefore": null,
            "line": "@includedir /etc/sudoers.d",
            "mode": null,
            "owner": null,
            "path": "/etc/sudoers",
            "regexp": "^(@|#)includedir",
            "search_string": null,
            "selevel": null,
            "serole": null,
            "setype": null,
            "seuser": null,
            "state": "present",
            "unsafe_writes": false,
            "validate": "visudo --check --file %s"
        }
    },
    "msg": "failed to validate: rc:1 error:>>> /home/redacted/.ansible/tmp/ansible-tmp-1721128401.221945-78415-271275848602161/tmpqe3t1sn5: syntax error near line 20 <<<\n"
}

"@includedir /etc/sudoers.d"

Additional context

Add any other context about the feature request here.

Please consider sponsoring me.

s4kharitonov avatar Jul 16 '24 11:07 s4kharitonov

We also found old Debian/stretch systems, where the line "#includedir /etc/sudoers.d" is needed instead.

It would be nice to have this included too, although we can work around that locally.

Thx, @robert-de-bock, for maintaining all the ansible roles! ❤️

jkirk avatar Aug 30 '24 13:08 jkirk

@robertdebock Can you add it? It's not look difficult and ubuntu 16.04 with Pro subscription still gets security patches

s4kharitonov avatar Jan 20 '25 15:01 s4kharitonov