mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-08-22 22:11:44 -07:00
Add a fips fact and use it for integration tests
This commit is contained in:
parent
5bc81f9ae7
commit
b828b25784
3 changed files with 12 additions and 4 deletions
|
@ -125,6 +125,7 @@ class Facts(object):
|
|||
self.get_cmdline()
|
||||
self.get_public_ssh_host_keys()
|
||||
self.get_selinux_facts()
|
||||
self.get_fips_facts()
|
||||
self.get_pkg_mgr_facts()
|
||||
self.get_lsb_facts()
|
||||
self.get_date_time_facts()
|
||||
|
@ -486,6 +487,13 @@ class Facts(object):
|
|||
self.facts['selinux']['type'] = 'unknown'
|
||||
|
||||
|
||||
def get_fips_facts(self):
|
||||
self.facts['fips'] = False
|
||||
data = get_file_content('/proc/sys/crypto/fips_enabled')
|
||||
if data and data == '1':
|
||||
self.facts['fips'] = True
|
||||
|
||||
|
||||
def get_date_time_facts(self):
|
||||
self.facts['date_time'] = {}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue