Yamllint FTW

This commit is contained in:
Dave Stephens 2021-02-21 19:50:07 +00:00
parent a2976d73e6
commit c8e887207d
76 changed files with 178 additions and 186 deletions

1
.github/FUNDING.yml vendored
View file

@ -1 +1,2 @@
---
ko_fi: davestephens

View file

@ -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 .

View file

@ -1,5 +1,4 @@
# This is a basic workflow to help you get started with Actions
---
name: Integration
# Controls when the action will run.
@ -8,7 +7,6 @@ on:
workflow_dispatch:
jobs:
test:
name: Test
runs-on: ubuntu-20.04

1
.gitignore vendored
View file

@ -4,6 +4,7 @@ site
*.retry
*.log
inventories
.cache
# Vim
[._]sw[a-p]

16
.yamllint Normal file
View file

@ -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

View file

@ -1,24 +1,15 @@
---
apiVersion: 1
providers:
# <string> an unique provider name
- name: 'Ansible-NAS Dashboards'
# <int> org id. will default to orgId 1 if not specified
- name: 'Ansible-NAS Dashboards'
orgId: 1
# <string, required> name of the dashboard folder. Required
folder: 'Ansible-NAS'
# <string> folder UID. will be automatically generated if not specified
folderUid: ''
# <string, required> provider type. Required
type: file
# <bool> disable dashboard deletion
disableDeletion: false
# <bool> enable dashboard editing
editable: true
# <int> how often Grafana will scan for changed dashboards
updateIntervalSeconds: 60
# <bool> allow updating provisioned dashboards from the UI
allowUiUpdates: false
options:
# <string, required> path to dashboard files on disk. Required
path: /var/lib/grafana/dashboards/ansible-nas

View file

@ -1,3 +1,4 @@
---
## ._____. .__
## _____ ____ _____|__\_ |__ | | ____ ____ _____ ______
## \__ \ / \ / ___/ || __ \| | _/ __ \ ______ / \\__ \ / ___/

View file

@ -1,3 +1,4 @@
---
## ._____. .__
## _____ ____ _____|__\_ |__ | | ____ ____ _____ ______
## \__ \ / \ / ___/ || __ \| | _/ __ \ ______ / \\__ \ / ___/
@ -15,4 +16,3 @@ ansible_nas_timezone: Etc/UTC
## Enable some applications
heimdall_enabled: true
portainer_enabled: true

View file

@ -1,3 +1,4 @@
---
# Project information
site_name: 'Ansible-NAS'
site_description: 'Build a fully functional NAS with an Ubuntu box and this playbook'

View file

@ -17,5 +17,3 @@
mode: "u=rwX,g=rwX,o=rX"
recurse: true
loop: "{{ samba_shares }}"

View file

@ -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"

View file

@ -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:

View file

@ -1,3 +1,4 @@
---
auth:
scopedToken: "{{ cloudflare_token }}"
domains:

View file

@ -1,3 +1,4 @@
---
- name: Create Emby Directories
file:
path: "{{ item }}"

View file

@ -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 }}"

View file

@ -1,3 +1,4 @@
---
- name: Create Home Assistant Directories
file:
path: "{{ item }}"

View file

@ -1,3 +1,4 @@
---
n8n_enabled: false
# Networking

View file

@ -1,3 +1,4 @@
---
netdata_enabled: false
netdata_available_externally: "false"

View file

@ -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"

View file

@ -1,4 +1,3 @@
---
- name: Create Ombi Directories
file:

View file

@ -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"

View file

@ -1,3 +1,4 @@
---
- name: Create Tautulli Directories
file:
path: "{{ item }}"

View file

@ -1,3 +1,4 @@
---
- name: Create Calibre-web Directories
file:
path: "{{ item }}"

View file

@ -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

View file

@ -1,3 +1,4 @@
---
- name: Create Jellyfin Directories
file:
path: "{{ item }}"

View file

@ -1,4 +1,3 @@
---
- name: Krusader Directory
file:

View file

@ -1,3 +1,4 @@
---
- name: Create Mosquitto Directories
file:
path: "{{ item }}"

View file

@ -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"

View file

@ -1,3 +1,4 @@
---
- name: Create Wallabag Directories
file:
path: "{{ item }}"

View file

@ -1,4 +1,3 @@
---
- name: YouTubeDL-Material Directory
file:

View file

@ -1,43 +1,25 @@
# config file version
---
apiVersion: 1
# list of datasources to insert/update depending
# whats available in the database
datasources:
# <string, required> name of the datasource. Required
- name: InfluxDB
# <string, required> datasource type. Required
- name: InfluxDB
type: influxdb
# <string, required> access mode. direct or proxy. Required
access: proxy
# <int> org id. will default to orgId 1 if not specified
orgId: 1
# <string> url
url: http://{{ hostvars[inventory_hostname]['ansible_default_ipv4']['address'] }}:8086
# <string> database password, if used
password:
# <string> database user, if used
user:
# <string> database name, if used
database: telegraf
# <bool> enable/disable basic auth
basicAuth:
# <string> basic auth username
basicAuthUser:
# <string> basic auth password
basicAuthPassword:
# <bool> enable/disable with credentials headers
withCredentials:
# <bool> mark as default datasource. Max one per org
isDefault: true
# <map> fields that will be converted to json and stored in json_data
jsonData:
timeInterval: "15s"
# <string> json object of data that will be encrypted.
secureJsonData:
tlsCACert: "..."
tlsClientCert: "..."
tlsClientKey: "..."
version: 1
# <bool> allow users to edit datasources from the UI.
editable: false

View file

@ -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"}