mirror of
https://github.com/Crocmagnon/ansible.git
synced 2024-11-25 16:58:02 +01:00
Compare commits
No commits in common. "c6b897f2183bd7fc9002876010461512793d2091" and "a19f54552be6468fb429a6974dd7af5f2b05d958" have entirely different histories.
c6b897f218
...
a19f54552b
16 changed files with 46 additions and 63 deletions
|
@ -8,7 +8,7 @@
|
||||||
- import_playbook: display.yaml # noqa: name[play]
|
- import_playbook: display.yaml # noqa: name[play]
|
||||||
- import_playbook: ghost-config.yaml # noqa: name[play]
|
- import_playbook: ghost-config.yaml # noqa: name[play]
|
||||||
- import_playbook: ghost-update.yaml # noqa: name[play]
|
- import_playbook: ghost-update.yaml # noqa: name[play]
|
||||||
- import_playbook: git.yaml # noqa: name[play]
|
- import_playbook: gitea.yaml # noqa: name[play]
|
||||||
- import_playbook: goatcounter.yaml # noqa: name[play]
|
- import_playbook: goatcounter.yaml # noqa: name[play]
|
||||||
- import_playbook: lyon-transports.yaml # noqa: name[play]
|
- import_playbook: lyon-transports.yaml # noqa: name[play]
|
||||||
- import_playbook: manuels.yaml # noqa: name[play]
|
- import_playbook: manuels.yaml # noqa: name[play]
|
||||||
|
@ -21,5 +21,4 @@
|
||||||
- import_playbook: test_headers.yaml # noqa: name[play]
|
- import_playbook: test_headers.yaml # noqa: name[play]
|
||||||
- import_playbook: voice-pipeline.yaml # noqa: name[play]
|
- import_playbook: voice-pipeline.yaml # noqa: name[play]
|
||||||
- import_playbook: wallabag.yaml # noqa: name[play]
|
- import_playbook: wallabag.yaml # noqa: name[play]
|
||||||
- import_playbook: watchtower.yaml # noqa: name[play]
|
|
||||||
- import_playbook: ynab.yaml # noqa: name[play]
|
- import_playbook: ynab.yaml # noqa: name[play]
|
||||||
|
|
|
@ -3,7 +3,5 @@ services:
|
||||||
build:
|
build:
|
||||||
context: sources
|
context: sources
|
||||||
restart: always
|
restart: always
|
||||||
labels:
|
|
||||||
- "com.centurylinklabs.watchtower.enable=false"
|
|
||||||
ports:
|
ports:
|
||||||
- "127.0.0.1:9010:80"
|
- "127.0.0.1:9010:80"
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
services:
|
services:
|
||||||
server:
|
server:
|
||||||
image: codeberg.org/forgejo/forgejo:9
|
image: codeberg.org/forgejo/forgejo:8
|
||||||
env_file: gitea.env
|
env_file: gitea.env
|
||||||
restart: always
|
restart: always
|
||||||
volumes:
|
volumes:
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
services:
|
services:
|
||||||
app:
|
app:
|
||||||
image: python:3-slim
|
image: python:3.13-slim
|
||||||
command: python /app/app.py
|
command: python /app/app.py
|
||||||
volumes:
|
volumes:
|
||||||
- ./:/app
|
- ./:/app
|
||||||
|
|
|
@ -1,8 +0,0 @@
|
||||||
services:
|
|
||||||
watchtower:
|
|
||||||
image: containrrr/watchtower
|
|
||||||
volumes:
|
|
||||||
- /var/run/docker.sock:/var/run/docker.sock
|
|
||||||
- /home/gaugendre/.docker/config.json:/config.json
|
|
||||||
- /etc/localtime:/etc/localtime:ro
|
|
||||||
command: --interval 86400 --cleanup --include-restarting
|
|
|
@ -1,5 +1,5 @@
|
||||||
---
|
---
|
||||||
- name: Forgejo
|
- name: Gitea
|
||||||
hosts: servers
|
hosts: servers
|
||||||
gather_facts: false
|
gather_facts: false
|
||||||
tasks:
|
tasks:
|
|
@ -33,12 +33,13 @@
|
||||||
- name: Write service unit file
|
- name: Write service unit file
|
||||||
become: true
|
become: true
|
||||||
ansible.builtin.template:
|
ansible.builtin.template:
|
||||||
src: templates/goatcounter/goatcounter.service.j2
|
src: templates/goatcounter.service.j2
|
||||||
dest: /etc/systemd/system/goatcounter.service
|
dest: /etc/systemd/system/goatcounter.service
|
||||||
mode: "0600"
|
mode: "0600"
|
||||||
owner: root
|
owner: root
|
||||||
group: root
|
group: root
|
||||||
notify:
|
notify:
|
||||||
|
- Daemon-reload
|
||||||
- Restart service
|
- Restart service
|
||||||
- name: Flush handlers
|
- name: Flush handlers
|
||||||
ansible.builtin.meta: flush_handlers
|
ansible.builtin.meta: flush_handlers
|
||||||
|
@ -50,12 +51,15 @@
|
||||||
enabled: true
|
enabled: true
|
||||||
|
|
||||||
handlers:
|
handlers:
|
||||||
- name: Restart service
|
- name: Daemon-reload
|
||||||
become: true
|
become: true
|
||||||
ansible.builtin.systemd:
|
ansible.builtin.systemd:
|
||||||
|
daemon_reload: true
|
||||||
|
- name: Restart service
|
||||||
|
become: true
|
||||||
|
ansible.builtin.service:
|
||||||
name: goatcounter
|
name: goatcounter
|
||||||
state: restarted
|
state: restarted
|
||||||
daemon_reload: true
|
|
||||||
|
|
||||||
vars:
|
vars:
|
||||||
ansible_python_interpreter: /tmp/ansible/bin/python
|
ansible_python_interpreter: /tmp/ansible/bin/python
|
||||||
|
|
|
@ -6,12 +6,13 @@
|
||||||
- name: Write service file
|
- name: Write service file
|
||||||
become: true
|
become: true
|
||||||
ansible.builtin.template:
|
ansible.builtin.template:
|
||||||
src: templates/lyon-transports/lyon-transports.service.j2
|
src: templates/lyon-transports.service.j2
|
||||||
dest: /etc/systemd/system/lyon-transports.service
|
dest: /etc/systemd/system/lyon-transports.service
|
||||||
mode: "0600"
|
mode: "0600"
|
||||||
owner: root
|
owner: root
|
||||||
group: root
|
group: root
|
||||||
notify:
|
notify:
|
||||||
|
- Reload daemon
|
||||||
- Restart service
|
- Restart service
|
||||||
- name: Flush handlers
|
- name: Flush handlers
|
||||||
ansible.builtin.meta: flush_handlers
|
ansible.builtin.meta: flush_handlers
|
||||||
|
@ -23,12 +24,15 @@
|
||||||
enabled: true
|
enabled: true
|
||||||
|
|
||||||
handlers:
|
handlers:
|
||||||
- name: Restart service
|
- name: Reload daemon
|
||||||
become: true
|
become: true
|
||||||
ansible.builtin.systemd:
|
ansible.builtin.systemd:
|
||||||
|
daemon_reload: true
|
||||||
|
- name: Restart service
|
||||||
|
become: true
|
||||||
|
ansible.builtin.service:
|
||||||
name: lyon-transports
|
name: lyon-transports
|
||||||
state: restarted
|
state: restarted
|
||||||
daemon_reload: true
|
|
||||||
|
|
||||||
vars:
|
vars:
|
||||||
dir: /mnt/data/lyon-transports
|
dir: /mnt/data/lyon-transports
|
||||||
|
|
13
playbooks/apps/templates/goatcounter.service.j2
Normal file
13
playbooks/apps/templates/goatcounter.service.j2
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
[Unit]
|
||||||
|
Description=Goatcounter
|
||||||
|
After=network.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
ExecStart={{ dir }}/goatcounter serve -listen *:8005 -tls http -smtp smtps://goatcounter%%40mg.augendre.info:{{gc_mailgun_api_key}}@smtp.mailgun.org:587 -email-from goatcounter@mg.augendre.info -automigrate -db sqlite+{{ dir }}/db/goatcounter.sqlite3
|
||||||
|
Type=simple
|
||||||
|
Restart=always
|
||||||
|
User=gaugendre
|
||||||
|
Group=gaugendre
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=default.target
|
|
@ -1,13 +0,0 @@
|
||||||
[Unit]
|
|
||||||
Description=Goatcounter
|
|
||||||
After=network.target
|
|
||||||
|
|
||||||
[Service]
|
|
||||||
ExecStart={{ dir }}/goatcounter serve -listen 127.0.0.1:8005 -tls http -smtp smtps://goatcounter%%40mg.augendre.info:{{gc_mailgun_api_key}}@smtp.mailgun.org:587 -email-from goatcounter@mg.augendre.info -automigrate -db sqlite+{{ dir }}/db/goatcounter.sqlite3
|
|
||||||
Type=simple
|
|
||||||
Restart=always
|
|
||||||
User=gaugendre
|
|
||||||
Group=gaugendre
|
|
||||||
|
|
||||||
[Install]
|
|
||||||
WantedBy=default.target
|
|
13
playbooks/apps/templates/lyon-transports.service.j2
Normal file
13
playbooks/apps/templates/lyon-transports.service.j2
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
[Unit]
|
||||||
|
Description=Lyon transports API
|
||||||
|
After=network.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
ExecStart={{ dir }}/lyon-transports-linux-amd64 --host 0.0.0.0 --port 8013 -u {{ lyon_transports_username }} -p {{ lyon_transports_password }} --cors-allowed-origin https://display.augendre.info
|
||||||
|
Type=simple
|
||||||
|
Restart=always
|
||||||
|
User=gaugendre
|
||||||
|
Group=gaugendre
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=default.target
|
|
@ -1,13 +0,0 @@
|
||||||
[Unit]
|
|
||||||
Description=Lyon transports API
|
|
||||||
After=network.target
|
|
||||||
|
|
||||||
[Service]
|
|
||||||
ExecStart={{ dir }}/lyon-transports-linux-amd64 --host 127.0.0.1 --port 8013 -u {{ lyon_transports_username }} -p {{ lyon_transports_password }} --cors-allowed-origin https://display.augendre.info
|
|
||||||
Type=simple
|
|
||||||
Restart=always
|
|
||||||
User=gaugendre
|
|
||||||
Group=gaugendre
|
|
||||||
|
|
||||||
[Install]
|
|
||||||
WantedBy=default.target
|
|
|
@ -1,11 +0,0 @@
|
||||||
---
|
|
||||||
- name: Watchtower
|
|
||||||
hosts: servers
|
|
||||||
gather_facts: false
|
|
||||||
tasks:
|
|
||||||
- name: Docker
|
|
||||||
ansible.builtin.include_role:
|
|
||||||
name: docker
|
|
||||||
|
|
||||||
vars:
|
|
||||||
docker_app_name: watchtower
|
|
|
@ -2,4 +2,3 @@
|
||||||
docker_app_name: some-app
|
docker_app_name: some-app
|
||||||
docker_dir: /mnt/data/{{ docker_app_name }}
|
docker_dir: /mnt/data/{{ docker_app_name }}
|
||||||
docker_build: policy
|
docker_build: policy
|
||||||
docker_remove_orphans: true
|
|
||||||
|
|
|
@ -1,13 +1,12 @@
|
||||||
---
|
---
|
||||||
- name: Stop service
|
- name: Stop service
|
||||||
listen: Restart service
|
|
||||||
community.docker.docker_compose_v2:
|
community.docker.docker_compose_v2:
|
||||||
project_src: "{{ docker_dir }}"
|
project_src: "{{ docker_dir }}"
|
||||||
state: stopped
|
state: stopped
|
||||||
- name: Start service
|
|
||||||
listen: Restart service
|
listen: Restart service
|
||||||
|
- name: Start service
|
||||||
community.docker.docker_compose_v2:
|
community.docker.docker_compose_v2:
|
||||||
project_src: "{{ docker_dir }}"
|
project_src: "{{ docker_dir }}"
|
||||||
state: present
|
state: present
|
||||||
build: "{{ docker_build }}"
|
build: "{{ docker_build }}"
|
||||||
remove_orphans: "{{ docker_remove_orphans }}"
|
listen: Restart service
|
||||||
|
|
|
@ -30,4 +30,3 @@
|
||||||
community.docker.docker_compose_v2:
|
community.docker.docker_compose_v2:
|
||||||
project_src: "{{ docker_dir }}"
|
project_src: "{{ docker_dir }}"
|
||||||
state: present
|
state: present
|
||||||
remove_orphans: "{{ docker_remove_orphans }}"
|
|
||||||
|
|
Loading…
Reference in a new issue