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

TASK [os_hardening : configure auditd | package-08] #410

Closed
Trufax opened this issue Mar 6, 2021 · 1 comment
Closed

TASK [os_hardening : configure auditd | package-08] #410

Trufax opened this issue Mar 6, 2021 · 1 comment

Comments

@Trufax
Copy link

Trufax commented Mar 6, 2021

Describe the bug
When you run os_hardening on a Ubuntu host it stops at task: TASK [os_hardening : configure auditd | package-08]

Expected behavior
TASK [os_hardening : configure auditd | package-08] should be skipped or changed but not crash the full playbook

Actual behavior

TASK [os_hardening : configure auditd | package-08] ****************************
fatal: [10.X.X.XX]: FAILED! => {"changed": false, "msg": "AnsibleUndefinedVariable: 'ansible_role_name' is undefined"}

And than stops with the recap.


Example Playbook



- hosts: all
  remote_user: myuser
  become: yes
  collections:
    - devsec.hardening
  roles:
  - role: os_hardening
    vars:
      sysctl_overwrite:
       # Enable IPv4 traffic forwarding. (OS Hardening) required for Docker
        net.ipv4.ip_forward: 1

OS / Environment

OS Running ansible: Ubuntu 20.10
Target Maschine: Ubuntu 20.10

Ansible Version

2.9.9

Role Version

collection version 7.2.0
@Trufax
Copy link
Author

Trufax commented Mar 6, 2021

Error was related to an outdated Ansible version. Ubuntu 20.10 seems not to support any higher ansible version than 2.9.9

@Trufax Trufax closed this as completed Mar 6, 2021
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

No branches or pull requests

1 participant