Skip to content

Commit

Permalink
fips_setup: do nothing by default
Browse files Browse the repository at this point in the history
Turning FIPS off is not supported so don't enable it by default.
  • Loading branch information
myllynen committed May 24, 2023
1 parent 527d1f6 commit 6b59af2
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 16 deletions.
2 changes: 1 addition & 1 deletion roles/fips_setup/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Below are the role default values from defaults/main.yml:

# Enable & check or not FIPS mode
# Disabling FIPS mode is unsupported
fips_setup_enable: true
fips_setup_enable: false
</pre>

## License
Expand Down
2 changes: 1 addition & 1 deletion roles/fips_setup/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@

# Enable & check or not FIPS mode
# Disabling FIPS mode is unsupported
fips_setup_enable: true
fips_setup_enable: false
14 changes: 1 addition & 13 deletions roles/fips_setup/tasks/enable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,6 @@
- name: Gather package facts
package_facts:

# https://bugzilla.redhat.com/show_bug.cgi?id=2154804
- name: Disable rngd service
service:
name: rngd
enabled: false
when: "'rng-tools' in ansible_facts.packages"

- name: Stop rngd service
service:
name: rngd
state: stopped
when: "'rng-tools' in ansible_facts.packages"

- name: Check FIPS mode
command: fips-mode-setup --is-enabled
check_mode: false
Expand All @@ -30,6 +17,7 @@

- name: Configure FIPS mode
command: fips-mode-setup --enable
changed_when: true
when: fips_mode.rc != 0

- name: Reboot system
Expand Down
2 changes: 1 addition & 1 deletion roles/fips_setup/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@
- name: Enable FIPS mode
include_tasks: enable.yml
when:
- ansible_facts.distribution_major_version|int >= 8
- ansible_facts.distribution_major_version | int >= 8
- fips_setup_enable | bool

0 comments on commit 6b59af2

Please sign in to comment.