diff --git a/.ansible-lint b/.ansible-lint new file mode 100644 index 0000000..bfa017e --- /dev/null +++ b/.ansible-lint @@ -0,0 +1,5 @@ +--- +exclude_paths: + - ./.gitignore + - ./library/ + - ./roles/ diff --git a/.yamllint b/.yamllint new file mode 100644 index 0000000..c311c97 --- /dev/null +++ b/.yamllint @@ -0,0 +1,11 @@ +--- +extends: default + +rules: + # 80 chars should be enough, but don't fail if a line is longer + line-length: + max: 80 + level: warning + allow-non-breakable-words: true + comments: + min-spaces-from-content: 1 diff --git a/bootstrap.yml b/bootstrap.yml index 413e526..f5c1e0c 100644 --- a/bootstrap.yml +++ b/bootstrap.yml @@ -4,6 +4,6 @@ - name: "install python and archlinux-keyring" raw: pacman -Sy python archlinux-keyring --noconfirm when: not debian.stdout - gather_facts: no + gather_facts: false roles: - - ansible_bootstrap + - ansible_bootstrap diff --git a/build.yml b/build.yml index 47c55ff..3c46a92 100644 --- a/build.yml +++ b/build.yml @@ -1,17 +1,19 @@ --- - hosts: build pre_tasks: - - name: install terminfo - pacman: - state: present # not required. choices: absent;latest;present. Desired state of the package. - name: - - termite-terminfo # not required. Name or list of names of the packages to install, upgrade, or remove. - become: yes + - name: install terminfo + pacman: + state: present + name: + - termite-terminfo + become: true vars: - # certbot_force: true + # certbot_force: true roles: - - docker - - {role: nginx, become: yes } - - {role: ansible-role-postgresql, become: yes } - - php - - user_config + - docker + - role: nginx + become: true + - role: ansible-role-postgresql + become: true + - php + - user_config diff --git a/debian.yml b/debian.yml index d98ad32..2a77a52 100644 --- a/debian.yml +++ b/debian.yml @@ -1,6 +1,6 @@ --- - hosts: debian - + roles: - - syncthing - - msmtp \ No newline at end of file + - syncthing + - msmtp diff --git a/music-player.yml b/music-player.yml index 05fb640..65cf36b 100644 --- a/music-player.yml +++ b/music-player.yml @@ -1,16 +1,15 @@ +--- - hosts: music-player pre_tasks: - - name: install terminfo - pacman: - state: present # not required. choices: absent;latest;present. Desired state of the package. - name: - - termite-terminfo # not required. Name or list of names of the packages to install, upgrade, or remove. - become: yes + - name: install terminfo + pacman: + state: present + name: + - termite-terminfo + become: true roles: - - user_config - - cronie - - hass-client-control - - mpd - - + - user_config + - cronie + - hass-client-control + - mpd diff --git a/provisionning.yml b/provisionning.yml index cf95073..3683d33 100644 --- a/provisionning.yml +++ b/provisionning.yml @@ -7,7 +7,7 @@ - hosts: all remote_user: root vars: - ansible_password: "{{ vault_default_root }}" + ansible_password: "{{ vault_default_root }}" roles: - ansible_bootstrap diff --git a/roles/requirements.yml b/roles/requirements.yml index 0861c91..b3bab28 100644 --- a/roles/requirements.yml +++ b/roles/requirements.yml @@ -1,86 +1,87 @@ -- src: gitea@git.ducamps.win:ansible-roles/JDownloader.git +--- +- src: gitea@git.ducamps.win:ansible-roles/JDownloader.git scm: git -- src: gitea@git.ducamps.win:ansible-roles/ansible-arch-provissionning.git +- src: gitea@git.ducamps.win:ansible-roles/ansible-arch-provissionning.git scm: git -- src: gitea@git.ducamps.win:ansible-roles/ansible-bitwardenrs.git +- src: gitea@git.ducamps.win:ansible-roles/ansible-bitwardenrs.git scm: git -- src: gitea@git.ducamps.win:ansible-roles/ansible-drone.git +- src: gitea@git.ducamps.win:ansible-roles/ansible-drone.git scm: git -- src: gitea@git.ducamps.win:ansible-roles/ansible-manager.git +- src: gitea@git.ducamps.win:ansible-roles/ansible-manager.git scm: git -- src: gitea@git.ducamps.win:ansible-roles/ansible-pihole.git +- src: gitea@git.ducamps.win:ansible-roles/ansible-pihole.git scm: git -- src: gitea@git.ducamps.win:ansible-roles/ansible-role-certbot.git +- src: gitea@git.ducamps.win:ansible-roles/ansible-role-certbot.git scm: git -- src: gitea@git.ducamps.win:ansible-roles/ansible-role-chisel.git +- src: gitea@git.ducamps.win:ansible-roles/ansible-role-chisel.git scm: git -- src: gitea@git.ducamps.win:ansible-roles/ansible-role-postgresql.git +- src: gitea@git.ducamps.win:ansible-roles/ansible-role-postgresql.git scm: git -- src: gitea@git.ducamps.win:ansible-roles/ansible-role-samba.git +- src: gitea@git.ducamps.win:ansible-roles/ansible-role-samba.git scm: git -- src: gitea@git.ducamps.win:ansible-roles/ansible_bootstrap.git +- src: gitea@git.ducamps.win:ansible-roles/ansible_bootstrap.git scm: git -- src: gitea@git.ducamps.win:ansible-roles/autofs.git +- src: gitea@git.ducamps.win:ansible-roles/autofs.git scm: git -- src: gitea@git.ducamps.win:ansible-roles/bluetooth.git +- src: gitea@git.ducamps.win:ansible-roles/bluetooth.git scm: git -- src: gitea@git.ducamps.win:ansible-roles/chainetv.git +- src: gitea@git.ducamps.win:ansible-roles/chainetv.git scm: git -- src: gitea@git.ducamps.win:ansible-roles/cloud-commander.git +- src: gitea@git.ducamps.win:ansible-roles/cloud-commander.git scm: git -- src: gitea@git.ducamps.win:ansible-roles/cronie.git +- src: gitea@git.ducamps.win:ansible-roles/cronie.git scm: git -- src: gitea@git.ducamps.win:ansible-roles/cups.git +- src: gitea@git.ducamps.win:ansible-roles/cups.git scm: git -- src: gitea@git.ducamps.win:ansible-roles/dns.git +- src: gitea@git.ducamps.win:ansible-roles/dns.git scm: git -- src: gitea@git.ducamps.win:ansible-roles/docker.git +- src: gitea@git.ducamps.win:ansible-roles/docker.git scm: git -- src: gitea@git.ducamps.win:ansible-roles/fail2ban.git +- src: gitea@git.ducamps.win:ansible-roles/fail2ban.git scm: git -- src: gitea@git.ducamps.win:ansible-roles/gandi-dyn-dns.git +- src: gitea@git.ducamps.win:ansible-roles/gandi-dyn-dns.git scm: git -- src: gitea@git.ducamps.win:ansible-roles/gitea.git +- src: gitea@git.ducamps.win:ansible-roles/gitea.git scm: git -- src: gitea@git.ducamps.win:ansible-roles/grub_themes.git +- src: gitea@git.ducamps.win:ansible-roles/grub_themes.git scm: git -- src: gitea@git.ducamps.win:ansible-roles/hass.git +- src: gitea@git.ducamps.win:ansible-roles/hass.git scm: git -- src: gitea@git.ducamps.win:ansible-roles/hass-client-control.git +- src: gitea@git.ducamps.win:ansible-roles/hass-client-control.git scm: git -- src: gitea@git.ducamps.win:ansible-roles/laptop.git +- src: gitea@git.ducamps.win:ansible-roles/laptop.git scm: git -- src: gitea@git.ducamps.win:ansible-roles/mariadb.git +- src: gitea@git.ducamps.win:ansible-roles/mariadb.git scm: git -- src: gitea@git.ducamps.win:ansible-roles/mpd.git +- src: gitea@git.ducamps.win:ansible-roles/mpd.git scm: git -- src: gitea@git.ducamps.win:ansible-roles/msmtp.git +- src: gitea@git.ducamps.win:ansible-roles/msmtp.git scm: git -- src: gitea@git.ducamps.win:ansible-roles/nextcloud.git +- src: gitea@git.ducamps.win:ansible-roles/nextcloud.git scm: git -- src: gitea@git.ducamps.win:ansible-roles/nginx.git +- src: gitea@git.ducamps.win:ansible-roles/nginx.git scm: git -- src: gitea@git.ducamps.win:ansible-roles/nvidia.git +- src: gitea@git.ducamps.win:ansible-roles/nvidia.git scm: git -- src: gitea@git.ducamps.win:ansible-roles/php.git +- src: gitea@git.ducamps.win:ansible-roles/php.git scm: git -- src: gitea@git.ducamps.win:ansible-roles/php7.git +- src: gitea@git.ducamps.win:ansible-roles/php7.git scm: git -- src: gitea@git.ducamps.win:ansible-roles/radicale.git +- src: gitea@git.ducamps.win:ansible-roles/radicale.git scm: git -- src: gitea@git.ducamps.win:ansible-roles/rsyncd.git +- src: gitea@git.ducamps.win:ansible-roles/rsyncd.git scm: git -- src: gitea@git.ducamps.win:ansible-roles/supysonic.git +- src: gitea@git.ducamps.win:ansible-roles/supysonic.git scm: git -- src: gitea@git.ducamps.win:ansible-roles/syncthing.git +- src: gitea@git.ducamps.win:ansible-roles/syncthing.git scm: git -- src: gitea@git.ducamps.win:ansible-roles/system.git +- src: gitea@git.ducamps.win:ansible-roles/system.git scm: git -- src: gitea@git.ducamps.win:ansible-roles/tt-rss.git +- src: gitea@git.ducamps.win:ansible-roles/tt-rss.git scm: git -- src: gitea@git.ducamps.win:ansible-roles/user_config.git +- src: gitea@git.ducamps.win:ansible-roles/user_config.git scm: git -- src: gitea@git.ducamps.win:ansible-roles/virt.git +- src: gitea@git.ducamps.win:ansible-roles/virt.git scm: git -- src: gitea@git.ducamps.win:ansible-roles/workstation.git +- src: gitea@git.ducamps.win:ansible-roles/workstation.git scm: git diff --git a/server.yml b/server.yml index c0cd8b5..fd72673 100644 --- a/server.yml +++ b/server.yml @@ -1,47 +1,55 @@ --- - hosts: server pre_tasks: - - name: install terminfo - pacman: - state: present # not required. choices: absent;latest;present. Desired state of the package. - name: - - termite-terminfo # not required. Name or list of names of the packages to install, upgrade, or remove. - become: yes + - name: install terminfo + pacman: + state: present + name: + - termite-terminfo + become: true vars: - # certbot_force: true + # certbot_force: true roles: - - role: ansible-role-chisel - become: yes - - syncthing - - msmtp - - cronie - - rsyncd - - gandi-dyn-dns - - fail2ban - - ansible-pihole - - {role: ansible-role-certbot, become: yes} ##need to have a external connection on 80 - - {role: nginx, become: yes } - - {role: ansible-role-postgresql, become: yes } - - {role: radicale , become: yes } - - {role: ansible-drone ,become: yes} - - php - - nextcloud - - tt-rss - - gitea - - supysonic - - hass - - {role: ansible-bitwardenrs , become: yes } - - {role: ansible-role-samba , become: yes } - - chainetv - - user_config + - role: ansible-role-chisel + become: true + - syncthing + - msmtp + - cronie + - rsyncd + - gandi-dyn-dns + - fail2ban + - ansible-pihole + - role: ansible-role-certbot + become: true # need to have a external connection on 80 + - role: nginx + become: true + - role: ansible-role-postgresql + become: true + - role: radicale + become: true + - role: ansible-drone + become: true + - php + - nextcloud + - tt-rss + - gitea + - supysonic + - hass + - role: ansible-bitwardenrs + become: true + - role: ansible-role-samba + become: true + - chainetv + - user_config tasks: - - name: create paccache job for arch mirror - cron: - job: "find {{arch_mirror_location}} -type d -exec paccache -v -r -k 2 -c {} \\;" - user: "root" - name: "paccache job" - hour: "4" - minute: "0" - state: present - become: true + - name: create paccache job for arch mirror + cron: + job: "find {{ arch_mirror_location }} -type d + -exec paccache -v -r -k 2 -c {} \\;" + user: "root" + name: "paccache job" + hour: "4" + minute: "0" + state: present + become: true diff --git a/test-role/JDownloader.yml b/test-role/JDownloader.yml index 6360914..b22692d 100644 --- a/test-role/JDownloader.yml +++ b/test-role/JDownloader.yml @@ -1,3 +1,4 @@ +--- - hosts: server roles: - ../roles/JDownloader diff --git a/test-role/bitwardenrs.yml b/test-role/bitwardenrs.yml index 7d4900b..3a5851a 100644 --- a/test-role/bitwardenrs.yml +++ b/test-role/bitwardenrs.yml @@ -1,4 +1,5 @@ +--- - hosts: server - become: yes + become: true roles: - ../roles/ansible-bitwardenrs diff --git a/test-role/chainetv.yml b/test-role/chainetv.yml index 8786aa8..b4ebac3 100644 --- a/test-role/chainetv.yml +++ b/test-role/chainetv.yml @@ -4,5 +4,4 @@ force_site_update: true roles: - - ../roles/chainetv - + - ../roles/chainetv diff --git a/test-role/chisel.yml b/test-role/chisel.yml index 287aff1..de0a20b 100644 --- a/test-role/chisel.yml +++ b/test-role/chisel.yml @@ -1,4 +1,5 @@ +--- - hosts: server - become: yes + become: true roles: - ../roles/ansible-role-chisel diff --git a/test-role/drone.yml b/test-role/drone.yml index cf2c114..b697ba1 100644 --- a/test-role/drone.yml +++ b/test-role/drone.yml @@ -1,6 +1,7 @@ +--- - hosts: - server - build - become: yes + become: true roles: - ../roles/ansible-drone diff --git a/test-role/gitea.yml b/test-role/gitea.yml index 9c90147..92cbe37 100644 --- a/test-role/gitea.yml +++ b/test-role/gitea.yml @@ -1,3 +1,4 @@ +--- - hosts: server roles: - ../roles/gitea diff --git a/test-role/hass.yml b/test-role/hass.yml index 366eb94..e4be77e 100644 --- a/test-role/hass.yml +++ b/test-role/hass.yml @@ -1,3 +1,4 @@ +--- - hosts: server roles: - ../roles/hass diff --git a/test-role/msmtp.yml b/test-role/msmtp.yml index 1a133a8..cc7eee5 100644 --- a/test-role/msmtp.yml +++ b/test-role/msmtp.yml @@ -1,3 +1,4 @@ +--- - hosts: server roles: - ../roles/msmtp diff --git a/test-role/nextcloud.yml b/test-role/nextcloud.yml index 3cfa9da..818a095 100644 --- a/test-role/nextcloud.yml +++ b/test-role/nextcloud.yml @@ -1,14 +1,12 @@ --- - hosts: server pre_tasks: - - name: install terminfo - pacman: - state: present # not required. choices: absent;latest;present. Desired state of the package. - name: - - termite-terminfo # not required. Name or list of names of the packages to install, upgrade, or remove. - become: yes - - + - name: install terminfo + pacman: + state: present + name: + - termite-terminfo + become: true roles: - - ../roles/nextcloud + - ../roles/nextcloud diff --git a/test-role/nginx.yml b/test-role/nginx.yml index 678de99..1b5cd40 100644 --- a/test-role/nginx.yml +++ b/test-role/nginx.yml @@ -1,4 +1,5 @@ +--- - hosts: server - become: yes + become: true roles: - ../roles/nginx diff --git a/test-role/php.yml b/test-role/php.yml index a71b01b..504c0eb 100644 --- a/test-role/php.yml +++ b/test-role/php.yml @@ -4,5 +4,4 @@ force_site_update: true roles: - - ../roles/php - + - ../roles/php diff --git a/test-role/pihole.yml b/test-role/pihole.yml index b2c36fc..8cceb7d 100644 --- a/test-role/pihole.yml +++ b/test-role/pihole.yml @@ -1,3 +1,4 @@ +--- - hosts: server vars: pihole_update_container: true diff --git a/test-role/postgres.yml b/test-role/postgres.yml index 04bc3b4..db51a2b 100644 --- a/test-role/postgres.yml +++ b/test-role/postgres.yml @@ -1,4 +1,5 @@ +--- - hosts: server - become: yes + become: true roles: - ../roles/ansible-role-postgresql diff --git a/test-role/supysonic.yml b/test-role/supysonic.yml index 6e5f5cd..6a9a4fb 100644 --- a/test-role/supysonic.yml +++ b/test-role/supysonic.yml @@ -4,5 +4,4 @@ supysonic_force_site_update: true roles: - - ../roles/supysonic - + - ../roles/supysonic diff --git a/test-role/system.yml b/test-role/system.yml index 5576ce2..ac67629 100644 --- a/test-role/system.yml +++ b/test-role/system.yml @@ -1,3 +1,4 @@ +--- - hosts: all roles: - ../roles/system diff --git a/test-role/tt-rss.yml b/test-role/tt-rss.yml index e274da0..84741b4 100644 --- a/test-role/tt-rss.yml +++ b/test-role/tt-rss.yml @@ -4,6 +4,4 @@ force_site_update: true roles: - - ../roles/tt-rss - - + - ../roles/tt-rss diff --git a/workstation.yml b/workstation.yml index 8828640..ebeb933 100644 --- a/workstation.yml +++ b/workstation.yml @@ -1,21 +1,20 @@ --- - hosts: workstation roles: - - role: ansible-role-chisel - become: yes - - syncthing - - user_config - - ansible-manager - - mpd - - virt - - hass-client-control - - workstation - - cups - - grub_themes - - nvidia + - role: ansible-role-chisel + become: true + - syncthing + - user_config + - ansible-manager + - mpd + - virt + - hass-client-control + - workstation + - cups + - grub_themes + - nvidia - hosts: laptop roles: - - laptop - - bluetooth - -# - Windows_manager + - laptop + - bluetooth + # - Windows_manager