Skip to content

Commit

Permalink
Gather facts when os_hardening role is executed with tags (#708)
Browse files Browse the repository at this point in the history
* Gather facts when os_hardening role is executed with tags

Signed-off-by: Martin Schurz <[email protected]>

* better when condition

Signed-off-by: Martin Schurz <[email protected]>

---------

Signed-off-by: Martin Schurz <[email protected]>
  • Loading branch information
schurzi authored Nov 1, 2023
1 parent 4978598 commit da017fa
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions roles/os_hardening/tasks/hardening.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
---
- name: Gather facts, if not present
ansible.builtin.setup:
when: not ansible_facts
tags:
- always

- name: Fetch OS dependent variables
ansible.builtin.include_vars:
file: "{{ item }}"
Expand Down

0 comments on commit da017fa

Please sign in to comment.