mirror of
https://github.com/davestephens/ansible-nas
synced 2025-01-12 19:48:47 +00:00
Admin: Ansible-lint, recommended VSCode extensions, line-ending cleanup
This commit is contained in:
parent
482e3faa9e
commit
6892ed515c
11 changed files with 126 additions and 101 deletions
6
.vscode/extensions.json
vendored
Normal file
6
.vscode/extensions.json
vendored
Normal file
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"recommendations": [
|
||||
"haaaad.ansible",
|
||||
"ybaumes.highlight-trailing-white-spaces"
|
||||
]
|
||||
}
|
6
.vscode/tasks.json
vendored
6
.vscode/tasks.json
vendored
|
@ -20,6 +20,12 @@
|
|||
"kind": "test",
|
||||
"isDefault": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"label": "Run Ansible-Lint",
|
||||
"type": "shell",
|
||||
"command": "ansible-lint nas.yml",
|
||||
"group": "test"
|
||||
}
|
||||
]
|
||||
}
|
12
nas.yml
12
nas.yml
|
@ -81,5 +81,13 @@
|
|||
tags: guacamole
|
||||
|
||||
roles:
|
||||
- bertvv.samba
|
||||
- geerlingguy.docker
|
||||
- role: bertvv.samba
|
||||
tags:
|
||||
- samba
|
||||
- skip_ansible_lint
|
||||
|
||||
- role: geerlingguy.docker
|
||||
tags:
|
||||
- docker
|
||||
- skip_ansible_lint
|
||||
|
||||
|
|
|
@ -31,4 +31,6 @@
|
|||
service:
|
||||
name: docker
|
||||
state: restarted
|
||||
when: docker_config.changed
|
||||
when: docker_config.changed
|
||||
tags:
|
||||
- skip_ansible_lint
|
|
@ -1,25 +1,25 @@
|
|||
- name: Create Emby Directories
|
||||
file:
|
||||
path: "{{ item }}"
|
||||
state: directory
|
||||
with_items:
|
||||
- "{{ emby_config_directory }}"
|
||||
|
||||
- name: emby Docker Container
|
||||
docker_container:
|
||||
name: emby
|
||||
image: emby/embyserver
|
||||
pull: true
|
||||
volumes:
|
||||
- "{{ emby_config_directory }}:/config:rw"
|
||||
- "{{ emby_movies_directory }}:/movies:rw"
|
||||
- "{{ emby_tv_directory }}:/tv:rw"
|
||||
ports:
|
||||
- "8096:8096" # HTTP port
|
||||
- "8920:8920" # HTTPS port
|
||||
env:
|
||||
TZ: "{{ ansible_nas_timezone }}"
|
||||
PUID: "{{ emby_user_id }}"
|
||||
PGID: "{{ emby_group_id }}"
|
||||
restart_policy: unless-stopped
|
||||
memory: 1g
|
||||
- name: Create Emby Directories
|
||||
file:
|
||||
path: "{{ item }}"
|
||||
state: directory
|
||||
with_items:
|
||||
- "{{ emby_config_directory }}"
|
||||
|
||||
- name: emby Docker Container
|
||||
docker_container:
|
||||
name: emby
|
||||
image: emby/embyserver
|
||||
pull: true
|
||||
volumes:
|
||||
- "{{ emby_config_directory }}:/config:rw"
|
||||
- "{{ emby_movies_directory }}:/movies:rw"
|
||||
- "{{ emby_tv_directory }}:/tv:rw"
|
||||
ports:
|
||||
- "8096:8096" # HTTP port
|
||||
- "8920:8920" # HTTPS port
|
||||
env:
|
||||
TZ: "{{ ansible_nas_timezone }}"
|
||||
PUID: "{{ emby_user_id }}"
|
||||
PGID: "{{ emby_group_id }}"
|
||||
restart_policy: unless-stopped
|
||||
memory: 1g
|
||||
|
|
|
@ -9,6 +9,8 @@
|
|||
upgrade: true
|
||||
state: latest
|
||||
when: keep_packages_updated == true
|
||||
tags:
|
||||
- skip_ansible_lint
|
||||
|
||||
- name: Install some packages
|
||||
apt:
|
||||
|
|
138
tasks/gitea.yml
138
tasks/gitea.yml
|
@ -1,69 +1,69 @@
|
|||
---
|
||||
- name: Create Gitea group account
|
||||
group:
|
||||
name: git
|
||||
gid: 1309
|
||||
state: present
|
||||
|
||||
- name: Create Gitea user account
|
||||
user:
|
||||
name: git
|
||||
uid: 1309
|
||||
state: present
|
||||
system: yes
|
||||
update_password: on_create
|
||||
create_home: no
|
||||
group: git
|
||||
|
||||
- name: Create Gitea Directories
|
||||
file:
|
||||
path: "{{ item }}"
|
||||
state: directory
|
||||
owner: git
|
||||
group: git
|
||||
recurse: yes
|
||||
with_items:
|
||||
- "{{ gitea_data_directory }}/gitea"
|
||||
- "{{ gitea_data_directory }}/mysql"
|
||||
|
||||
- name: Create MySQL container for Gitea
|
||||
docker_container:
|
||||
name: gitea-mysql
|
||||
image: mysql:5.7
|
||||
pull: true
|
||||
volumes:
|
||||
- "{{ gitea_data_directory }}/mysql:/var/lib/mysql:rw"
|
||||
env:
|
||||
MYSQL_DATABASE: gitea
|
||||
MYSQL_USER: gitea
|
||||
MYSQL_PASSWORD: gitea
|
||||
MYSQL_ROOT_PASSWORD: gitea
|
||||
restart_policy: unless-stopped
|
||||
memory: 1g
|
||||
|
||||
- name: Create Gitea container
|
||||
docker_container:
|
||||
name: gitea
|
||||
image: gitea/gitea:1.6
|
||||
pull: true
|
||||
links:
|
||||
- gitea-mysql:db
|
||||
volumes:
|
||||
- "{{ gitea_data_directory }}/gitea:/data:rw"
|
||||
ports:
|
||||
- "3001:3000"
|
||||
- "222:22"
|
||||
env:
|
||||
DB_TYPE: mysql
|
||||
DB_HOST: db:3306
|
||||
DB_NAME: gitea
|
||||
DB_USER: gitea
|
||||
DB_PASSWD: gitea
|
||||
RUN_MODE: prod
|
||||
SSH_DOMAIN: "{{ ansible_nas_hostname }}"
|
||||
SSH_PORT: 222
|
||||
ROOT_URL: "http://{{ ansible_nas_hostname }}:3001/"
|
||||
USER_UID: 1309
|
||||
USER_GID: 1309
|
||||
restart_policy: unless-stopped
|
||||
memory: 1g
|
||||
---
|
||||
- name: Create Gitea group account
|
||||
group:
|
||||
name: git
|
||||
gid: 1309
|
||||
state: present
|
||||
|
||||
- name: Create Gitea user account
|
||||
user:
|
||||
name: git
|
||||
uid: 1309
|
||||
state: present
|
||||
system: yes
|
||||
update_password: on_create
|
||||
create_home: no
|
||||
group: git
|
||||
|
||||
- name: Create Gitea Directories
|
||||
file:
|
||||
path: "{{ item }}"
|
||||
state: directory
|
||||
owner: git
|
||||
group: git
|
||||
recurse: yes
|
||||
with_items:
|
||||
- "{{ gitea_data_directory }}/gitea"
|
||||
- "{{ gitea_data_directory }}/mysql"
|
||||
|
||||
- name: Create MySQL container for Gitea
|
||||
docker_container:
|
||||
name: gitea-mysql
|
||||
image: mysql:5.7
|
||||
pull: true
|
||||
volumes:
|
||||
- "{{ gitea_data_directory }}/mysql:/var/lib/mysql:rw"
|
||||
env:
|
||||
MYSQL_DATABASE: gitea
|
||||
MYSQL_USER: gitea
|
||||
MYSQL_PASSWORD: gitea
|
||||
MYSQL_ROOT_PASSWORD: gitea
|
||||
restart_policy: unless-stopped
|
||||
memory: 1g
|
||||
|
||||
- name: Create Gitea container
|
||||
docker_container:
|
||||
name: gitea
|
||||
image: gitea/gitea:1.6
|
||||
pull: true
|
||||
links:
|
||||
- gitea-mysql:db
|
||||
volumes:
|
||||
- "{{ gitea_data_directory }}/gitea:/data:rw"
|
||||
ports:
|
||||
- "3001:3000"
|
||||
- "222:22"
|
||||
env:
|
||||
DB_TYPE: mysql
|
||||
DB_HOST: db:3306
|
||||
DB_NAME: gitea
|
||||
DB_USER: gitea
|
||||
DB_PASSWD: gitea
|
||||
RUN_MODE: prod
|
||||
SSH_DOMAIN: "{{ ansible_nas_hostname }}"
|
||||
SSH_PORT: 222
|
||||
ROOT_URL: "http://{{ ansible_nas_hostname }}:3001/"
|
||||
USER_UID: 1309
|
||||
USER_GID: 1309
|
||||
restart_policy: unless-stopped
|
||||
memory: 1g
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
MYSQL_DATABASE: guacamole
|
||||
MYSQL_USER: guacamole-user
|
||||
MYSQL_PASSWORD: guacamole-pass
|
||||
MYSQL_ROOT_PASSWORD: guacamole-secret
|
||||
MYSQL_ROOT_PASSWORD: guacamole-secret
|
||||
restart_policy: unless-stopped
|
||||
memory: 1g
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
MYSQL_DATABASE: nextcloud
|
||||
MYSQL_USER: nextcloud-user
|
||||
MYSQL_PASSWORD: nextcloud-pass
|
||||
MYSQL_ROOT_PASSWORD: nextcloud-secret
|
||||
MYSQL_ROOT_PASSWORD: nextcloud-secret
|
||||
restart_policy: unless-stopped
|
||||
memory: 1g
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
- name: Nginx Letsencrypt Container is absent
|
||||
docker_container:
|
||||
name: letsencrypt-nginx-proxy-companion
|
||||
state: absent
|
||||
state: absent
|
||||
|
||||
- name: Create Trafik Directories
|
||||
file:
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
---
|
||||
- include_vars: group_vars/vpn_credentials.yml
|
||||
- name: Include VPN credentials
|
||||
include_vars: group_vars/vpn_credentials.yml
|
||||
|
||||
- name: Create Transmission Directories
|
||||
file:
|
||||
|
|
Loading…
Reference in a new issue