Skip to content

Commit

Permalink
bumps yamllint rules for ansible compat
Browse files Browse the repository at this point in the history
  • Loading branch information
wookietreiber committed Nov 10, 2024
1 parent 32e4e65 commit e965276
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 7 deletions.
6 changes: 5 additions & 1 deletion .yamllint
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ extends: default

rules:
braces:
min-spaces-inside: 1
min-spaces-inside: 0
max-spaces-inside: 1
brackets:
max-spaces-inside: 1
Expand All @@ -22,6 +22,7 @@ rules:
comments:
require-starting-space: yes
min-spaces-from-content: 1
comments-indentation: no
document-start:
present: yes
document-end:
Expand All @@ -33,6 +34,9 @@ rules:
max: 79
new-lines:
type: unix
octal-values:
forbid-implicit-octal: yes
forbid-explicit-octal: yes
truthy:
allowed-values: ['yes', 'no']
check-keys: no
Expand Down
2 changes: 1 addition & 1 deletion roles/ssh/tasks/authorized-keys.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
state: directory
owner: root
group: root
mode: 0755
mode: '0755'
tags:
- ssh-authorized-keys

Expand Down
4 changes: 2 additions & 2 deletions roles/ssh/tasks/configuration-sshd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
dest: /etc/ssh/sshd_config
owner: root
group: root
mode: 0644
mode: '0644'
validate: /usr/sbin/sshd -t -f %s
become: yes
register: __sshd_configuration
Expand All @@ -27,7 +27,7 @@
dest: /etc/ssh/sshd_config.d/10-ansible.conf
owner: root
group: root
mode: 0600
mode: '0600'
validate: /usr/sbin/sshd -t -f %s
become: yes
when: __ssh_has_conf_d
Expand Down
6 changes: 3 additions & 3 deletions roles/ssh/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
dest: /etc/ssh/ssh_known_hosts
owner: root
group: root
mode: 0644
mode: '0644'
when: ssh_known_hosts is defined
tags:
- ssh-known-hosts
Expand Down Expand Up @@ -80,7 +80,7 @@
dest: '{{ ssh_banner.dest }}'
owner: root
group: root
mode: 0644
mode: '0644'
when: >
ssh_banner is defined and
ssh_banner.src is defined and
Expand Down Expand Up @@ -119,7 +119,7 @@
state: directory
owner: root
group: root
mode: 0755
mode: '0755'
when: __ssh_base_distro == 'ubuntu'

# -----------------------------------------------------------------------------
Expand Down

0 comments on commit e965276

Please sign in to comment.