-
Notifications
You must be signed in to change notification settings - Fork 739
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Sebastian Gumprich
committed
Aug 8, 2023
1 parent
a9f19a0
commit 8220ae9
Showing
7 changed files
with
60 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,19 @@ | ||
--- | ||
- name: test that .netrc in root homedir exists | ||
ansible.builtin.file: | ||
path: '/root/.netrc' | ||
path: /root/.netrc | ||
state: file | ||
register: result_test_netrc | ||
|
||
- name: output result if .netrc for user root exists | ||
ansible.builtin.assert: | ||
that: | ||
- "result_test_netrc.state == 'file'" | ||
fail_msg: ".netrc in /root/ not present" | ||
success_msg: ".netrc exists in /root/" | ||
- result_test_netrc.state == 'file' | ||
fail_msg: .netrc in /root/ not present | ||
success_msg: .netrc exists in /root/ | ||
|
||
- name: delete '.netrc' in /root | ||
ansible.builtin.file: | ||
path: '/root/.netrc' | ||
path: /root/.netrc | ||
state: absent | ||
when: result_test_netrc.state == 'file' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,9 @@ | ||
--- | ||
- name: Read local linux user database | ||
getent: | ||
ansible.builtin.getent: | ||
database: passwd | ||
|
||
- name: Check that shell_sys_acc's shell is still bash | ||
assert: | ||
ansible.builtin.assert: | ||
that: | ||
- getent_passwd['shell_sys_acc'][5] == "/bin/bash" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
--- | ||
- name: verify 'gpgcheck' was not enabled for 'foo' repository (in whitelist) | ||
command: grep -e 'gpgcheck\s*=\s*0' /etc/yum.repos.d/foo.repo | ||
ansible.builtin.command: grep -e 'gpgcheck\s*=\s*0' /etc/yum.repos.d/foo.repo | ||
changed_when: false | ||
|
||
- name: verify 'gpgcheck' was enabled for 'bar' repository (not in whitelist) | ||
command: grep -e 'gpgcheck\s*=\s*1' /etc/yum.repos.d/bar.repo | ||
ansible.builtin.command: grep -e 'gpgcheck\s*=\s*1' /etc/yum.repos.d/bar.repo | ||
changed_when: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters