mirror of
https://github.com/Crocmagnon/ansible.git
synced 2024-11-21 23:08:01 +01:00
harmonize 'dir' variables
This commit is contained in:
parent
2c9cfa104d
commit
83b33455f0
4 changed files with 10 additions and 9 deletions
|
@ -15,22 +15,22 @@
|
||||||
- name: Download binary
|
- name: Download binary
|
||||||
ansible.builtin.get_url:
|
ansible.builtin.get_url:
|
||||||
url: https://github.com/arp242/goatcounter/releases/download/{{ release.tag }}/goatcounter-{{ release.tag }}-linux-amd64.gz
|
url: https://github.com/arp242/goatcounter/releases/download/{{ release.tag }}/goatcounter-{{ release.tag }}-linux-amd64.gz
|
||||||
dest: "{{ base_dir }}/goatcounter-{{ release.tag }}.gz"
|
dest: "{{ dir }}/goatcounter-{{ release.tag }}.gz"
|
||||||
mode: "0644"
|
mode: "0644"
|
||||||
owner: gaugendre
|
owner: gaugendre
|
||||||
group: gaugendre
|
group: gaugendre
|
||||||
- name: Uncompress
|
- name: Uncompress
|
||||||
ansible.builtin.command: gunzip {{ base_dir }}/goatcounter-{{ release.tag }}.gz
|
ansible.builtin.command: gunzip {{ dir }}/goatcounter-{{ release.tag }}.gz
|
||||||
args:
|
args:
|
||||||
creates: "{{ base_dir }}/goatcounter-{{ release.tag }}"
|
creates: "{{ dir }}/goatcounter-{{ release.tag }}"
|
||||||
- name: Make executable
|
- name: Make executable
|
||||||
ansible.builtin.file:
|
ansible.builtin.file:
|
||||||
path: "{{ base_dir }}/goatcounter-{{ release.tag }}"
|
path: "{{ dir }}/goatcounter-{{ release.tag }}"
|
||||||
mode: "0775"
|
mode: "0775"
|
||||||
- name: Symlink
|
- name: Symlink
|
||||||
ansible.builtin.file:
|
ansible.builtin.file:
|
||||||
src: "{{ base_dir }}/goatcounter-{{ release.tag }}"
|
src: "{{ dir }}/goatcounter-{{ release.tag }}"
|
||||||
dest: "{{ base_dir }}/goatcounter"
|
dest: "{{ dir }}/goatcounter"
|
||||||
state: link
|
state: link
|
||||||
- name: Write service unit file
|
- name: Write service unit file
|
||||||
become: true
|
become: true
|
||||||
|
@ -65,7 +65,7 @@
|
||||||
|
|
||||||
vars:
|
vars:
|
||||||
ansible_python_interpreter: /tmp/ansible/bin/python
|
ansible_python_interpreter: /tmp/ansible/bin/python
|
||||||
base_dir: /mnt/data/goatcounter
|
dir: /mnt/data/goatcounter
|
||||||
gc_mailgun_api_key: !vault |
|
gc_mailgun_api_key: !vault |
|
||||||
$ANSIBLE_VAULT;1.1;AES256
|
$ANSIBLE_VAULT;1.1;AES256
|
||||||
31386237653033306338393237353961396535363061363931643863653461333631376365663338
|
31386237653033306338393237353961396535363061363931643863653461333631376365663338
|
||||||
|
|
|
@ -35,6 +35,7 @@
|
||||||
state: restarted
|
state: restarted
|
||||||
|
|
||||||
vars:
|
vars:
|
||||||
|
dir: /mnt/data/lyon-transports
|
||||||
lyon_transports_password: !vault |
|
lyon_transports_password: !vault |
|
||||||
$ANSIBLE_VAULT;1.1;AES256
|
$ANSIBLE_VAULT;1.1;AES256
|
||||||
35356364616633356164376433623139333165626433303437666266613762643239373730616131
|
35356364616633356164376433623139333165626433303437666266613762643239373730616131
|
||||||
|
|
|
@ -3,7 +3,7 @@ Description=Goatcounter
|
||||||
After=network.target
|
After=network.target
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
ExecStart={{base_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+{{base_dir}}/db/goatcounter.sqlite3
|
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
|
Type=simple
|
||||||
Restart=always
|
Restart=always
|
||||||
User=gaugendre
|
User=gaugendre
|
||||||
|
|
|
@ -3,7 +3,7 @@ Description=Lyon transports API
|
||||||
After=network.target
|
After=network.target
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
ExecStart=/mnt/data/lyon-transports/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
|
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
|
Type=simple
|
||||||
Restart=always
|
Restart=always
|
||||||
User=gaugendre
|
User=gaugendre
|
||||||
|
|
Loading…
Reference in a new issue