Ansible-lint and yamllint

Does not fix all warnings, but gets rid of the purely cosmetic ones.
(roles/accounts/tasks/main.yml)
This commit is contained in:
Patrick Marchand 2020-05-22 11:49:18 -04:00
parent 38e5c1bf70
commit af7b3b36fe
5 changed files with 36 additions and 37 deletions

View file

@ -41,5 +41,3 @@
# environment: # environment:
# PKG_PATH: "http://ftp.openbsd.org/pub/OpenBSD/{{ ansible_distribution_version }}/packages/{{ ansible_architecture }}/" # PKG_PATH: "http://ftp.openbsd.org/pub/OpenBSD/{{ ansible_distribution_version }}/packages/{{ ansible_architecture }}/"
# vim:ft=ansible

View file

@ -30,12 +30,13 @@
check_mode: false check_mode: false
register: grep_allowusers_ssh register: grep_allowusers_ssh
- assert: - name: "Check that AllowUsers and AllowGroup do not override each other"
assert:
that: "not (grep_allowusers_ssh.rc == 0 and grep_allowgroups_ssh.rc == 0)" that: "not (grep_allowusers_ssh.rc == 0 and grep_allowgroups_ssh.rc == 0)"
msg: "We can't deal with AllowUsers and AllowGroups at the same time" msg: "We can't deal with AllowUsers and AllowGroups at the same time"
- set_fact: - name: "If AllowGroups is present then use it"
# If "AllowGroups is present" set_fact:
ssh_allowgroups: "{{ (grep_allowgroups_ssh.rc == 0) or (grep_allowusers_ssh.rc != 0) }}" ssh_allowgroups: "{{ (grep_allowgroups_ssh.rc == 0) or (grep_allowusers_ssh.rc != 0) }}"
- name: "Add AllowGroups sshd directive with '{{ evolinux_ssh_group }}'" - name: "Add AllowGroups sshd directive with '{{ evolinux_ssh_group }}'"