mirror of
https://github.com/Crocmagnon/ansible.git
synced 2024-11-24 00:08:02 +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
|
||||
ansible.builtin.get_url:
|
||||
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"
|
||||
owner: gaugendre
|
||||
group: gaugendre
|
||||
- name: Uncompress
|
||||
ansible.builtin.command: gunzip {{ base_dir }}/goatcounter-{{ release.tag }}.gz
|
||||
ansible.builtin.command: gunzip {{ dir }}/goatcounter-{{ release.tag }}.gz
|
||||
args:
|
||||
creates: "{{ base_dir }}/goatcounter-{{ release.tag }}"
|
||||
creates: "{{ dir }}/goatcounter-{{ release.tag }}"
|
||||
- name: Make executable
|
||||
ansible.builtin.file:
|
||||
path: "{{ base_dir }}/goatcounter-{{ release.tag }}"
|
||||
path: "{{ dir }}/goatcounter-{{ release.tag }}"
|
||||
mode: "0775"
|
||||
- name: Symlink
|
||||
ansible.builtin.file:
|
||||
src: "{{ base_dir }}/goatcounter-{{ release.tag }}"
|
||||
dest: "{{ base_dir }}/goatcounter"
|
||||
src: "{{ dir }}/goatcounter-{{ release.tag }}"
|
||||
dest: "{{ dir }}/goatcounter"
|
||||
state: link
|
||||
- name: Write service unit file
|
||||
become: true
|
||||
|
@ -65,7 +65,7 @@
|
|||
|
||||
vars:
|
||||
ansible_python_interpreter: /tmp/ansible/bin/python
|
||||
base_dir: /mnt/data/goatcounter
|
||||
dir: /mnt/data/goatcounter
|
||||
gc_mailgun_api_key: !vault |
|
||||
$ANSIBLE_VAULT;1.1;AES256
|
||||
31386237653033306338393237353961396535363061363931643863653461333631376365663338
|
||||
|
|
|
@ -35,6 +35,7 @@
|
|||
state: restarted
|
||||
|
||||
vars:
|
||||
dir: /mnt/data/lyon-transports
|
||||
lyon_transports_password: !vault |
|
||||
$ANSIBLE_VAULT;1.1;AES256
|
||||
35356364616633356164376433623139333165626433303437666266613762643239373730616131
|
||||
|
|
|
@ -3,7 +3,7 @@ Description=Goatcounter
|
|||
After=network.target
|
||||
|
||||
[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
|
||||
Restart=always
|
||||
User=gaugendre
|
||||
|
|
|
@ -3,7 +3,7 @@ Description=Lyon transports API
|
|||
After=network.target
|
||||
|
||||
[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
|
||||
Restart=always
|
||||
User=gaugendre
|
||||
|
|
Loading…
Reference in a new issue