mirror of
https://github.com/Crocmagnon/ansible.git
synced 2024-11-25 00:38:04 +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: ghost-config.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: lyon-transports.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: voice-pipeline.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]
|
||||
|
|
|
@ -3,7 +3,5 @@ services:
|
|||
build:
|
||||
context: sources
|
||||
restart: always
|
||||
labels:
|
||||
- "com.centurylinklabs.watchtower.enable=false"
|
||||
ports:
|
||||
- "127.0.0.1:9010:80"
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
services:
|
||||
server:
|
||||
image: codeberg.org/forgejo/forgejo:9
|
||||
image: codeberg.org/forgejo/forgejo:8
|
||||
env_file: gitea.env
|
||||
restart: always
|
||||
volumes:
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
services:
|
||||
app:
|
||||
image: python:3-slim
|
||||
image: python:3.13-slim
|
||||
command: python /app/app.py
|
||||
volumes:
|
||||
- ./:/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
|
||||
gather_facts: false
|
||||
tasks:
|
|
@ -33,12 +33,13 @@
|
|||
- name: Write service unit file
|
||||
become: true
|
||||
ansible.builtin.template:
|
||||
src: templates/goatcounter/goatcounter.service.j2
|
||||
src: templates/goatcounter.service.j2
|
||||
dest: /etc/systemd/system/goatcounter.service
|
||||
mode: "0600"
|
||||
owner: root
|
||||
group: root
|
||||
notify:
|
||||
- Daemon-reload
|
||||
- Restart service
|
||||
- name: Flush handlers
|
||||
ansible.builtin.meta: flush_handlers
|
||||
|
@ -50,12 +51,15 @@
|
|||
enabled: true
|
||||
|
||||
handlers:
|
||||
- name: Restart service
|
||||
- name: Daemon-reload
|
||||
become: true
|
||||
ansible.builtin.systemd:
|
||||
daemon_reload: true
|
||||
- name: Restart service
|
||||
become: true
|
||||
ansible.builtin.service:
|
||||
name: goatcounter
|
||||
state: restarted
|
||||
daemon_reload: true
|
||||
|
||||
vars:
|
||||
ansible_python_interpreter: /tmp/ansible/bin/python
|
||||
|
|
|
@ -6,12 +6,13 @@
|
|||
- name: Write service file
|
||||
become: true
|
||||
ansible.builtin.template:
|
||||
src: templates/lyon-transports/lyon-transports.service.j2
|
||||
src: templates/lyon-transports.service.j2
|
||||
dest: /etc/systemd/system/lyon-transports.service
|
||||
mode: "0600"
|
||||
owner: root
|
||||
group: root
|
||||
notify:
|
||||
- Reload daemon
|
||||
- Restart service
|
||||
- name: Flush handlers
|
||||
ansible.builtin.meta: flush_handlers
|
||||
|
@ -23,12 +24,15 @@
|
|||
enabled: true
|
||||
|
||||
handlers:
|
||||
- name: Restart service
|
||||
- name: Reload daemon
|
||||
become: true
|
||||
ansible.builtin.systemd:
|
||||
daemon_reload: true
|
||||
- name: Restart service
|
||||
become: true
|
||||
ansible.builtin.service:
|
||||
name: lyon-transports
|
||||
state: restarted
|
||||
daemon_reload: true
|
||||
|
||||
vars:
|
||||
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_dir: /mnt/data/{{ docker_app_name }}
|
||||
docker_build: policy
|
||||
docker_remove_orphans: true
|
||||
|
|
|
@ -1,13 +1,12 @@
|
|||
---
|
||||
- name: Stop service
|
||||
listen: Restart service
|
||||
community.docker.docker_compose_v2:
|
||||
project_src: "{{ docker_dir }}"
|
||||
state: stopped
|
||||
- name: Start service
|
||||
listen: Restart service
|
||||
- name: Start service
|
||||
community.docker.docker_compose_v2:
|
||||
project_src: "{{ docker_dir }}"
|
||||
state: present
|
||||
build: "{{ docker_build }}"
|
||||
remove_orphans: "{{ docker_remove_orphans }}"
|
||||
listen: Restart service
|
||||
|
|
|
@ -30,4 +30,3 @@
|
|||
community.docker.docker_compose_v2:
|
||||
project_src: "{{ docker_dir }}"
|
||||
state: present
|
||||
remove_orphans: "{{ docker_remove_orphans }}"
|
||||
|
|
Loading…
Reference in a new issue