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

Wrong variable references in task for 5.1.4 (branch benchmark_v2.0.0) #257

Closed
bgro opened this issue Nov 29, 2024 · 2 comments
Closed

Wrong variable references in task for 5.1.4 (branch benchmark_v2.0.0) #257

bgro opened this issue Nov 29, 2024 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@bgro
Copy link
Contributor

bgro commented Nov 29, 2024

Describe the Issue

In branch benchmark_v2.0.0

non-existing variables are referenced in when clauses: ubtu22cis_sshd[XYZ] have
been replaced by variables ubtu22cis_sshd_XYZ.

tasks/section_5/cis_5.1.x.yml:
   86      - name: "5.1.4 | PATCH | Ensure sshd access is configured | Add allowed users"
   87:       when: "ubtu22cis_sshd['allow_users']| default('') | length > 0 "
   88        ansible.builtin.lineinfile:

   95      - name: "5.1.4 | PATCH | Ensure sshd access is configured | Add allowed groups"
   96:       when: "ubtu22cis_sshd['allow_groups']| default('') | length > 0"
   97        ansible.builtin.lineinfile:

  104      - name: "5.1.4 | PATCH | Ensure sshd access is configured | Add deny users"
  105:       when: "ubtu22cis_sshd['deny_users']| default('') | length > 0"
  106        ansible.builtin.lineinfile:

  113      - name: "5.1.4 | PATCH | Ensure sshd access is configured | Add deny groups"
  114:       when: "ubtu22cis_sshd['deny_groups']| default('') | length > 0"
  115        ansible.builtin.lineinfile:

Expected Behavior
Correct variables must be referenced

Actual Behavior
see above

Control(s) Affected
5.1.4
Environment (please complete the following information):

  • branch being used: benchmark_v2.0.0
  • Ansible Version: n/a
  • Host Python Version: n/a
  • Ansible Server Python Version: n/a
@bgro bgro added the bug Something isn't working label Nov 29, 2024
@uk-bolly uk-bolly self-assigned this Nov 29, 2024
uk-bolly added a commit that referenced this issue Nov 29, 2024
Signed-off-by: Mark Bolwell <mark.bollyuk@gmail.com>
@uk-bolly
Copy link
Member

hi @bgro

Thank you as always for your issue and the detailed information you provide it really does help us to keep this updated in a quicker manner.
Thank you again for your keen eye in spotting these missed variables during the renaming (which has been done to allow easier override alot more changes coming).
This is pushed to the branch and in the PR.

Many thanks again

uk-bolly

@bgro
Copy link
Contributor Author

bgro commented Dec 2, 2024

As always very welcome :)

@bgro bgro closed this as completed Dec 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants