diff --git a/linux_os/guide/system/software/integrity/fips/enable_fips_mode/ansible/shared.yml b/linux_os/guide/system/software/integrity/fips/enable_fips_mode/ansible/shared.yml index 41d301caa49..bd7bd5174b9 100644 --- a/linux_os/guide/system/software/integrity/fips/enable_fips_mode/ansible/shared.yml +++ b/linux_os/guide/system/software/integrity/fips/enable_fips_mode/ansible/shared.yml @@ -1,27 +1,27 @@ -# platform = Red Hat Enterprise Linux 8,multi_platform_fedora,Oracle Linux 8 +# platform = multi_platform_all # reboot = true # strategy = restrict # complexity = medium # disruption = medium {{{ ansible_instantiate_variables("var_system_crypto_policy") }}} -- name: Check to see the current status of FIPS mode - command: /usr/bin/fips-mode-setup --check +- name: "{{{ rule_title }}} - Check to See the Current Status of FIPS Mode" + ansible.builtin.command: /usr/bin/fips-mode-setup --check register: is_fips_enabled ignore_errors: yes changed_when: false -- name: Enable FIPS mode - command: /usr/bin/fips-mode-setup --enable +- name: "{{{ rule_title }}} - Enable FIPS Mode" + ansible.builtin.command: /usr/bin/fips-mode-setup --enable when: - is_fips_enabled.stdout.find('FIPS mode is enabled.') == -1 -- name: "{{{ rule_title }}}" - lineinfile: +- name: "{{{ rule_title }}} - Configure Crypto Policy" + ansible.builtin.lineinfile: path: /etc/crypto-policies/config regexp: '^(?!#)(\S+)$' line: "{{ var_system_crypto_policy }}" create: yes -- name: Verify that Crypto Policy is Set (runtime) - command: /usr/bin/update-crypto-policies --set {{ var_system_crypto_policy }} +- name: "{{{ rule_title }}} - Verify that Crypto Policy is Set (runtime)" + ansible.builtin.command: /usr/bin/update-crypto-policies --set {{ var_system_crypto_policy }}