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

Ubuntu 22.04 vars file missing? #619

Closed
jash-worth opened this issue Jan 20, 2023 · 1 comment
Closed

Ubuntu 22.04 vars file missing? #619

jash-worth opened this issue Jan 20, 2023 · 1 comment

Comments

@jash-worth
Copy link

Hey, not sure if I am looking in the wrong places, but I am unable to find the ansible config files for Ubuntu 22.04.
Looks like it is mentioned in /ansible-collection-hardening/blob/master/.github/workflows/os_hardening.yml though?
Am I missing something?
Thanks

@rndmh3ro
Copy link
Member

Hi!

The vars-file is not missing, it's not needed (for now), because the Debian-vars are used for Ubuntu: https://github.com/dev-sec/ansible-collection-hardening/blob/master/roles/os_hardening/vars/Debian.yml

We load all for the OS needed vars-files dynamically and create OS-specific files only, when the contents differ. So the configuration for all Debian and Ubuntu versions is currently the sam.e

- name: Fetch OS dependent variables
  include_vars:
    file: '{{ item }}'
    name: 'os_vars'
  with_first_found:
    - files:
        - '{{ ansible_facts.distribution }}_{{ ansible_facts.distribution_major_version }}.yml'
        - '{{ ansible_facts.distribution }}.yml'
        - '{{ ansible_facts.os_family }}_{{ ansible_facts.distribution_major_version }}.yml'
        - '{{ ansible_facts.os_family }}.yml'
      skip: true
  tags: always

A counter-example: Redhat 7 has some specific settings (compared to RHEL8), that's why it has its own file.

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

2 participants