Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
ansible
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenEdx
ansible
Commits
b828b257
Commit
b828b257
authored
Nov 12, 2014
by
Toshio Kuratomi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add a fips fact and use it for integration tests
parent
5bc81f9a
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
4 deletions
+12
-4
lib/ansible/module_utils/facts.py
+8
-0
test/integration/roles/test_copy/tasks/main.yml
+3
-3
test/integration/roles/test_stat/tasks/main.yml
+1
-1
No files found.
lib/ansible/module_utils/facts.py
View file @
b828b257
...
...
@@ -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'
]
=
{}
...
...
test/integration/roles/test_copy/tasks/main.yml
View file @
b828b257
...
...
@@ -61,7 +61,7 @@
assert
:
that
:
-
"
copy_result.md5sum
==
'c47397529fe81ab62ba3f85e9f4c71f2'"
ignore_errors
:
True
when
:
ansible_fips !=
True
-
name
:
check the stat results of the file
stat
:
path={{output_file}}
...
...
@@ -83,7 +83,7 @@
assert
:
that
:
-
"
stat_results.stat.md5
==
'c47397529fe81ab62ba3f85e9f4c71f2'"
ignore_errors
:
True
when
:
ansible_fips !=
True
-
name
:
overwrite the file via same means
copy
:
src=foo.txt dest={{output_file}}
...
...
@@ -242,7 +242,7 @@
that
:
-
stat_link_result.stat.islnk
-
name
:
get the
md5
of the link target
-
name
:
get the
checksum
of the link target
shell
:
sha1sum {{output_dir}}/follow_test | cut -f1 -sd ' '
register
:
target_file_result
...
...
test/integration/roles/test_stat/tasks/main.yml
View file @
b828b257
...
...
@@ -66,4 +66,4 @@
-
assert
:
that
:
-
"
stat_result.stat.md5
==
'5eb63bbbe01eeed093cb22bb8f5acdc3'"
ignore_errors
:
True
when
:
ansible_fips !=
True
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment