-
Notifications
You must be signed in to change notification settings - Fork 135
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move the variable checks to separate file
and explain better why this is problematic Drops also the check for internal variables as the user should not bother with these. Signed-off-by: Jakub Jelen <[email protected]>
- Loading branch information
Showing
2 changed files
with
28 additions
and
16 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
--- | ||
- name: Ensure sshd_sysconfig_use_strong_rng is safe to use in shell/command | ||
ansible.builtin.assert: | ||
that: | ||
- (sshd_sysconfig_use_strong_rng | string) == (sshd_sysconfig_use_strong_rng | quote) | ||
msg: | | ||
The variable `sshd_sysconfig_use_strong_rng` is not safe for shell/command/template expansions: | ||
sshd_sysconfig_use_strong_rng: {{ sshd_sysconfig_use_strong_rng }} == {{ sshd_sysconfig_use_strong_rng | quote }} | ||
- name: Ensure sshd_binary is safe to use in shell/command | ||
ansible.builtin.assert: | ||
that: | ||
- sshd_binary == (sshd_binary | quote) | ||
msg: | | ||
The variable `sshd_binary` is not safe for shell/command/template expansions: | ||
sshd_binary: {{ sshd_binary }} == {{ sshd_binary | quote }} | ||
- name: Ensure sshd_config_file is safe to use in shell/command | ||
ansible.builtin.assert: | ||
that: | ||
- sshd_config_file == (sshd_config_file | quote) | ||
msg: | | ||
The variable `sshd_sysconfig_use_strong_rng` is not safe for shell/command/template expansions: | ||
sshd_config_file: {{ sshd_config_file }} == {{ sshd_config_file | quote }} | ||
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