<def-group>
  <definition class="compliance" id="enable_dracut_fips_module" version="1">
    {{{ oval_metadata("fips module should be enabled in Dracut configuration") }}}
    <criteria operator="AND">
      <criterion comment="dracut fips module is enabled" test_ref="test_enable_dracut_fips_module" />
    </criteria>
  </definition>

  <ind:textfilecontent54_test check="all" check_existence="all_exist"
  comment="add_dracutmodules contains fips" id="test_enable_dracut_fips_module" version="1">
    <ind:object object_ref="object_enable_dracut_fips_module" />
    <ind:state state_ref="state_enable_dracut_fips_module" />
  </ind:textfilecontent54_test>

  <ind:textfilecontent54_object id="object_enable_dracut_fips_module" version="1">
    <ind:filepath>/etc/dracut.conf.d/40-fips.conf</ind:filepath>
    <ind:pattern operation="pattern match">^\s*add_dracutmodules\+="\s*(\w*)\s*"\s*(?:#.*)?$</ind:pattern>
    <ind:instance datatype="int">1</ind:instance>
  </ind:textfilecontent54_object>

  <ind:textfilecontent54_state id="state_enable_dracut_fips_module" version="1">
    <ind:subexpression datatype="string" operation="equals">fips</ind:subexpression>
  </ind:textfilecontent54_state>

</def-group>
