diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml index 2366ba2c..81329596 100644 --- a/.github/FUNDING.yml +++ b/.github/FUNDING.yml @@ -1 +1,2 @@ +--- ko_fi: davestephens diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6654e9f1..9f8659c5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,5 +1,4 @@ -# This is a basic workflow to help you get started with Actions - +--- name: CI # Controls when the action will run. @@ -30,5 +29,7 @@ jobs: - name: Install test dependencies run: pip3 install yamllint ansible-lint==4.3.7 - - name: Ansible lint - run: ansible-lint ./nas.yml -x 106,208 + - name: Linting + run: | + ansible-lint ./nas.yml -x 106,208 + yamllint . diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml index 249c21f3..2c5f2f2a 100644 --- a/.github/workflows/integration.yml +++ b/.github/workflows/integration.yml @@ -1,14 +1,12 @@ -# This is a basic workflow to help you get started with Actions - +--- name: Integration -# Controls when the action will run. +# Controls when the action will run. on: # Allows you to run this workflow manually from the Actions tab workflow_dispatch: jobs: - test: name: Test runs-on: ubuntu-20.04 diff --git a/.gitignore b/.gitignore index 6d5441ff..a48bde3b 100644 --- a/.gitignore +++ b/.gitignore @@ -4,6 +4,7 @@ site *.retry *.log inventories +.cache # Vim [._]sw[a-p] diff --git a/.yamllint b/.yamllint new file mode 100644 index 00000000..ac423ba2 --- /dev/null +++ b/.yamllint @@ -0,0 +1,16 @@ +--- +extends: default + +rules: + line-length: disable + truthy: + allowed-values: ['true', 'false', 'yes', 'no'] + comments: + min-spaces-from-content: 1 + braces: + min-spaces-inside: 0 + max-spaces-inside: 1 + +ignore: | + .cache + .github/workflows/*.yml diff --git a/files/grafana/provisioning/dashboards/ansible-nas.yml b/files/grafana/provisioning/dashboards/ansible-nas.yml index 2f1b9c2f..20a8e7a0 100644 --- a/files/grafana/provisioning/dashboards/ansible-nas.yml +++ b/files/grafana/provisioning/dashboards/ansible-nas.yml @@ -1,24 +1,15 @@ +--- apiVersion: 1 providers: - # an unique provider name -- name: 'Ansible-NAS Dashboards' - # org id. will default to orgId 1 if not specified - orgId: 1 - # name of the dashboard folder. Required - folder: 'Ansible-NAS' - # folder UID. will be automatically generated if not specified - folderUid: '' - # provider type. Required - type: file - # disable dashboard deletion - disableDeletion: false - # enable dashboard editing - editable: true - # how often Grafana will scan for changed dashboards - updateIntervalSeconds: 60 - # allow updating provisioned dashboards from the UI - allowUiUpdates: false - options: - # path to dashboard files on disk. Required - path: /var/lib/grafana/dashboards/ansible-nas \ No newline at end of file + - name: 'Ansible-NAS Dashboards' + orgId: 1 + folder: 'Ansible-NAS' + folderUid: '' + type: file + disableDeletion: false + editable: true + updateIntervalSeconds: 60 + allowUiUpdates: false + options: + path: /var/lib/grafana/dashboards/ansible-nas diff --git a/group_vars/all.yml b/group_vars/all.yml index 76bbca6c..ff9db995 100644 --- a/group_vars/all.yml +++ b/group_vars/all.yml @@ -1,3 +1,4 @@ +--- ## ._____. .__ ## _____ ____ _____|__\_ |__ | | ____ ____ _____ ______ ## \__ \ / \ / ___/ || __ \| | _/ __ \ ______ / \\__ \ / ___/ diff --git a/inventories/sample/group_vars/nas.yml b/inventories/sample/group_vars/nas.yml index b2334ae7..3cae1a33 100644 --- a/inventories/sample/group_vars/nas.yml +++ b/inventories/sample/group_vars/nas.yml @@ -1,3 +1,4 @@ +--- ## ._____. .__ ## _____ ____ _____|__\_ |__ | | ____ ____ _____ ______ ## \__ \ / \ / ___/ || __ \| | _/ __ \ ______ / \\__ \ / ___/ @@ -15,4 +16,3 @@ ansible_nas_timezone: Etc/UTC ## Enable some applications heimdall_enabled: true portainer_enabled: true - diff --git a/mkdocs.yml b/mkdocs.yml index 2c4932f1..73ab2828 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -1,3 +1,4 @@ +--- # Project information site_name: 'Ansible-NAS' site_description: 'Build a fully functional NAS with an Ubuntu box and this playbook' @@ -28,4 +29,4 @@ extra: manifest: 'manifest.webmanifest' social: - icon: 'fontawesome/brands/github-alt' - link: 'https://github.com/davestephens' \ No newline at end of file + link: 'https://github.com/davestephens' diff --git a/nas.yml b/nas.yml index 317044db..3f8f6f43 100644 --- a/nas.yml +++ b/nas.yml @@ -254,70 +254,70 @@ when: (znc_enabled | default(False)) tasks: - - import_tasks: tasks/thelounge.yml - when: (thelounge_enabled | default(False)) - tags: thelounge + - import_tasks: tasks/thelounge.yml + when: (thelounge_enabled | default(False)) + tags: thelounge - - import_tasks: tasks/glances.yml - when: (glances_enabled | default(False)) - tags: glances + - import_tasks: tasks/glances.yml + when: (glances_enabled | default(False)) + tags: glances - - import_tasks: tasks/gitlab.yml - when: (gitlab_enabled | default(False)) - tags: gitlab + - import_tasks: tasks/gitlab.yml + when: (gitlab_enabled | default(False)) + tags: gitlab - - import_tasks: tasks/timemachine.yml - when: (timemachine_enabled | default(False)) - tags: timemachine + - import_tasks: tasks/timemachine.yml + when: (timemachine_enabled | default(False)) + tags: timemachine - - import_tasks: tasks/stats.yml - when: (stats_enabled | default(False)) - tags: stats + - import_tasks: tasks/stats.yml + when: (stats_enabled | default(False)) + tags: stats - - import_tasks: tasks/guacamole.yml - when: (guacamole_enabled | default(False)) - tags: guacamole + - import_tasks: tasks/guacamole.yml + when: (guacamole_enabled | default(False)) + tags: guacamole - - import_tasks: tasks/joomla.yml - when: (joomla_enabled | default(False)) - tags: joomla + - import_tasks: tasks/joomla.yml + when: (joomla_enabled | default(False)) + tags: joomla - - import_tasks: tasks/wallabag.yml - when: (wallabag_enabled | default(False)) - tags: wallabag + - import_tasks: tasks/wallabag.yml + when: (wallabag_enabled | default(False)) + tags: wallabag - - import_tasks: tasks/mosquitto.yml - when: (mosquitto_enabled | default(False)) - tags: mosquitto + - import_tasks: tasks/mosquitto.yml + when: (mosquitto_enabled | default(False)) + tags: mosquitto - - import_tasks: tasks/calibre.yml - when: (calibre_enabled | default(False)) - tags: calibre + - import_tasks: tasks/calibre.yml + when: (calibre_enabled | default(False)) + tags: calibre - - import_tasks: tasks/openhab.yml - when: (openhab_enabled | default(False)) - tags: openhab + - import_tasks: tasks/openhab.yml + when: (openhab_enabled | default(False)) + tags: openhab - - import_tasks: tasks/jellyfin.yml - when: (jellyfin_enabled | default(False)) - tags: jellyfin + - import_tasks: tasks/jellyfin.yml + when: (jellyfin_enabled | default(False)) + tags: jellyfin - - import_tasks: tasks/krusader.yml - when: (krusader_enabled | default(False)) - tags: krusader + - import_tasks: tasks/krusader.yml + when: (krusader_enabled | default(False)) + tags: krusader - - import_tasks: tasks/ubooquity.yml - when: (ubooquity_enabled | default(False)) - tags: ubooquity + - import_tasks: tasks/ubooquity.yml + when: (ubooquity_enabled | default(False)) + tags: ubooquity - - import_tasks: tasks/youtubedlmaterial.yml - when: (youtubedlmaterial_enabled | default(False)) - tags: youtubedlmaterial + - import_tasks: tasks/youtubedlmaterial.yml + when: (youtubedlmaterial_enabled | default(False)) + tags: youtubedlmaterial - - import_tasks: tasks/virtual_desktop.yml - when: (virtual_desktop_enabled | default(False)) - tags: virtual_desktop + - import_tasks: tasks/virtual_desktop.yml + when: (virtual_desktop_enabled | default(False)) + tags: virtual_desktop - - import_tasks: tasks/pytivo.yml - when: (pytivo_enabled | default(False)) - tags: pytivo + - import_tasks: tasks/pytivo.yml + when: (pytivo_enabled | default(False)) + tags: pytivo diff --git a/permission_data.yml b/permission_data.yml index c415316c..4f682b59 100644 --- a/permission_data.yml +++ b/permission_data.yml @@ -17,5 +17,3 @@ mode: "u=rwX,g=rwX,o=rX" recurse: true loop: "{{ samba_shares }}" - - diff --git a/roles/airsonic/defaults/main.yml b/roles/airsonic/defaults/main.yml index d79b5e4a..a5d4016d 100644 --- a/roles/airsonic/defaults/main.yml +++ b/roles/airsonic/defaults/main.yml @@ -9,4 +9,4 @@ airsonic_podcasts_directory: "{{ podcasts_root }}" # network airsonic_port: "4040" -airsonic_hostname: "airsonic" \ No newline at end of file +airsonic_hostname: "airsonic" diff --git a/roles/airsonic/tasks/main.yml b/roles/airsonic/tasks/main.yml index 15326e63..54bdedbf 100644 --- a/roles/airsonic/tasks/main.yml +++ b/roles/airsonic/tasks/main.yml @@ -29,4 +29,3 @@ traefik.http.routers.airsonic.tls.domains[0].main: "{{ ansible_nas_domain }}" traefik.http.routers.airsonic.tls.domains[0].sans: "*.{{ ansible_nas_domain }}" traefik.http.services.airsonic.loadbalancer.server.port: "4040" - diff --git a/roles/ansible-nas-docker/defaults/main.yml b/roles/ansible-nas-docker/defaults/main.yml index c0eba9ac..0e6e2ea7 100644 --- a/roles/ansible-nas-docker/defaults/main.yml +++ b/roles/ansible-nas-docker/defaults/main.yml @@ -9,4 +9,4 @@ docker_image_directory: "{{ docker_home }}/data" # Docker storage driver, see https://docs.docker.com/storage/storagedriver/select-storage-driver/#supported-backing-filesystems # You might want to change this to ZFS, depending on your underlying filesystem. -docker_storage_driver: overlay2 \ No newline at end of file +docker_storage_driver: overlay2 diff --git a/roles/ansible-nas-docker/tasks/main.yml b/roles/ansible-nas-docker/tasks/main.yml index 335574c9..32ba9c1c 100644 --- a/roles/ansible-nas-docker/tasks/main.yml +++ b/roles/ansible-nas-docker/tasks/main.yml @@ -40,8 +40,8 @@ - name: Restart Docker service: - name: docker - state: restarted + name: docker + state: restarted when: docker_config.changed tags: - skip_ansible_lint diff --git a/roles/ansible-nas-general/defaults/main.yml b/roles/ansible-nas-general/defaults/main.yml index c80d62a1..28671900 100644 --- a/roles/ansible-nas-general/defaults/main.yml +++ b/roles/ansible-nas-general/defaults/main.yml @@ -17,4 +17,4 @@ ansible_nas_extra_packages: # Sets the timezone for your Ansible NAS # You can find a list here https://en.wikipedia.org/wiki/List_of_tz_database_time_zones -ansible_nas_timezone: Etc/UTC \ No newline at end of file +ansible_nas_timezone: Etc/UTC diff --git a/roles/ansible-nas-general/tasks/main.yml b/roles/ansible-nas-general/tasks/main.yml index c4236cba..1263ca22 100644 --- a/roles/ansible-nas-general/tasks/main.yml +++ b/roles/ansible-nas-general/tasks/main.yml @@ -52,4 +52,4 @@ group: ansible-nas mode: "u=rwX,g=rwX,o=rX" recurse: false - loop: "{{ samba_shares }}" \ No newline at end of file + loop: "{{ samba_shares }}" diff --git a/roles/bazarr/defaults/main.yml b/roles/bazarr/defaults/main.yml index 1244e1a7..c06ddbe8 100644 --- a/roles/bazarr/defaults/main.yml +++ b/roles/bazarr/defaults/main.yml @@ -13,4 +13,4 @@ bazarr_group_id: "0" # network bazarr_port: "6767" -bazarr_hostname: "bazarr" \ No newline at end of file +bazarr_hostname: "bazarr" diff --git a/roles/bazarr/tasks/main.yml b/roles/bazarr/tasks/main.yml index c77d29f9..f39329c4 100644 --- a/roles/bazarr/tasks/main.yml +++ b/roles/bazarr/tasks/main.yml @@ -29,4 +29,4 @@ traefik.http.routers.bazarr.tls.certresolver: "letsencrypt" traefik.http.routers.bazarr.tls.domains[0].main: "{{ ansible_nas_domain }}" traefik.http.routers.bazarr.tls.domains[0].sans: "*.{{ ansible_nas_domain }}" - traefik.http.services.bazarr.loadbalancer.server.port: "6767" \ No newline at end of file + traefik.http.services.bazarr.loadbalancer.server.port: "6767" diff --git a/roles/bitwarden/defaults/main.yml b/roles/bitwarden/defaults/main.yml index 954b29bf..13c38b7c 100644 --- a/roles/bitwarden/defaults/main.yml +++ b/roles/bitwarden/defaults/main.yml @@ -13,4 +13,4 @@ bitwarden_admin_token: qwertyuiop1234567890poiuytrewq0987654321 # To create a user set this to "true", and reprovision the container by re-running the ansible-nas playbook. # Once you have created your user, set to "false" and run one more time. # Target just Bitwarden by running: ansible-playbook -i inventory nas.yml -b -K -t bitwarden -bitwarden_allow_signups: false \ No newline at end of file +bitwarden_allow_signups: false diff --git a/roles/bitwarden/tasks/main.yml b/roles/bitwarden/tasks/main.yml index a18fdc4e..133e0aae 100644 --- a/roles/bitwarden/tasks/main.yml +++ b/roles/bitwarden/tasks/main.yml @@ -1,3 +1,4 @@ +--- - name: Create Bitwarden Directories file: path: "{{ item }}" @@ -28,7 +29,6 @@ traefik.hub.port: "bitwarden_port_b" traefik.hub.protocol: "ws" restart_policy: unless-stopped - #memory: 1g - name: Bitwarden Backup Container docker_container: diff --git a/roles/cloudflare_ddns/templates/config.yml b/roles/cloudflare_ddns/templates/config.yml index 6cf189f1..7d200c31 100644 --- a/roles/cloudflare_ddns/templates/config.yml +++ b/roles/cloudflare_ddns/templates/config.yml @@ -1,3 +1,4 @@ +--- auth: scopedToken: "{{ cloudflare_token }}" domains: diff --git a/roles/couchpotato/defaults/main.yml b/roles/couchpotato/defaults/main.yml index 7644aba1..6b1d4c0b 100644 --- a/roles/couchpotato/defaults/main.yml +++ b/roles/couchpotato/defaults/main.yml @@ -13,4 +13,4 @@ couchpotato_user_id: "0" couchpotato_group_id: "0" # network -couchpotato_port: "5050" \ No newline at end of file +couchpotato_port: "5050" diff --git a/roles/couchpotato/tasks/main.yml b/roles/couchpotato/tasks/main.yml index f6beb35a..320d6c6d 100644 --- a/roles/couchpotato/tasks/main.yml +++ b/roles/couchpotato/tasks/main.yml @@ -31,4 +31,4 @@ traefik.http.routers.couchpotato.tls.certresolver: "letsencrypt" traefik.http.routers.couchpotato.tls.domains[0].main: "{{ ansible_nas_domain }}" traefik.http.routers.couchpotato.tls.domains[0].sans: "*.{{ ansible_nas_domain }}" - traefik.http.services.couchpotato.loadbalancer.server.port: "5050" \ No newline at end of file + traefik.http.services.couchpotato.loadbalancer.server.port: "5050" diff --git a/roles/deluge/defaults/main.yml b/roles/deluge/defaults/main.yml index 604bdb9b..aef7ab9f 100644 --- a/roles/deluge/defaults/main.yml +++ b/roles/deluge/defaults/main.yml @@ -18,4 +18,4 @@ deluge_log_level: "error" deluge_port: "8112" deluge_hostname: "deluge" -deluge_timezone: "{{ ansible_nas_timezone }}" \ No newline at end of file +deluge_timezone: "{{ ansible_nas_timezone }}" diff --git a/roles/deluge/tasks/main.yml b/roles/deluge/tasks/main.yml index bf2e4f44..1bf57d87 100644 --- a/roles/deluge/tasks/main.yml +++ b/roles/deluge/tasks/main.yml @@ -30,4 +30,4 @@ traefik.http.routers.deluge.tls.certresolver: "letsencrypt" traefik.http.routers.deluge.tls.domains[0].main: "{{ ansible_nas_domain }}" traefik.http.routers.deluge.tls.domains[0].sans: "*.{{ ansible_nas_domain }}" - traefik.http.services.deluge.loadbalancer.server.port: "8112" \ No newline at end of file + traefik.http.services.deluge.loadbalancer.server.port: "8112" diff --git a/roles/emby/defaults/main.yml b/roles/emby/defaults/main.yml index 4c72091e..34016270 100644 --- a/roles/emby/defaults/main.yml +++ b/roles/emby/defaults/main.yml @@ -20,4 +20,4 @@ emby_group_id: "0" # network emby_port_http: "8096" emby_port_https: "8920" -emby_hostname: "emby" \ No newline at end of file +emby_hostname: "emby" diff --git a/roles/emby/tasks/main.yml b/roles/emby/tasks/main.yml index 3dd068f6..3d1dce66 100644 --- a/roles/emby/tasks/main.yml +++ b/roles/emby/tasks/main.yml @@ -1,3 +1,4 @@ +--- - name: Create Emby Directories file: path: "{{ item }}" @@ -29,4 +30,4 @@ traefik.http.routers.emby.tls.certresolver: "letsencrypt" traefik.http.routers.emby.tls.domains[0].main: "{{ ansible_nas_domain }}" traefik.http.routers.emby.tls.domains[0].sans: "*.{{ ansible_nas_domain }}" - traefik.http.services.emby.loadbalancer.server.port: "8096" \ No newline at end of file + traefik.http.services.emby.loadbalancer.server.port: "8096" diff --git a/roles/get_iplayer/tasks/main.yml b/roles/get_iplayer/tasks/main.yml index e4e32bfb..42b2d130 100644 --- a/roles/get_iplayer/tasks/main.yml +++ b/roles/get_iplayer/tasks/main.yml @@ -1,3 +1,4 @@ +--- - name: Create get_iplayer Directories file: path: "{{ item }}" @@ -18,4 +19,3 @@ - "{{ get_iplayer_port }}:8181" restart_policy: unless-stopped memory: "{{ get_iplayer_memory }}" - diff --git a/roles/gitea/defaults/main.yml b/roles/gitea/defaults/main.yml index 86f4981a..170069d5 100644 --- a/roles/gitea/defaults/main.yml +++ b/roles/gitea/defaults/main.yml @@ -8,4 +8,4 @@ gitea_data_directory: "{{ docker_home }}/gitea" # network gitea_hostname: "gitea" gitea_port_http: "3001" -gitea_port_ssh: "222" \ No newline at end of file +gitea_port_ssh: "222" diff --git a/roles/gitea/tasks/main.yml b/roles/gitea/tasks/main.yml index 7a0ab802..3506a1a6 100644 --- a/roles/gitea/tasks/main.yml +++ b/roles/gitea/tasks/main.yml @@ -47,7 +47,7 @@ image: gitea/gitea:1.6 pull: true links: - - gitea-mysql:db + - gitea-mysql:db volumes: - "{{ gitea_data_directory }}/gitea:/data:rw" ports: diff --git a/roles/heimdall/defaults/main.yml b/roles/heimdall/defaults/main.yml index 342190bd..7f9084c3 100644 --- a/roles/heimdall/defaults/main.yml +++ b/roles/heimdall/defaults/main.yml @@ -13,4 +13,4 @@ heimdall_hostname: heimdall # uid / gid heimdall_user_id: "1310" -heimdall_group_id: "1310" \ No newline at end of file +heimdall_group_id: "1310" diff --git a/roles/heimdall/tasks/main.yml b/roles/heimdall/tasks/main.yml index 75896a78..dcbbc581 100644 --- a/roles/heimdall/tasks/main.yml +++ b/roles/heimdall/tasks/main.yml @@ -46,4 +46,4 @@ traefik.http.routers.heimdall.tls.certresolver: "letsencrypt" traefik.http.routers.heimdall.tls.domains[0].main: "{{ ansible_nas_domain }}" traefik.http.routers.heimdall.tls.domains[0].sans: "*.{{ ansible_nas_domain }}" - traefik.http.services.heimdall.loadbalancer.server.port: "80" \ No newline at end of file + traefik.http.services.heimdall.loadbalancer.server.port: "80" diff --git a/roles/homeassistant/defaults/main.yml b/roles/homeassistant/defaults/main.yml index 1101b8b2..37e53cb9 100644 --- a/roles/homeassistant/defaults/main.yml +++ b/roles/homeassistant/defaults/main.yml @@ -7,4 +7,4 @@ homeassistant_data_directory: "{{ docker_home }}/homeassistant" # network homeassistant_port: "8123" -homeassistant_hostname: "homeassistant" \ No newline at end of file +homeassistant_hostname: "homeassistant" diff --git a/roles/homeassistant/tasks/main.yml b/roles/homeassistant/tasks/main.yml index 960eda88..96727cad 100644 --- a/roles/homeassistant/tasks/main.yml +++ b/roles/homeassistant/tasks/main.yml @@ -1,3 +1,4 @@ +--- - name: Create Home Assistant Directories file: path: "{{ item }}" diff --git a/roles/jackett/tasks/main.yml b/roles/jackett/tasks/main.yml index 8aa82011..f3ae4ae3 100644 --- a/roles/jackett/tasks/main.yml +++ b/roles/jackett/tasks/main.yml @@ -25,4 +25,4 @@ traefik.http.routers.jackett.tls.certresolver: "letsencrypt" traefik.http.routers.jackett.tls.domains[0].main: "{{ ansible_nas_domain }}" traefik.http.routers.jackett.tls.domains[0].sans: "*.{{ ansible_nas_domain }}" - traefik.http.services.jackett.loadbalancer.server.port: "9117" \ No newline at end of file + traefik.http.services.jackett.loadbalancer.server.port: "9117" diff --git a/roles/lidarr/defaults/main.yml b/roles/lidarr/defaults/main.yml index 5bdfe9a9..ecd533f6 100644 --- a/roles/lidarr/defaults/main.yml +++ b/roles/lidarr/defaults/main.yml @@ -13,4 +13,4 @@ lidarr_group_id: "0" # network lidarr_port: "8686" -lidarr_hostname: "lidarr" \ No newline at end of file +lidarr_hostname: "lidarr" diff --git a/roles/minidlna/tasks/main.yml b/roles/minidlna/tasks/main.yml index 3c6b13f2..8feb8ebd 100644 --- a/roles/minidlna/tasks/main.yml +++ b/roles/minidlna/tasks/main.yml @@ -14,4 +14,4 @@ MINIDLNA_PORT: "{{ minidlna_port }}" restart_policy: unless-stopped network_mode: host - memory: "{{ minidlna_memory }}" \ No newline at end of file + memory: "{{ minidlna_memory }}" diff --git a/roles/miniflux/tasks/main.yml b/roles/miniflux/tasks/main.yml index 7f174776..9c595c7a 100644 --- a/roles/miniflux/tasks/main.yml +++ b/roles/miniflux/tasks/main.yml @@ -25,7 +25,7 @@ image: miniflux/miniflux:latest pull: true links: - - miniflux-postgres:db + - miniflux-postgres:db ports: - "{{ miniflux_port }}:8080" env: diff --git a/roles/n8n/defaults/main.yml b/roles/n8n/defaults/main.yml index 67c6b7fe..b58cb74c 100644 --- a/roles/n8n/defaults/main.yml +++ b/roles/n8n/defaults/main.yml @@ -1,3 +1,4 @@ +--- n8n_enabled: false # Networking diff --git a/roles/netdata/defaults/main.yml b/roles/netdata/defaults/main.yml index 3c8823f2..8ee929f9 100644 --- a/roles/netdata/defaults/main.yml +++ b/roles/netdata/defaults/main.yml @@ -1,6 +1,7 @@ +--- netdata_enabled: false netdata_available_externally: "false" # network netdata_hostname: "netdata" -netdata_port: "19999" \ No newline at end of file +netdata_port: "19999" diff --git a/roles/netdata/tasks/main.yml b/roles/netdata/tasks/main.yml index 735d2a5c..61b4ab61 100644 --- a/roles/netdata/tasks/main.yml +++ b/roles/netdata/tasks/main.yml @@ -31,4 +31,4 @@ traefik.http.routers.netdata.tls.certresolver: "letsencrypt" traefik.http.routers.netdata.tls.domains[0].main: "{{ ansible_nas_domain }}" traefik.http.routers.netdata.tls.domains[0].sans: "*.{{ ansible_nas_domain }}" - traefik.http.services.netdata.loadbalancer.server.port: "19999" \ No newline at end of file + traefik.http.services.netdata.loadbalancer.server.port: "19999" diff --git a/roles/nextcloud/defaults/main.yml b/roles/nextcloud/defaults/main.yml index cd1b0cb4..1c9ef7fc 100644 --- a/roles/nextcloud/defaults/main.yml +++ b/roles/nextcloud/defaults/main.yml @@ -12,4 +12,4 @@ nextcloud_hostname: "nextcloud" # username / passwords nextcloud_sql_user: "nextcloud-user" nextcloud_sql_password: "nextcloud-pass" -nextcloud_sql_root_password: "nextcloud-secret" \ No newline at end of file +nextcloud_sql_root_password: "nextcloud-secret" diff --git a/roles/nextcloud/tasks/main.yml b/roles/nextcloud/tasks/main.yml index 7e652528..e97495b0 100644 --- a/roles/nextcloud/tasks/main.yml +++ b/roles/nextcloud/tasks/main.yml @@ -28,7 +28,7 @@ image: nextcloud:14 pull: true links: - - nextcloud-mysql:mysql + - nextcloud-mysql:mysql volumes: - "{{ nextcloud_data_directory }}/nextcloud:/var/www/html:rw" ports: @@ -48,4 +48,3 @@ traefik.http.routers.nextcloud.tls.domains[0].main: "{{ ansible_nas_domain }}" traefik.http.routers.nextcloud.tls.domains[0].sans: "*.{{ ansible_nas_domain }}" traefik.http.services.nextcloud.loadbalancer.server.port: "80" - diff --git a/roles/nzbget/tasks/main.yml b/roles/nzbget/tasks/main.yml index bd27a9e1..ca748292 100644 --- a/roles/nzbget/tasks/main.yml +++ b/roles/nzbget/tasks/main.yml @@ -28,4 +28,4 @@ traefik.http.routers.nzbget.tls.certresolver: "letsencrypt" traefik.http.routers.nzbget.tls.domains[0].main: "{{ ansible_nas_domain }}" traefik.http.routers.nzbget.tls.domains[0].sans: "*.{{ ansible_nas_domain }}" - traefik.http.services.nzbget.loadbalancer.server.port: "6789" \ No newline at end of file + traefik.http.services.nzbget.loadbalancer.server.port: "6789" diff --git a/roles/ombi/defaults/main.yml b/roles/ombi/defaults/main.yml index acd962c5..d4fe121e 100644 --- a/roles/ombi/defaults/main.yml +++ b/roles/ombi/defaults/main.yml @@ -11,4 +11,4 @@ ombi_hostname: "ombi" # uid / gid ombi_user_id: "0" -ombi_group_id: "0" \ No newline at end of file +ombi_group_id: "0" diff --git a/roles/ombi/tasks/main.yml b/roles/ombi/tasks/main.yml index 442ceb9b..2fd9abbd 100644 --- a/roles/ombi/tasks/main.yml +++ b/roles/ombi/tasks/main.yml @@ -1,4 +1,3 @@ - --- - name: Create Ombi Directories file: diff --git a/roles/organizr/defaults/main.yml b/roles/organizr/defaults/main.yml index 6823a3d6..7609056a 100644 --- a/roles/organizr/defaults/main.yml +++ b/roles/organizr/defaults/main.yml @@ -12,4 +12,4 @@ organizr_hostname: "organizr" # uid / gid organizr_user_id: "1000" -organizr_group_id: "1000" \ No newline at end of file +organizr_group_id: "1000" diff --git a/roles/plex/defaults/main.yml b/roles/plex/defaults/main.yml index 6c457b29..a4a022dd 100644 --- a/roles/plex/defaults/main.yml +++ b/roles/plex/defaults/main.yml @@ -33,7 +33,5 @@ plex_memory: "2g" # plex_devices: # - "/dev/dri:/dev/dri" - # see https://hub.docker.com/r/linuxserver/plex for details on this setting plex_version: "docker" - diff --git a/roles/portainer/defaults/main.yml b/roles/portainer/defaults/main.yml index 1ac3e2ec..af335e5c 100644 --- a/roles/portainer/defaults/main.yml +++ b/roles/portainer/defaults/main.yml @@ -7,4 +7,4 @@ portainer_data_directory: "{{ docker_home }}/portainer/config" # network portainer_port: "9000" -portainer_hostname: "portainer" \ No newline at end of file +portainer_hostname: "portainer" diff --git a/roles/radarr/defaults/main.yml b/roles/radarr/defaults/main.yml index 805ee8c8..daadf17e 100644 --- a/roles/radarr/defaults/main.yml +++ b/roles/radarr/defaults/main.yml @@ -13,4 +13,4 @@ radarr_group_id: "0" # network radarr_port: "7878" -radarr_hostname: "radarr" \ No newline at end of file +radarr_hostname: "radarr" diff --git a/roles/radarr/tasks/main.yml b/roles/radarr/tasks/main.yml index 80c615c6..40fdbc8f 100644 --- a/roles/radarr/tasks/main.yml +++ b/roles/radarr/tasks/main.yml @@ -29,4 +29,4 @@ traefik.http.routers.radarr.tls.certresolver: "letsencrypt" traefik.http.routers.radarr.tls.domains[0].main: "{{ ansible_nas_domain }}" traefik.http.routers.radarr.tls.domains[0].sans: "*.{{ ansible_nas_domain }}" - traefik.http.services.radarr.loadbalancer.server.port: "7878" \ No newline at end of file + traefik.http.services.radarr.loadbalancer.server.port: "7878" diff --git a/roles/sickchill/defaults/main.yml b/roles/sickchill/defaults/main.yml index a7cbfcc7..f49b3116 100644 --- a/roles/sickchill/defaults/main.yml +++ b/roles/sickchill/defaults/main.yml @@ -13,4 +13,4 @@ sickchill_group_id: "0" # network sickchill_port: "8081" -sickchill_hostname: "sickchill" \ No newline at end of file +sickchill_hostname: "sickchill" diff --git a/roles/sonarr/defaults/main.yml b/roles/sonarr/defaults/main.yml index 9004c5f0..ee928182 100644 --- a/roles/sonarr/defaults/main.yml +++ b/roles/sonarr/defaults/main.yml @@ -13,4 +13,4 @@ sonarr_group_id: "0" # network sonarr_port: "8989" -sonarr_hostname: "sonarr" \ No newline at end of file +sonarr_hostname: "sonarr" diff --git a/roles/sonarr/tasks/main.yml b/roles/sonarr/tasks/main.yml index 8af72def..d04d64c0 100644 --- a/roles/sonarr/tasks/main.yml +++ b/roles/sonarr/tasks/main.yml @@ -29,4 +29,4 @@ traefik.http.routers.sonarr.tls.certresolver: "letsencrypt" traefik.http.routers.sonarr.tls.domains[0].main: "{{ ansible_nas_domain }}" traefik.http.routers.sonarr.tls.domains[0].sans: "*.{{ ansible_nas_domain }}" - traefik.http.services.sonarr.loadbalancer.server.port: "8989" \ No newline at end of file + traefik.http.services.sonarr.loadbalancer.server.port: "8989" diff --git a/roles/syncthing/defaults/main.yml b/roles/syncthing/defaults/main.yml index 56bfacb1..20723bbf 100644 --- a/roles/syncthing/defaults/main.yml +++ b/roles/syncthing/defaults/main.yml @@ -14,4 +14,4 @@ syncthing_volumes: # network syncthing_port: 8384 -syncthing_hostname: syncthing \ No newline at end of file +syncthing_hostname: syncthing diff --git a/roles/syncthing/tasks/main.yml b/roles/syncthing/tasks/main.yml index cfe75a3c..4804db45 100644 --- a/roles/syncthing/tasks/main.yml +++ b/roles/syncthing/tasks/main.yml @@ -20,4 +20,4 @@ traefik.http.routers.syncthing.tls.certresolver: "letsencrypt" traefik.http.routers.syncthing.tls.domains[0].main: "{{ ansible_nas_domain }}" traefik.http.routers.syncthing.tls.domains[0].sans: "*.{{ ansible_nas_domain }}" - traefik.http.services.syncthing.loadbalancer.server.port: "8384" \ No newline at end of file + traefik.http.services.syncthing.loadbalancer.server.port: "8384" diff --git a/roles/tautulli/tasks/main.yml b/roles/tautulli/tasks/main.yml index 2b481399..60eb902e 100644 --- a/roles/tautulli/tasks/main.yml +++ b/roles/tautulli/tasks/main.yml @@ -1,3 +1,4 @@ +--- - name: Create Tautulli Directories file: path: "{{ item }}" @@ -29,4 +30,4 @@ traefik.http.routers.tautulli.tls.certresolver: "letsencrypt" traefik.http.routers.tautulli.tls.domains[0].main: "{{ ansible_nas_domain }}" traefik.http.routers.tautulli.tls.domains[0].sans: "*.{{ ansible_nas_domain }}" - traefik.http.services.tautulli.loadbalancer.server.port: "8181" \ No newline at end of file + traefik.http.services.tautulli.loadbalancer.server.port: "8181" diff --git a/roles/transmission-with-openvpn/defaults/main.yml b/roles/transmission-with-openvpn/defaults/main.yml index d58ff75e..206f0ee8 100644 --- a/roles/transmission-with-openvpn/defaults/main.yml +++ b/roles/transmission-with-openvpn/defaults/main.yml @@ -28,4 +28,4 @@ transmission_openvpn_hostname: "transmission_openvpn" openvpn_username: leisure-suit-larry openvpn_password: secretpassword openvpn_provider: AWESOMEVPNPROVIDER -openvpn_config: United-Kingdom \ No newline at end of file +openvpn_config: United-Kingdom diff --git a/roles/transmission/defaults/main.yml b/roles/transmission/defaults/main.yml index 8b466b6d..2f9d87ac 100644 --- a/roles/transmission/defaults/main.yml +++ b/roles/transmission/defaults/main.yml @@ -16,4 +16,4 @@ transmission_webui_port: "9092" transmission_external_port: "51414" transmission_hostname: "transmission" -transmission_timezone: "{{ ansible_nas_timezone }}" \ No newline at end of file +transmission_timezone: "{{ ansible_nas_timezone }}" diff --git a/roles/transmission/tasks/main.yml b/roles/transmission/tasks/main.yml index 99e2fe63..b1c8b447 100644 --- a/roles/transmission/tasks/main.yml +++ b/roles/transmission/tasks/main.yml @@ -34,4 +34,4 @@ traefik.http.routers.transmission.tls.certresolver: "letsencrypt" traefik.http.routers.transmission.tls.domains[0].main: "{{ ansible_nas_domain }}" traefik.http.routers.transmission.tls.domains[0].sans: "*.{{ ansible_nas_domain }}" - traefik.http.services.transmission.loadbalancer.server.port: "9091" \ No newline at end of file + traefik.http.services.transmission.loadbalancer.server.port: "9091" diff --git a/roles/utorrent/defaults/main.yml b/roles/utorrent/defaults/main.yml index 340b756a..0c03ae6b 100644 --- a/roles/utorrent/defaults/main.yml +++ b/roles/utorrent/defaults/main.yml @@ -14,4 +14,4 @@ utorrent_group_id: "0" # network utorrent_port_http: "8111" utorrent_port_bt: "6881" -utorrent_hostname: "utorrent" \ No newline at end of file +utorrent_hostname: "utorrent" diff --git a/roles/watchtower/tasks/main.yml b/roles/watchtower/tasks/main.yml index 65ed092c..10cd77b3 100644 --- a/roles/watchtower/tasks/main.yml +++ b/roles/watchtower/tasks/main.yml @@ -10,4 +10,4 @@ TZ: "{{ ansible_nas_timezone }}" command: "{{ watchtower_command }}" restart_policy: unless-stopped - memory: 1g \ No newline at end of file + memory: 1g diff --git a/tasks/calibre.yml b/tasks/calibre.yml index b19d0187..99400507 100644 --- a/tasks/calibre.yml +++ b/tasks/calibre.yml @@ -1,3 +1,4 @@ +--- - name: Create Calibre-web Directories file: path: "{{ item }}" diff --git a/tasks/glances.yml b/tasks/glances.yml index 20bc1387..4f06b1bb 100644 --- a/tasks/glances.yml +++ b/tasks/glances.yml @@ -1,3 +1,4 @@ +--- - name: Glances Docker Container docker_container: name: glances @@ -7,7 +8,6 @@ - "{{ glances_port_one }}:61208" - "{{ glances_port_two }}:61209" volumes: - #- "/glances.conf:/glances/conf/glances.conf" - "/var/run/docker.sock:/var/run/docker.sock:ro" - "/etc/timezone:/etc/timezone:ro" pid_mode: host @@ -21,4 +21,4 @@ traefik.http.routers.glances.tls.certresolver: "letsencrypt" traefik.http.routers.glances.tls.domains[0].main: "{{ ansible_nas_domain }}" traefik.http.routers.glances.tls.domains[0].sans: "*.{{ ansible_nas_domain }}" - traefik.http.services.glances.loadbalancer.server.port: "61208" \ No newline at end of file + traefik.http.services.glances.loadbalancer.server.port: "61208" diff --git a/tasks/guacamole.yml b/tasks/guacamole.yml index 50b591ef..770e20bf 100644 --- a/tasks/guacamole.yml +++ b/tasks/guacamole.yml @@ -51,4 +51,4 @@ docker_container: name: guacamole image: "oznu/guacamole" - restart: true \ No newline at end of file + restart: true diff --git a/tasks/jellyfin.yml b/tasks/jellyfin.yml index be7b40ae..557121c2 100644 --- a/tasks/jellyfin.yml +++ b/tasks/jellyfin.yml @@ -1,3 +1,4 @@ +--- - name: Create Jellyfin Directories file: path: "{{ item }}" diff --git a/tasks/joomla.yml b/tasks/joomla.yml index 0f93e844..a0e1b20e 100644 --- a/tasks/joomla.yml +++ b/tasks/joomla.yml @@ -44,4 +44,4 @@ traefik.http.routers.joomla.tls.certresolver: "letsencrypt" traefik.http.routers.joomla.tls.domains[0].main: "{{ ansible_nas_domain }}" traefik.http.routers.joomla.tls.domains[0].sans: "*.{{ ansible_nas_domain }}" - traefik.http.services.joomla.loadbalancer.server.port: "80" \ No newline at end of file + traefik.http.services.joomla.loadbalancer.server.port: "80" diff --git a/tasks/krusader.yml b/tasks/krusader.yml index c5afd15b..d9becf59 100644 --- a/tasks/krusader.yml +++ b/tasks/krusader.yml @@ -1,4 +1,3 @@ - --- - name: Krusader Directory file: diff --git a/tasks/mosquitto.yml b/tasks/mosquitto.yml index 1d1e2232..93f8ff4a 100644 --- a/tasks/mosquitto.yml +++ b/tasks/mosquitto.yml @@ -1,3 +1,4 @@ +--- - name: Create Mosquitto Directories file: path: "{{ item }}" diff --git a/tasks/stats.yml b/tasks/stats.yml index fcaffaa9..5ba7df3f 100644 --- a/tasks/stats.yml +++ b/tasks/stats.yml @@ -114,4 +114,4 @@ traefik.http.routers.grafana.tls.certresolver: "letsencrypt" traefik.http.routers.grafana.tls.domains[0].main: "{{ ansible_nas_domain }}" traefik.http.routers.grafana.tls.domains[0].sans: "*.{{ ansible_nas_domain }}" - traefik.http.grafana.netdata.loadbalancer.server.port: "3000" \ No newline at end of file + traefik.http.grafana.netdata.loadbalancer.server.port: "3000" diff --git a/tasks/thelounge.yml b/tasks/thelounge.yml index 920e4ca3..8c848446 100644 --- a/tasks/thelounge.yml +++ b/tasks/thelounge.yml @@ -33,4 +33,3 @@ traefik.http.routers.thelounge.tls.domains[0].main: "{{ ansible_nas_domain }}" traefik.http.routers.thelounge.tls.domains[0].sans: "*.{{ ansible_nas_domain }}" traefik.http.services.thelounge.loadbalancer.server.port: "9000" - diff --git a/tasks/wallabag.yml b/tasks/wallabag.yml index b98968c0..c7b811a2 100644 --- a/tasks/wallabag.yml +++ b/tasks/wallabag.yml @@ -1,3 +1,4 @@ +--- - name: Create Wallabag Directories file: path: "{{ item }}" @@ -26,4 +27,4 @@ traefik.http.routers.wallabag.tls.certresolver: "letsencrypt" traefik.http.routers.wallabag.tls.domains[0].main: "{{ ansible_nas_domain }}" traefik.http.routers.wallabag.tls.domains[0].sans: "*.{{ ansible_nas_domain }}" - traefik.http.services.wallabag.loadbalancer.server.port: "80" \ No newline at end of file + traefik.http.services.wallabag.loadbalancer.server.port: "80" diff --git a/tasks/youtubedlmaterial.yml b/tasks/youtubedlmaterial.yml index f7f3cc6c..85a2c93d 100644 --- a/tasks/youtubedlmaterial.yml +++ b/tasks/youtubedlmaterial.yml @@ -1,4 +1,3 @@ - --- - name: YouTubeDL-Material Directory file: diff --git a/templates/grafana/provisioning/datasources/ansible-nas.yml b/templates/grafana/provisioning/datasources/ansible-nas.yml index e67b3cfb..e53dddc2 100644 --- a/templates/grafana/provisioning/datasources/ansible-nas.yml +++ b/templates/grafana/provisioning/datasources/ansible-nas.yml @@ -1,43 +1,25 @@ -# config file version +--- apiVersion: 1 -# list of datasources to insert/update depending -# whats available in the database datasources: - # name of the datasource. Required -- name: InfluxDB - # datasource type. Required - type: influxdb - # access mode. direct or proxy. Required - access: proxy - # org id. will default to orgId 1 if not specified - orgId: 1 - # url - url: http://{{ hostvars[inventory_hostname]['ansible_default_ipv4']['address'] }}:8086 - # database password, if used - password: - # database user, if used - user: - # database name, if used - database: telegraf - # enable/disable basic auth - basicAuth: - # basic auth username - basicAuthUser: - # basic auth password - basicAuthPassword: - # enable/disable with credentials headers - withCredentials: - # mark as default datasource. Max one per org - isDefault: true - # fields that will be converted to json and stored in json_data - jsonData: - timeInterval: "15s" - # json object of data that will be encrypted. - secureJsonData: - tlsCACert: "..." - tlsClientCert: "..." - tlsClientKey: "..." - version: 1 - # allow users to edit datasources from the UI. - editable: false + - name: InfluxDB + type: influxdb + access: proxy + orgId: 1 + url: http://{{ hostvars[inventory_hostname]['ansible_default_ipv4']['address'] }}:8086 + password: + user: + database: telegraf + basicAuth: + basicAuthUser: + basicAuthPassword: + withCredentials: + isDefault: true + jsonData: + timeInterval: "15s" + secureJsonData: + tlsCACert: "..." + tlsClientCert: "..." + tlsClientKey: "..." + version: 1 + editable: false diff --git a/tests/test.sh b/tests/test.sh index a69339ad..7c890a94 100755 --- a/tests/test.sh +++ b/tests/test.sh @@ -23,7 +23,7 @@ neutral='\033[0m' timestamp=$(date +%s) # Allow environment variables to override defaults. -distro=${distro:-"ubuntu1804"} +distro=${distro:-"ubuntu2004"} docker_owner=${docker_owner:-"geerlingguy"} playbook=${playbook:-"nas.yml"} cleanup=${cleanup:-"true"}