mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Merge pull request #6096 from risaacson/devel
Finished file tests with selinux.
This commit is contained in:
commit
ae6a1a38d1
1 changed files with 4 additions and 3 deletions
|
@ -17,13 +17,14 @@
|
|||
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
- name: touch a file for testing
|
||||
file: path={{output_dir}}/foo-se.txt state=file
|
||||
file: path={{output_dir}}/foo-se.txt state=touch
|
||||
register: file_se_result
|
||||
|
||||
- name: verify that the file was marked as changed
|
||||
assert: { that: "file_result.changed == true" }
|
||||
assert: { that: "file_se_result.changed == true" }
|
||||
|
||||
- name: assert touch a file for testing matches expected selinux context
|
||||
assert: { that: "file_result.secontext == 'unconfined_u:object_r:admin_home_t:s0'" }
|
||||
assert: { that: "file_se_result.secontext == 'unconfined_u:object_r:admin_home_t:s0'" }
|
||||
|
||||
- name: remove the file used for testing
|
||||
file: path={{output_dir}}/foo-se.txt state=absent
|
Loading…
Reference in a new issue