From 8dbad0934d1695bc0319db6290d1c306227ae7b0 Mon Sep 17 00:00:00 2001 From: L3D Date: Sun, 31 Jan 2021 16:50:41 +0100 Subject: [PATCH] improve yaml linting --- .github/FUNDING.yml | 1 + .yamllint | 12 +++++----- site.yml | 56 ++++++++++++++++++++++----------------------- 3 files changed, 35 insertions(+), 34 deletions(-) diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml index 51ba466..fab5174 100644 --- a/.github/FUNDING.yml +++ b/.github/FUNDING.yml @@ -1,3 +1,4 @@ +--- # These are supported funding model platforms github: [do1jlr] diff --git a/.yamllint b/.yamllint index e6e4c6c..f69cdd3 100644 --- a/.yamllint +++ b/.yamllint @@ -4,11 +4,11 @@ extends: default rules: # 150 chars should be enough, but don't fail if a line is longer line-length: - max: 150 + max: 180 level: warning - commas: - max-spaces-before: 0 - min-spaces-after: 0 - braces: - max-spaces-inside: 1 +ignore: | + host_vars/mail01.l3d.space/vault.yml + host_vars/web01.l3d.space/vault.yml + group_vars/all/vault.yml + roles/ diff --git a/site.yml b/site.yml index 6981068..59a3a4d 100644 --- a/site.yml +++ b/site.yml @@ -2,48 +2,48 @@ - name: check if ansible is not to old hosts: localhost roles: - - { role: do1jlr.ansible_version, tags: [default,version,default,always], gather_facts: false} + - {role: do1jlr.ansible_version, tags: [default, version, default, always], gather_facts: false} - name: general roles for all hosts hosts: all roles: - - { role: base, tags: [default,packages,base]} - - { role: ranger, tags: [packages,ranger]} - - { role: bat, tags: [packages,bat], when: [ansible_os_family == 'Debian']} - - { role: unattended_upgrades, tags: [default,unattended,unattended_upgrades,security], become: true, when: ansible_distribution == 'Debian'} + - {role: base, tags: [default, packages, base]} + - {role: ranger, tags: [packages, ranger]} + - {role: bat, tags: [packages, bat], when: [ansible_os_family == 'Debian']} + - {role: unattended_upgrades, tags: [default, unattended, unattended_upgrades, security], become: true, when: ansible_distribution == 'Debian'} - name: user specific roles for all hosts hosts: all roles: - - { role: users, tags: [default,init,users]} - - { role: dotfiles, tags: [default,dotfiles]} - - { role: ssh_auth, tags: [default,init,users]} - - { role: sshd, tags: [default,init,users]} - - { role: geerlingguy.firewall, tags: [default,firewall], become: true} - - { role: robertdebock.fail2ban, tags: [default,fail2ban], become: true} + - {role: users, tags: [default, init, users]} + - {role: dotfiles, tags: [default, dotfiles]} + - {role: ssh_auth, tags: [default, init, users]} + - {role: sshd, tags: [default, init, users]} + - {role: geerlingguy.firewall, tags: [default, firewall], become: true} + - {role: robertdebock.fail2ban, tags: [default, fail2ban], become: true} - name: deploy web config hosts: web roles: - - { role: webhost2, tags: [web,webhost]} - - { role: acmetool_fix, tags: [web,acmetool]} - - { role: acmetool2, tags: [web,acmetool]} - - { role: nginx2, tags: [web,nginx]} - - { role: geerlingguy.mysql, tags: [web,git,mysql]} - - { role: gitea, tags: [web,gitea,git]} - - { role: goaccess, tags: [web,goaccess]} + - {role: webhost2, tags: [web, webhost]} + - {role: acmetool_fix, tags: [web, acmetool]} + - {role: acmetool2, tags: [web, acmetool]} + - {role: nginx2, tags: [web, nginx]} + - {role: geerlingguy.mysql, tags: [web, git, mysql]} + - {role: gitea, tags: [web, gitea, git]} + - {role: goaccess, tags: [web, goaccess]} - name: deploy mail config hosts: mail roles: - - { role: unbound, tags: [mail,unbound]} - - { role: geerlingguy.mysql, tags: [mail,mysql,mariadb]} - - { role: acmetool_fix, tags: [mail,acmetool]} - - { role: webhost2, tags: [mail,webhost]} - - { role: acmetool2, tags: [mail,acmetool]} - - { role: nginx2, tags: [mail,nginx]} - - { role: do1jlr.mailserver_preperation, tags: [mail,mailserver_preperation,prep,mailserver]} - - { role: do1jlr.dovecot, tags: [mail,dovecot,mailserver_dovecot]} - - { role: postfix, tags: [mail,postfix]} - - { role: do1jlr.rspamd, tags: [mail,rspamd,dcim]} + - {role: unbound, tags: [mail, unbound]} + - {role: geerlingguy.mysql, tags: [mail, mysql, mariadb]} + - {role: acmetool_fix, tags: [mail, acmetool]} + - {role: webhost2, tags: [mail, webhost]} + - {role: acmetool2, tags: [mail, acmetool]} + - {role: nginx2, tags: [mail, nginx]} + - {role: do1jlr.mailserver_preperation, tags: [mail, mailserver_preperation, prep, mailserver]} + - {role: do1jlr.dovecot, tags: [mail, dovecot, mailserver_dovecot]} + - {role: postfix, tags: [mail, postfix]} + - {role: do1jlr.rspamd, tags: [mail, rspamd]}