Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix filter error in ansible.builtin.file mode parameter #486

Merged
merged 4 commits into from
Oct 18, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion molecule/ssh_hardening/verify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
shell: "bash /tmp/install.sh -s -- -P cinc-auditor -v 4"

- name: Execute cinc-auditor tests
command: "/opt/cinc-auditor/bin/cinc-auditor exec --no-show-progress --no-color --no-distinct-exit supermarket://dev-sec/nginx-baseline"
command: "/opt/cinc-auditor/bin/cinc-auditor exec --no-show-progress --no-color --no-distinct-exit https://github.com/dev-sec/ssh-baseline/archive/refs/heads/master.zip"
register: test_results
changed_when: false
ignore_errors: true
Expand Down
4 changes: 2 additions & 2 deletions roles/ssh_hardening/tasks/ca_keys_and_principals.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
- name: Create ssh authorized principals directories
file:
path: '{{ item.path | dirname }}'
mode: '{{ item.directorymode | default(0700) }}'
mode: '{{ item.directorymode | default("700") }}'
owner: '{{ item.directoryowner | default(ssh_owner) }}'
group: '{{ item.directorygroup | default(ssh_group) }}'
state: directory
Expand All @@ -21,7 +21,7 @@
template:
src: 'authorized_principals.j2'
dest: '{{ item.path }}'
mode: '{{ item.filemode | default(0600) }}'
mode: '{{ item.filemode | default("600") }}'
owner: '{{ item.owner| default(ssh_owner) }}'
group: '{{ item.group | default(ssh_group) }}'
loop: '{{ ssh_authorized_principals }}'