Compare commits
7 commits
9a8c4ae81f
...
4a5a0beca1
| Author | SHA1 | Date | |
|---|---|---|---|
| 4a5a0beca1 | |||
| c5448b17cc | |||
| 84d7319465 | |||
| 6b26ba444b | |||
| 8dafc38a83 | |||
| 5b7f80bd29 | |||
| dc9ee09360 |
8 changed files with 43 additions and 27 deletions
|
|
@ -21,6 +21,5 @@ galaxy_info:
|
||||||
# NOTE: A tag is limited to a single word comprised of alphanumeric characters.
|
# NOTE: A tag is limited to a single word comprised of alphanumeric characters.
|
||||||
# Maximum 20 tags per role.
|
# Maximum 20 tags per role.
|
||||||
|
|
||||||
dependencies: []
|
dependencies:
|
||||||
# List your role dependencies here, one per line. Be sure to remove the '[]' above,
|
- caddy
|
||||||
# if you add dependencies to this list.
|
|
||||||
|
|
|
||||||
|
|
@ -197,9 +197,9 @@ services:
|
||||||
networks:
|
networks:
|
||||||
- caddy
|
- caddy
|
||||||
volumes:
|
volumes:
|
||||||
- {{ arrstack_env_dir }}/config/homarr/configs:/app/data/configs
|
- "{{ arrstack_env_dir }}/config/homarr/configs:/app/data/configs"
|
||||||
- {{ arrstack_env_dir }}/config/homarr/icons:/app/public/icons
|
- "{{ arrstack_env_dir }}/config/homarr/icons:/app/public/icons"
|
||||||
- {{ arrstack_env_dir }}/config/homarr/data:/data
|
- "{{ arrstack_env_dir }}/config/homarr/data:/data"
|
||||||
- /var/run/docker.sock:/var/run/docker.sock # Optional, only if you want docker integration
|
- /var/run/docker.sock:/var/run/docker.sock # Optional, only if you want docker integration
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
labels:
|
labels:
|
||||||
|
|
@ -290,10 +290,10 @@ services:
|
||||||
caddy: "{{ arrstack_gonic_subdomain }}"
|
caddy: "{{ arrstack_gonic_subdomain }}"
|
||||||
caddy.reverse_proxy: "{{ '{{' }}upstreams 80{{ '}}'}}"
|
caddy.reverse_proxy: "{{ '{{' }}upstreams 80{{ '}}'}}"
|
||||||
|
|
||||||
{% if restic_enable is not undefined and not false and arrstack_restic_enable is not undefined and not false %}
|
{% if restic_enable|d(False) == True and arrstack_restic_enable|d(False) == True %}
|
||||||
backup:
|
backup:
|
||||||
image: mazzolino/restic
|
image: mazzolino/restic
|
||||||
hostname: "{{ ansible_hostname }}"
|
hostname: "{{ ansible_hostname | default() }}"
|
||||||
environment:
|
environment:
|
||||||
TZ: "{{ restic_tz }}"
|
TZ: "{{ restic_tz }}"
|
||||||
SKIP_INIT: true
|
SKIP_INIT: true
|
||||||
|
|
|
||||||
|
|
@ -29,6 +29,5 @@ galaxy_info:
|
||||||
# NOTE: A tag is limited to a single word comprised of alphanumeric characters.
|
# NOTE: A tag is limited to a single word comprised of alphanumeric characters.
|
||||||
# Maximum 20 tags per role.
|
# Maximum 20 tags per role.
|
||||||
|
|
||||||
dependencies: []
|
dependencies:
|
||||||
# List your role dependencies here, one per line. Be sure to remove the '[]' above,
|
- caddy
|
||||||
# if you add dependencies to this list.
|
|
||||||
|
|
|
||||||
|
|
@ -16,10 +16,10 @@ services:
|
||||||
caddy: "{{ stack_grocy_subdomain }}"
|
caddy: "{{ stack_grocy_subdomain }}"
|
||||||
caddy.reverse_proxy: "{{ '{{' }}upstreams 80{{ '}}'}}"
|
caddy.reverse_proxy: "{{ '{{' }}upstreams 80{{ '}}'}}"
|
||||||
|
|
||||||
{% if restic_enable is not undefined and not false and stack_grocy_restic_enable is not undefined and not false %}
|
{% if restic_enable|d(False) == True and stack_grocy_restic_enable|d(False) == True %}
|
||||||
backup:
|
backup:
|
||||||
image: mazzolino/restic
|
image: mazzolino/restic
|
||||||
hostname: "{{ ansible_hostname }}"
|
hostname: "{{ ansible_hostname | default() }}"
|
||||||
environment:
|
environment:
|
||||||
TZ: "{{ restic_tz }}"
|
TZ: "{{ restic_tz }}"
|
||||||
SKIP_INIT: true
|
SKIP_INIT: true
|
||||||
|
|
|
||||||
|
|
@ -29,6 +29,5 @@ galaxy_info:
|
||||||
# NOTE: A tag is limited to a single word comprised of alphanumeric characters.
|
# NOTE: A tag is limited to a single word comprised of alphanumeric characters.
|
||||||
# Maximum 20 tags per role.
|
# Maximum 20 tags per role.
|
||||||
|
|
||||||
dependencies: []
|
dependencies:
|
||||||
# List your role dependencies here, one per line. Be sure to remove the '[]' above,
|
- caddy
|
||||||
# if you add dependencies to this list.
|
|
||||||
|
|
|
||||||
|
|
@ -65,10 +65,10 @@ services:
|
||||||
environment:
|
environment:
|
||||||
REDIS_ARGS: "--save 60 10"
|
REDIS_ARGS: "--save 60 10"
|
||||||
|
|
||||||
{% if restic_enable is not undefined and not false and stack_paperless_restic_enable is not undefined and not false %}
|
{% if restic_enable|d(False) == True and stack_paperless_restic_enable|d(False) == True %}
|
||||||
backup:
|
backup:
|
||||||
image: mazzolino/restic
|
image: mazzolino/restic
|
||||||
hostname: "{{ ansible_hostname }}"
|
hostname: "{{ ansible_hostname | default() }}"
|
||||||
environment:
|
environment:
|
||||||
TZ: "{{ restic_tz }}"
|
TZ: "{{ restic_tz }}"
|
||||||
BACKUP_CRON: "{{ stack_paperless_restic_cron }}"
|
BACKUP_CRON: "{{ stack_paperless_restic_cron }}"
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
services:
|
services:
|
||||||
prune:
|
prune:
|
||||||
image: "mazzolino/restic:{{ restic_version }}"
|
image: "mazzolino/restic:{{ restic_version }}"
|
||||||
hostname: "{{ ansible_hostname }}"
|
hostname: "{{ ansible_hostname | default() }}"
|
||||||
networks:
|
networks:
|
||||||
- restic_notify
|
- restic_notify
|
||||||
environment:
|
environment:
|
||||||
|
|
@ -16,15 +16,15 @@ services:
|
||||||
AWS_SECRET_ACCESS_KEY: "{{ restic_s3_secret }}"
|
AWS_SECRET_ACCESS_KEY: "{{ restic_s3_secret }}"
|
||||||
{% if restic_notify_success != None %}
|
{% if restic_notify_success != None %}
|
||||||
POST_COMMANDS_SUCCESS: |-
|
POST_COMMANDS_SUCCESS: |-
|
||||||
curl -X POST --data "{\"title\": \"Restic Prune successful\", \"body\": \"{{ ansible_hostname }}\"}" http://notify_success:5000
|
curl -X POST --data "{\"title\": \"Restic Prune successful\", \"body\": \"$HOSTNAME\"}" http://notify_success:5000
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if restic_notify_failure != None %}
|
{% if restic_notify_failure != None %}
|
||||||
POST_COMMANDS_FAILURE: |-
|
POST_COMMANDS_FAILURE: |-
|
||||||
curl -X POST --data "{\"title\": \"Restic Prune failed\", \"body\": \"{{ ansible_hostname }}\"}" http://notify_failure:5000
|
curl -X POST --data "{\"title\": \"Restic Prune failed\", \"body\": \"$HOSTNAME\"}" http://notify_failure:5000
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if restic_notify_exit != None %}
|
{% if restic_notify_exit != None %}
|
||||||
POST_COMMANDS_EXIT: |-
|
POST_COMMANDS_EXIT: |-
|
||||||
curl -X POST --data "{\"title\": \"Restic Prune exited\", \"body\": \"{{ ansible_hostname }}\"}" http://notify_exit:5000
|
curl -X POST --data "{\"title\": \"Restic Prune exited\", \"body\": \"$HOSTNAME\"}" http://notify_exit:5000
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if restic_repo is regex('^/.+') %}
|
{% if restic_repo is regex('^/.+') %}
|
||||||
volumes:
|
volumes:
|
||||||
|
|
@ -33,7 +33,7 @@ services:
|
||||||
|
|
||||||
check:
|
check:
|
||||||
image: "mazzolino/restic:{{ restic_version }}"
|
image: "mazzolino/restic:{{ restic_version }}"
|
||||||
hostname: docker
|
hostname: "{{ ansible_hostname | default() }}"
|
||||||
networks:
|
networks:
|
||||||
- restic_notify
|
- restic_notify
|
||||||
environment:
|
environment:
|
||||||
|
|
@ -48,15 +48,15 @@ services:
|
||||||
AWS_SECRET_ACCESS_KEY: "{{ restic_s3_secret }}"
|
AWS_SECRET_ACCESS_KEY: "{{ restic_s3_secret }}"
|
||||||
{% if restic_notify_success != None %}
|
{% if restic_notify_success != None %}
|
||||||
POST_COMMANDS_SUCCESS: |-
|
POST_COMMANDS_SUCCESS: |-
|
||||||
curl -X POST --data "{\"title\": \"Restic Check successful\", \"body\": \"{{ ansible_hostname }}\"}" http://notify_success:5000
|
curl -X POST --data "{\"title\": \"Restic Check successful\", \"body\": \"$HOSTNAME\"}" http://notify_success:5000
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if restic_notify_failure != None %}
|
{% if restic_notify_failure != None %}
|
||||||
POST_COMMANDS_FAILURE: |-
|
POST_COMMANDS_FAILURE: |-
|
||||||
curl -X POST --data "{\"title\": \"Restic Check failed\", \"body\": \"{{ ansible_hostname }}\"}" http://notify_failure:5000
|
curl -X POST --data "{\"title\": \"Restic Check failed\", \"body\": \"$HOSTNAME\"}" http://notify_failure:5000
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if restic_notify_exit != None %}
|
{% if restic_notify_exit != None %}
|
||||||
POST_COMMANDS_EXIT: |-
|
POST_COMMANDS_EXIT: |-
|
||||||
curl -X POST --data "{\"title\": \"Restic Check exited\", \"body\": \"{{ ansible_hostname }}\"}" http://notify_exit:5000
|
curl -X POST --data "{\"title\": \"Restic Check exited\", \"body\": \"$HOSTNAME\"}" http://notify_exit:5000
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if restic_repo is regex('^/.+') %}
|
{% if restic_repo is regex('^/.+') %}
|
||||||
volumes:
|
volumes:
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,22 @@
|
||||||
---
|
---
|
||||||
|
# TODO: Add to bootstrapping role / make less dependent on apt-get & debian (python3)
|
||||||
|
- name: Bootstrap python everywhere
|
||||||
|
hosts: all
|
||||||
|
gather_facts: False
|
||||||
|
become: true
|
||||||
|
tags:
|
||||||
|
- system
|
||||||
|
- bootstrap
|
||||||
|
tasks:
|
||||||
|
- name: check for python
|
||||||
|
ansible.builtin.raw: python3 --version
|
||||||
|
changed_when: false
|
||||||
|
failed_when: false
|
||||||
|
register: pythoncheck
|
||||||
|
- name: install debian python
|
||||||
|
ansible.builtin.raw: apt-get update && apt-get install python3 -y
|
||||||
|
when: pythoncheck.rc == 127
|
||||||
|
|
||||||
- name: Prepare incus server host
|
- name: Prepare incus server host
|
||||||
hosts: host_system
|
hosts: host_system
|
||||||
tasks:
|
tasks:
|
||||||
|
|
@ -16,11 +34,11 @@
|
||||||
# ansible-galaxy install geerlingguy.docker
|
# ansible-galaxy install geerlingguy.docker
|
||||||
- name: Install docker
|
- name: Install docker
|
||||||
hosts: instance_system
|
hosts: instance_system
|
||||||
|
tags: docker
|
||||||
tasks:
|
tasks:
|
||||||
- name: Install docker and docker compose
|
- name: Install docker and docker compose
|
||||||
ansible.builtin.import_role:
|
ansible.builtin.import_role:
|
||||||
name: geerlingguy.docker
|
name: geerlingguy.docker
|
||||||
tags: docker
|
|
||||||
|
|
||||||
- name: Install docker python requirements
|
- name: Install docker python requirements
|
||||||
ansible.builtin.package:
|
ansible.builtin.package:
|
||||||
|
|
@ -31,6 +49,7 @@
|
||||||
- python3-requests # for docker network
|
- python3-requests # for docker network
|
||||||
|
|
||||||
- name: Prepare all docker hosted containers
|
- name: Prepare all docker hosted containers
|
||||||
|
gather_facts: True
|
||||||
hosts: instance_system
|
hosts: instance_system
|
||||||
tags:
|
tags:
|
||||||
- containers
|
- containers
|
||||||
Loading…
Add table
Add a link
Reference in a new issue