Change become arguments to boolean
Changed all 'become: ' values from 'yes' to 'true' to satisfy the schema (and also make the lsp shut up).
This commit is contained in:
parent
385cb3859c
commit
7d8408f9f8
28 changed files with 124 additions and 125 deletions
|
|
@ -4,14 +4,14 @@
|
|||
path: "{{ blog_upstream_file_dir }}"
|
||||
state: directory
|
||||
mode: '0755'
|
||||
become: yes
|
||||
become: true
|
||||
listen: "update blog upstream"
|
||||
|
||||
- name: Update upstream template
|
||||
ansible.builtin.template:
|
||||
src: upstream.json.j2
|
||||
dest: "{{ blog_upstream_file_dir }}/upstream.json"
|
||||
become: yes
|
||||
become: true
|
||||
listen: "update blog upstream"
|
||||
|
||||
# figure out if upstream id exists
|
||||
|
|
@ -22,7 +22,7 @@
|
|||
curl localhost:2019/id/{{ stack_name }}_upstream/
|
||||
changed_when: False
|
||||
register: result
|
||||
become: yes
|
||||
become: true
|
||||
listen: "update blog upstream"
|
||||
|
||||
# upstream already exists, patch it
|
||||
|
|
@ -31,7 +31,7 @@
|
|||
container: "{{ caddy_container_id }}"
|
||||
command: >
|
||||
curl -X DELETE localhost:2019/id/{{ stack_name }}_upstream/
|
||||
become: yes
|
||||
become: true
|
||||
when: (result.stdout | from_json)['error'] is not defined
|
||||
listen: "update blog upstream"
|
||||
|
||||
|
|
@ -41,13 +41,13 @@
|
|||
container: "{{ caddy_container_id }}"
|
||||
command: >
|
||||
curl -X POST -H "Content-Type: application/json" -d @{{ blog_upstream_file_dir }}/upstream.json localhost:2019/config/apps/http/servers/{{ (blog_use_https == True) | ternary(caddy_https_server_name, caddy_http_server_name) }}/routes/0/
|
||||
become: yes
|
||||
become: true
|
||||
listen: "update blog upstream"
|
||||
|
||||
- name: Ensure upstream directory is gone again
|
||||
ansible.builtin.file:
|
||||
path: "{{ blog_upstream_file_dir }}"
|
||||
state: absent
|
||||
become: yes
|
||||
become: true
|
||||
listen: "update blog upstream"
|
||||
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
curl localhost:2019/id/{{ stack_name }}_upstream/
|
||||
register: result
|
||||
changed_when: (result.stdout | from_json) != (lookup('template', 'upstream.json.j2') | from_yaml)
|
||||
become: yes
|
||||
become: true
|
||||
notify: "update blog upstream"
|
||||
|
||||
- name: Deploy blog to swarm
|
||||
|
|
@ -17,7 +17,7 @@
|
|||
prune: yes
|
||||
compose:
|
||||
- "{{ stack_compose }}"
|
||||
become: yes
|
||||
become: true
|
||||
tags:
|
||||
- docker-swarm
|
||||
notify: "update blog upstream"
|
||||
|
|
|
|||
|
|
@ -27,14 +27,14 @@
|
|||
compose:
|
||||
- "{{ caddy_stack.compose }}"
|
||||
when: caddy_stack is defined
|
||||
become: yes
|
||||
become: true
|
||||
tags:
|
||||
- docker-swarm
|
||||
|
||||
- name: Get caddy container info
|
||||
ansible.builtin.command:
|
||||
cmd: docker ps -q -f name={{ caddy_stack.name }}
|
||||
become: yes
|
||||
become: true
|
||||
# bringing up the container takes some time, we have to wait
|
||||
until: caddy_container_info['rc'] == 0 and caddy_container_info['stdout'] | length >= 1
|
||||
retries: 5
|
||||
|
|
@ -53,7 +53,7 @@
|
|||
container: "{{ caddy_container_id }}"
|
||||
command: >
|
||||
apk add curl
|
||||
become: yes
|
||||
become: true
|
||||
register: result
|
||||
changed_when: "'Installing' in result.stdout"
|
||||
|
||||
|
|
@ -62,7 +62,7 @@
|
|||
container: "{{ caddy_container_id }}"
|
||||
command: >
|
||||
curl localhost:2019/config/
|
||||
become: yes
|
||||
become: true
|
||||
until: result.rc == 0
|
||||
when: caddy_use_api == True
|
||||
changed_when: False
|
||||
|
|
|
|||
|
|
@ -4,4 +4,4 @@
|
|||
state: started
|
||||
enabled: yes
|
||||
daemon_reload: yes
|
||||
become: yes
|
||||
become: true
|
||||
|
|
|
|||
|
|
@ -6,30 +6,30 @@
|
|||
user: git
|
||||
become: true
|
||||
listen: "no admin user"
|
||||
|
||||
|
||||
## Register reverse proxy
|
||||
- name: Ensure upstream directory exists
|
||||
ansible.builtin.file:
|
||||
path: "{{ gitea_upstream_file_dir }}"
|
||||
state: directory
|
||||
mode: '0755'
|
||||
become: yes
|
||||
mode: "0755"
|
||||
become: true
|
||||
listen: "update gitea upstream"
|
||||
|
||||
- name: Update upstream template
|
||||
ansible.builtin.template:
|
||||
src: upstream.json.j2
|
||||
dest: "{{ gitea_upstream_file_dir }}/upstream.json"
|
||||
mode: '0600'
|
||||
become: yes
|
||||
mode: "0600"
|
||||
become: true
|
||||
listen: "update gitea upstream"
|
||||
|
||||
- name: Update ci upstream template
|
||||
ansible.builtin.template:
|
||||
src: upstream_ci.json.j2
|
||||
dest: "{{ gitea_upstream_file_dir }}/upstream_ci.json"
|
||||
mode: '0600'
|
||||
become: yes
|
||||
mode: "0600"
|
||||
become: true
|
||||
listen: "update gitea upstream"
|
||||
|
||||
# figure out if upstream id exists
|
||||
|
|
@ -40,7 +40,7 @@
|
|||
curl localhost:2019/id/{{ stack_name }}_upstream/
|
||||
changed_when: False
|
||||
register: result
|
||||
become: yes
|
||||
become: true
|
||||
listen: "update gitea upstream"
|
||||
|
||||
# upstream already exists, patch it
|
||||
|
|
@ -49,7 +49,7 @@
|
|||
container: "{{ caddy_container_id }}"
|
||||
command: >
|
||||
curl -X DELETE localhost:2019/id/{{ stack_name }}_upstream/
|
||||
become: yes
|
||||
become: true
|
||||
when: (result.stdout | from_json)['error'] is not defined
|
||||
listen: "update gitea upstream"
|
||||
|
||||
|
|
@ -58,8 +58,8 @@
|
|||
community.docker.docker_container_exec:
|
||||
container: "{{ caddy_container_id }}"
|
||||
command: >
|
||||
curl -X POST -H "Content-Type: application/json" -d @{{ gitea_upstream_file_dir }}/upstream.json localhost:2019/config/apps/http/servers/{{ (gitea_use_https == True) | ternary(caddy_https_server_name, caddy_http_server_name) }}/routes/0/
|
||||
become: yes
|
||||
curl -X POST -H "Content-Type: application/json" -d @{{ gitea_upstream_file_dir }}/upstream.json localhost:2019/config/apps/http/servers/{{ (gitea_use_https == True) | ternary(caddy_https_server_name, caddy_http_server_name) }}/routes/0/
|
||||
become: true
|
||||
listen: "update gitea upstream"
|
||||
|
||||
# figure out if upstream id exists
|
||||
|
|
@ -70,7 +70,7 @@
|
|||
curl localhost:2019/id/{{ stack_name }}_ci_upstream/
|
||||
changed_when: False
|
||||
register: result
|
||||
become: yes
|
||||
become: true
|
||||
listen: "update gitea upstream"
|
||||
|
||||
# upstream for ci already exists, patch it
|
||||
|
|
@ -79,23 +79,22 @@
|
|||
container: "{{ caddy_container_id }}"
|
||||
command: >
|
||||
curl -X DELETE localhost:2019/id/{{ stack_name }}_ci_upstream/
|
||||
become: yes
|
||||
become: true
|
||||
when: (result.stdout | from_json)['error'] is not defined
|
||||
listen: "update gitea upstream"
|
||||
#
|
||||
|
||||
# upstream for ci has to be created
|
||||
- name: add {{ stack_name }}_ci upstream
|
||||
community.docker.docker_container_exec:
|
||||
container: "{{ caddy_container_id }}"
|
||||
command: >
|
||||
curl -X POST -H "Content-Type: application/json" -d @{{ gitea_upstream_file_dir }}/upstream_ci.json localhost:2019/config/apps/http/servers/{{ (gitea_use_https == True) | ternary(caddy_https_server_name, caddy_http_server_name) }}/routes/0/
|
||||
become: yes
|
||||
curl -X POST -H "Content-Type: application/json" -d @{{ gitea_upstream_file_dir }}/upstream_ci.json localhost:2019/config/apps/http/servers/{{ (gitea_use_https == True) | ternary(caddy_https_server_name, caddy_http_server_name) }}/routes/0/
|
||||
become: true
|
||||
listen: "update gitea upstream"
|
||||
|
||||
- name: Ensure upstream directory is gone again
|
||||
ansible.builtin.file:
|
||||
path: "{{ gitea_upstream_file_dir }}"
|
||||
state: absent
|
||||
become: yes
|
||||
become: true
|
||||
listen: "update gitea upstream"
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
ansible.builtin.package:
|
||||
name: "openssl"
|
||||
state: present
|
||||
become: yes
|
||||
become: true
|
||||
tags:
|
||||
- apt
|
||||
- download
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@
|
|||
ssh_key_type: rsa
|
||||
ssh_key_bits: 4096
|
||||
ssh_key_comment: "Gitea Host Key"
|
||||
become: yes
|
||||
become: true
|
||||
register: git_user
|
||||
|
||||
- name: Ensure git passthrough command directory exists
|
||||
|
|
@ -39,7 +39,7 @@
|
|||
mode: '0770'
|
||||
owner: "{{ git_user['uid'] }}"
|
||||
group: "{{ git_user['group'] }}"
|
||||
become: yes
|
||||
become: true
|
||||
|
||||
- name: Save git passthrough command in right location
|
||||
ansible.builtin.copy:
|
||||
|
|
@ -48,21 +48,21 @@
|
|||
owner: "{{ git_user['uid'] }}"
|
||||
group: "{{ git_user['group'] }}"
|
||||
mode: '0750'
|
||||
become: yes
|
||||
become: true
|
||||
|
||||
- name: Fetch keyfile
|
||||
fetch:
|
||||
src: "{{ git_user['home'] }}/.ssh/id_rsa.pub"
|
||||
dest: "buffer/{{ansible_hostname}}-id_rsa.pub"
|
||||
flat: yes
|
||||
become: yes
|
||||
become: true
|
||||
|
||||
- name: Ensure git user has its own key authorized for access
|
||||
ansible.posix.authorized_key:
|
||||
user: "{{ git_user['name'] }}"
|
||||
state: present
|
||||
key: "{{ lookup('file', 'buffer/{{ ansible_hostname }}-id_rsa.pub') }}"
|
||||
become: yes
|
||||
become: true
|
||||
|
||||
- name: Clean up buffer dir
|
||||
ansible.builtin.file:
|
||||
|
|
@ -78,7 +78,7 @@
|
|||
curl localhost:2019/id/{{ stack_name }}_upstream/
|
||||
register: result
|
||||
changed_when: (result.stdout | from_json) != (lookup('template', 'upstream.json.j2') | from_yaml)
|
||||
become: yes
|
||||
become: true
|
||||
notify: "update gitea upstream"
|
||||
|
||||
- name: Deploy gitea to swarm
|
||||
|
|
@ -88,7 +88,7 @@
|
|||
prune: yes
|
||||
compose:
|
||||
- "{{ stack_compose }}"
|
||||
become: yes
|
||||
become: true
|
||||
tags:
|
||||
- docker-swarm
|
||||
register: gitea_deployment
|
||||
|
|
@ -96,14 +96,14 @@
|
|||
|
||||
- name: Wait 30 seconds for gitea to become healthy
|
||||
wait_for:
|
||||
timeout: 60
|
||||
timeout: 30
|
||||
delegate_to: localhost
|
||||
when: gitea_deployment is changed
|
||||
|
||||
- name: Get app container info
|
||||
ansible.builtin.command:
|
||||
cmd: docker ps -q -f name={{ stack_name }}_app
|
||||
become: yes
|
||||
become: true
|
||||
until: gitea_app_container_name['rc'] == 0 and gitea_app_container_name['stdout'] | length >= 1
|
||||
retries: 10
|
||||
delay: 10
|
||||
|
|
|
|||
|
|
@ -4,14 +4,14 @@
|
|||
path: "{{ landingpage_upstream_file_dir }}"
|
||||
state: directory
|
||||
mode: '0755'
|
||||
become: yes
|
||||
become: true
|
||||
listen: "update landingpage upstream"
|
||||
|
||||
- name: Update upstream template
|
||||
ansible.builtin.template:
|
||||
src: upstream.json.j2
|
||||
dest: "{{ landingpage_upstream_file_dir }}/upstream.json"
|
||||
become: yes
|
||||
become: true
|
||||
listen: "update landingpage upstream"
|
||||
|
||||
# figure out if upstream id exists
|
||||
|
|
@ -22,7 +22,7 @@
|
|||
curl localhost:2019/id/{{ stack_name }}_upstream/
|
||||
changed_when: False
|
||||
register: result
|
||||
become: yes
|
||||
become: true
|
||||
listen: "update landingpage upstream"
|
||||
|
||||
# upstream already exists, patch it
|
||||
|
|
@ -31,7 +31,7 @@
|
|||
container: "{{ caddy_container_id }}"
|
||||
command: >
|
||||
curl -X DELETE localhost:2019/id/{{ stack_name }}_upstream/
|
||||
become: yes
|
||||
become: true
|
||||
when: (result.stdout | from_json)['error'] is not defined
|
||||
listen: "update landingpage upstream"
|
||||
|
||||
|
|
@ -41,13 +41,13 @@
|
|||
container: "{{ caddy_container_id }}"
|
||||
command: >
|
||||
curl -X POST -H "Content-Type: application/json" -d @{{ landingpage_upstream_file_dir }}/upstream.json localhost:2019/config/apps/http/servers/{{ (landingpage_use_https == True) | ternary(caddy_https_server_name, caddy_http_server_name) }}/routes/0/
|
||||
become: yes
|
||||
become: true
|
||||
listen: "update landingpage upstream"
|
||||
|
||||
- name: Ensure upstream directory is gone again
|
||||
ansible.builtin.file:
|
||||
path: "{{ landingpage_upstream_file_dir }}"
|
||||
state: absent
|
||||
become: yes
|
||||
become: true
|
||||
listen: "update landingpage upstream"
|
||||
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
curl localhost:2019/id/{{ stack_name }}_upstream/
|
||||
register: result
|
||||
changed_when: (result.stdout | from_json) != (lookup('template', 'upstream.json.j2') | from_yaml)
|
||||
become: yes
|
||||
become: true
|
||||
notify: "update landingpage upstream"
|
||||
|
||||
- name: Deploy landingpage to swarm
|
||||
|
|
@ -17,7 +17,7 @@
|
|||
prune: yes
|
||||
compose:
|
||||
- "{{ stack_compose }}"
|
||||
become: yes
|
||||
become: true
|
||||
tags:
|
||||
- docker-swarm
|
||||
notify: "update landingpage upstream"
|
||||
|
|
|
|||
|
|
@ -4,14 +4,14 @@
|
|||
path: "{{ miniflux_upstream_file_dir }}"
|
||||
state: directory
|
||||
mode: '0755'
|
||||
become: yes
|
||||
become: true
|
||||
listen: "update miniflux upstream"
|
||||
|
||||
- name: Update upstream template
|
||||
ansible.builtin.template:
|
||||
src: upstream.json.j2
|
||||
dest: "{{ miniflux_upstream_file_dir }}/upstream.json"
|
||||
become: yes
|
||||
become: true
|
||||
listen: "update miniflux upstream"
|
||||
|
||||
# figure out if upstream id exists
|
||||
|
|
@ -22,7 +22,7 @@
|
|||
curl localhost:2019/id/{{ stack_name }}_upstream/
|
||||
changed_when: False
|
||||
register: result
|
||||
become: yes
|
||||
become: true
|
||||
listen: "update miniflux upstream"
|
||||
|
||||
# upstream already exists, patch it
|
||||
|
|
@ -31,7 +31,7 @@
|
|||
container: "{{ caddy_container_id }}"
|
||||
command: >
|
||||
curl -X DELETE localhost:2019/id/{{ stack_name }}_upstream/
|
||||
become: yes
|
||||
become: true
|
||||
when: (result.stdout | from_json)['error'] is not defined
|
||||
listen: "update miniflux upstream"
|
||||
|
||||
|
|
@ -41,13 +41,13 @@
|
|||
container: "{{ caddy_container_id }}"
|
||||
command: >
|
||||
curl -X POST -H "Content-Type: application/json" -d @{{ miniflux_upstream_file_dir }}/upstream.json localhost:2019/config/apps/http/servers/{{ (miniflux_use_https == True) | ternary(caddy_https_server_name, caddy_http_server_name) }}/routes/0/
|
||||
become: yes
|
||||
become: true
|
||||
listen: "update miniflux upstream"
|
||||
|
||||
- name: Ensure upstream directory is gone again
|
||||
ansible.builtin.file:
|
||||
path: "{{ miniflux_upstream_file_dir }}"
|
||||
state: absent
|
||||
become: yes
|
||||
become: true
|
||||
listen: "update miniflux upstream"
|
||||
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
curl localhost:2019/id/{{ stack_name }}_upstream/
|
||||
register: result
|
||||
changed_when: (result.stdout | from_json) != (lookup('template', 'upstream.json.j2') | from_yaml)
|
||||
become: yes
|
||||
become: true
|
||||
notify: "update miniflux upstream"
|
||||
|
||||
- name: Deploy miniflux to swarm
|
||||
|
|
@ -17,7 +17,7 @@
|
|||
prune: yes
|
||||
compose:
|
||||
- "{{ stack_compose }}"
|
||||
become: yes
|
||||
become: true
|
||||
tags:
|
||||
- docker-swarm
|
||||
notify: "update miniflux upstream"
|
||||
|
|
|
|||
|
|
@ -4,14 +4,14 @@
|
|||
path: "{{ monica_upstream_file_dir }}"
|
||||
state: directory
|
||||
mode: '0755'
|
||||
become: yes
|
||||
become: true
|
||||
listen: "update monica upstream"
|
||||
|
||||
- name: Update upstream template
|
||||
ansible.builtin.template:
|
||||
src: upstream.json.j2
|
||||
dest: "{{ monica_upstream_file_dir }}/upstream.json"
|
||||
become: yes
|
||||
become: true
|
||||
listen: "update monica upstream"
|
||||
|
||||
# figure out if upstream id exists
|
||||
|
|
@ -22,7 +22,7 @@
|
|||
curl localhost:2019/id/{{ stack_name }}_upstream/
|
||||
changed_when: False
|
||||
register: result
|
||||
become: yes
|
||||
become: true
|
||||
listen: "update monica upstream"
|
||||
|
||||
# upstream already exists, patch it
|
||||
|
|
@ -31,7 +31,7 @@
|
|||
container: "{{ caddy_container_id }}"
|
||||
command: >
|
||||
curl -X DELETE localhost:2019/id/{{ stack_name }}_upstream/
|
||||
become: yes
|
||||
become: true
|
||||
when: (result.stdout | from_json)['error'] is not defined
|
||||
listen: "update monica upstream"
|
||||
|
||||
|
|
@ -41,13 +41,13 @@
|
|||
container: "{{ caddy_container_id }}"
|
||||
command: >
|
||||
curl -X POST -H "Content-Type: application/json" -d @{{ monica_upstream_file_dir }}/upstream.json localhost:2019/config/apps/http/servers/{{ (monica_use_https == True) | ternary(caddy_https_server_name, caddy_http_server_name) }}/routes/0/
|
||||
become: yes
|
||||
become: true
|
||||
listen: "update monica upstream"
|
||||
|
||||
- name: Ensure upstream directory is gone again
|
||||
ansible.builtin.file:
|
||||
path: "{{ monica_upstream_file_dir }}"
|
||||
state: absent
|
||||
become: yes
|
||||
become: true
|
||||
listen: "update monica upstream"
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
ansible.builtin.package:
|
||||
name: "openssl"
|
||||
state: present
|
||||
become: yes
|
||||
become: true
|
||||
tags:
|
||||
- apt
|
||||
- download
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@
|
|||
curl localhost:2019/id/{{ stack_name }}_upstream/
|
||||
register: result
|
||||
changed_when: (result.stdout | from_json) != (lookup('template', 'upstream.json.j2') | from_yaml)
|
||||
become: yes
|
||||
become: true
|
||||
notify: "update monica upstream"
|
||||
|
||||
- name: Deploy to swarm
|
||||
|
|
@ -33,7 +33,7 @@
|
|||
prune: yes
|
||||
compose:
|
||||
- "{{ stack_compose }}"
|
||||
become: yes
|
||||
become: true
|
||||
tags:
|
||||
- docker-swarm
|
||||
notify: "update monica upstream"
|
||||
|
|
|
|||
|
|
@ -4,14 +4,14 @@
|
|||
path: "{{ nextcloud_upstream_file_dir }}"
|
||||
state: directory
|
||||
mode: '0755'
|
||||
become: yes
|
||||
become: true
|
||||
listen: "update nextcloud upstream"
|
||||
|
||||
- name: Update upstream template
|
||||
ansible.builtin.template:
|
||||
src: upstream.json.j2
|
||||
dest: "{{ nextcloud_upstream_file_dir }}/upstream.json"
|
||||
become: yes
|
||||
become: true
|
||||
listen: "update nextcloud upstream"
|
||||
|
||||
# figure out if upstream id exists
|
||||
|
|
@ -22,7 +22,7 @@
|
|||
curl localhost:2019/id/{{ stack_name }}_upstream/
|
||||
changed_when: False
|
||||
register: result
|
||||
become: yes
|
||||
become: true
|
||||
listen: "update nextcloud upstream"
|
||||
|
||||
# upstream already exists, patch it
|
||||
|
|
@ -31,7 +31,7 @@
|
|||
container: "{{ caddy_container_id }}"
|
||||
command: >
|
||||
curl -X DELETE localhost:2019/id/{{ stack_name }}_upstream/
|
||||
become: yes
|
||||
become: true
|
||||
when: (result.stdout | from_json)['error'] is not defined
|
||||
listen: "update nextcloud upstream"
|
||||
|
||||
|
|
@ -41,13 +41,13 @@
|
|||
container: "{{ caddy_container_id }}"
|
||||
command: >
|
||||
curl -X POST -H "Content-Type: application/json" -d @{{ nextcloud_upstream_file_dir }}/upstream.json localhost:2019/config/apps/http/servers/{{ (nextcloud_use_https == True) | ternary(caddy_https_server_name, caddy_http_server_name) }}/routes/0/
|
||||
become: yes
|
||||
become: true
|
||||
listen: "update nextcloud upstream"
|
||||
|
||||
- name: Ensure upstream directory is gone again
|
||||
ansible.builtin.file:
|
||||
path: "{{ nextcloud_upstream_file_dir }}"
|
||||
state: absent
|
||||
become: yes
|
||||
become: true
|
||||
listen: "update nextcloud upstream"
|
||||
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
curl localhost:2019/id/{{ stack_name }}_upstream/
|
||||
register: result
|
||||
changed_when: (result.stdout | from_json) != (lookup('template', 'upstream.json.j2') | from_yaml)
|
||||
become: yes
|
||||
become: true
|
||||
notify: "update nextcloud upstream"
|
||||
|
||||
- name: Ensure target directory exists
|
||||
|
|
@ -15,14 +15,14 @@
|
|||
path: "{{ nextcloud_upstream_file_dir }}"
|
||||
state: directory
|
||||
mode: '0755'
|
||||
become: yes
|
||||
become: true
|
||||
notify: "update nextcloud upstream"
|
||||
|
||||
- name: Move webserver Caddyfile to target dir
|
||||
ansible.builtin.copy:
|
||||
src: "Caddyfile"
|
||||
dest: "{{ nextcloud_upstream_file_dir }}/Caddyfile"
|
||||
become: yes
|
||||
become: true
|
||||
notify: "update nextcloud upstream"
|
||||
|
||||
- name: Deploy to swarm
|
||||
|
|
@ -32,7 +32,7 @@
|
|||
prune: yes
|
||||
compose:
|
||||
- "{{ stack_compose }}"
|
||||
become: yes
|
||||
become: true
|
||||
tags:
|
||||
- docker-swarm
|
||||
notify: "update nextcloud upstream"
|
||||
|
|
|
|||
|
|
@ -4,14 +4,14 @@
|
|||
path: "{{ ntfy_upstream_file_dir }}"
|
||||
state: directory
|
||||
mode: '0755'
|
||||
become: yes
|
||||
become: true
|
||||
listen: "update ntfy upstream"
|
||||
|
||||
- name: Update upstream template
|
||||
ansible.builtin.template:
|
||||
src: upstream.json.j2
|
||||
dest: "{{ ntfy_upstream_file_dir }}/upstream.json"
|
||||
become: yes
|
||||
become: true
|
||||
listen: "update ntfy upstream"
|
||||
|
||||
# figure out if upstream id exists
|
||||
|
|
@ -22,7 +22,7 @@
|
|||
curl localhost:2019/id/{{ stack_name }}_upstream/
|
||||
changed_when: False
|
||||
register: result
|
||||
become: yes
|
||||
become: true
|
||||
listen: "update ntfy upstream"
|
||||
|
||||
# upstream already exists, patch it
|
||||
|
|
@ -31,7 +31,7 @@
|
|||
container: "{{ caddy_container_id }}"
|
||||
command: >
|
||||
curl -X DELETE localhost:2019/id/{{ stack_name }}_upstream/
|
||||
become: yes
|
||||
become: true
|
||||
when: (result.stdout | from_json)['error'] is not defined
|
||||
listen: "update ntfy upstream"
|
||||
|
||||
|
|
@ -41,6 +41,6 @@
|
|||
container: "{{ caddy_container_id }}"
|
||||
command: >
|
||||
curl -X POST -H "Content-Type: application/json" -d @{{ ntfy_upstream_file_dir }}/upstream.json localhost:2019/config/apps/http/servers/{{ (ntfy_use_https == True) | ternary(caddy_https_server_name, caddy_http_server_name) }}/routes/0/
|
||||
become: yes
|
||||
become: true
|
||||
listen: "update ntfy upstream"
|
||||
|
||||
|
|
|
|||
|
|
@ -4,13 +4,13 @@
|
|||
path: "{{ ntfy_upstream_file_dir }}"
|
||||
state: directory
|
||||
mode: '0755'
|
||||
become: yes
|
||||
become: true
|
||||
|
||||
- name: Move ntfy configuration file to target dir
|
||||
ansible.builtin.template:
|
||||
src: "server.yml.j2"
|
||||
dest: "{{ ntfy_upstream_file_dir }}/server.yml"
|
||||
become: yes
|
||||
become: true
|
||||
notify: "update ntfy upstream"
|
||||
|
||||
## install ntfy container
|
||||
|
|
@ -21,7 +21,7 @@
|
|||
curl localhost:2019/id/{{ stack_name }}_upstream/
|
||||
register: result
|
||||
changed_when: (result.stdout | from_json) != (lookup('template', 'upstream.json.j2') | from_yaml)
|
||||
become: yes
|
||||
become: true
|
||||
notify: "update ntfy upstream"
|
||||
|
||||
- name: Deploy ntfy to swarm
|
||||
|
|
@ -31,7 +31,7 @@
|
|||
prune: yes
|
||||
compose:
|
||||
- "{{ stack_compose }}"
|
||||
become: yes
|
||||
become: true
|
||||
tags:
|
||||
- docker-swarm
|
||||
notify: "update ntfy upstream"
|
||||
|
|
|
|||
|
|
@ -4,14 +4,14 @@
|
|||
path: "{{ searx_upstream_file_dir }}"
|
||||
state: directory
|
||||
mode: '0755'
|
||||
become: yes
|
||||
become: true
|
||||
listen: "update searx upstream"
|
||||
|
||||
- name: Update upstream template
|
||||
ansible.builtin.template:
|
||||
src: upstream.json.j2
|
||||
dest: "{{ searx_upstream_file_dir }}/upstream.json"
|
||||
become: yes
|
||||
become: true
|
||||
listen: "update searx upstream"
|
||||
|
||||
# figure out if upstream id exists
|
||||
|
|
@ -22,7 +22,7 @@
|
|||
curl localhost:2019/id/{{ stack_name }}_upstream/
|
||||
changed_when: False
|
||||
register: result
|
||||
become: yes
|
||||
become: true
|
||||
listen: "update searx upstream"
|
||||
|
||||
# upstream already exists, patch it
|
||||
|
|
@ -31,7 +31,7 @@
|
|||
container: "{{ caddy_container_id }}"
|
||||
command: >
|
||||
curl -X DELETE localhost:2019/id/{{ stack_name }}_upstream/
|
||||
become: yes
|
||||
become: true
|
||||
when: (result.stdout | from_json)['error'] is not defined
|
||||
listen: "update searx upstream"
|
||||
|
||||
|
|
@ -41,13 +41,13 @@
|
|||
container: "{{ caddy_container_id }}"
|
||||
command: >
|
||||
curl -X POST -H "Content-Type: application/json" -d @{{ searx_upstream_file_dir }}/upstream.json localhost:2019/config/apps/http/servers/{{ (searx_use_https == True) | ternary(caddy_https_server_name, caddy_http_server_name) }}/routes/0/
|
||||
become: yes
|
||||
become: true
|
||||
listen: "update searx upstream"
|
||||
|
||||
- name: Ensure upstream directory is gone again
|
||||
ansible.builtin.file:
|
||||
path: "{{ searx_upstream_file_dir }}"
|
||||
state: absent
|
||||
become: yes
|
||||
become: true
|
||||
listen: "update searx upstream"
|
||||
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
curl localhost:2019/id/{{ stack_name }}_upstream/
|
||||
register: result
|
||||
changed_when: (result.stdout | from_json) != (lookup('template', 'upstream.json.j2') | from_yaml)
|
||||
become: yes
|
||||
become: true
|
||||
notify: "update searx upstream"
|
||||
|
||||
- name: Deploy searx to swarm
|
||||
|
|
@ -17,7 +17,7 @@
|
|||
prune: yes
|
||||
compose:
|
||||
- "{{ stack_compose }}"
|
||||
become: yes
|
||||
become: true
|
||||
tags:
|
||||
- docker-swarm
|
||||
notify: "update searx upstream"
|
||||
|
|
|
|||
|
|
@ -4,14 +4,14 @@
|
|||
path: "{{ shaarli_upstream_file_dir }}"
|
||||
state: directory
|
||||
mode: '0755'
|
||||
become: yes
|
||||
become: true
|
||||
listen: "update shaarli upstream"
|
||||
|
||||
- name: Update upstream template
|
||||
ansible.builtin.template:
|
||||
src: upstream.json.j2
|
||||
dest: "{{ shaarli_upstream_file_dir }}/upstream.json"
|
||||
become: yes
|
||||
become: true
|
||||
listen: "update shaarli upstream"
|
||||
|
||||
# figure out if upstream id exists
|
||||
|
|
@ -22,7 +22,7 @@
|
|||
curl localhost:2019/id/{{ stack_name }}_upstream/
|
||||
changed_when: False
|
||||
register: result
|
||||
become: yes
|
||||
become: true
|
||||
listen: "update shaarli upstream"
|
||||
|
||||
# upstream already exists, patch it
|
||||
|
|
@ -31,7 +31,7 @@
|
|||
container: "{{ caddy_container_id }}"
|
||||
command: >
|
||||
curl -X DELETE localhost:2019/id/{{ stack_name }}_upstream/
|
||||
become: yes
|
||||
become: true
|
||||
when: (result.stdout | from_json)['error'] is not defined
|
||||
listen: "update shaarli upstream"
|
||||
|
||||
|
|
@ -41,13 +41,13 @@
|
|||
container: "{{ caddy_container_id }}"
|
||||
command: >
|
||||
curl -X POST -H "Content-Type: application/json" -d @{{ shaarli_upstream_file_dir }}/upstream.json localhost:2019/config/apps/http/servers/{{ (shaarli_use_https == True) | ternary(caddy_https_server_name, caddy_http_server_name) }}/routes/0/
|
||||
become: yes
|
||||
become: true
|
||||
listen: "update shaarli upstream"
|
||||
|
||||
- name: Ensure upstream directory is gone again
|
||||
ansible.builtin.file:
|
||||
path: "{{ shaarli_upstream_file_dir }}"
|
||||
state: absent
|
||||
become: yes
|
||||
become: true
|
||||
listen: "update shaarli upstream"
|
||||
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
curl localhost:2019/id/{{ stack_name }}_upstream/
|
||||
register: result
|
||||
changed_when: (result.stdout | from_json) != (lookup('template', 'upstream.json.j2') | from_yaml)
|
||||
become: yes
|
||||
become: true
|
||||
notify: "update shaarli upstream"
|
||||
|
||||
- name: Deploy shaarli to swarm
|
||||
|
|
@ -17,7 +17,7 @@
|
|||
prune: yes
|
||||
compose:
|
||||
- "{{ stack_compose }}"
|
||||
become: yes
|
||||
become: true
|
||||
tags:
|
||||
- docker-swarm
|
||||
notify: "update shaarli upstream"
|
||||
|
|
|
|||
|
|
@ -4,14 +4,14 @@
|
|||
path: "{{ traggo_upstream_file_dir }}"
|
||||
state: directory
|
||||
mode: '0755'
|
||||
become: yes
|
||||
become: true
|
||||
listen: "update traggo upstream"
|
||||
|
||||
- name: Update upstream template
|
||||
ansible.builtin.template:
|
||||
src: upstream.json.j2
|
||||
dest: "{{ traggo_upstream_file_dir }}/upstream.json"
|
||||
become: yes
|
||||
become: true
|
||||
listen: "update traggo upstream"
|
||||
|
||||
# figure out if upstream id exists
|
||||
|
|
@ -22,7 +22,7 @@
|
|||
curl localhost:2019/id/{{ stack_name }}_upstream/
|
||||
changed_when: False
|
||||
register: result
|
||||
become: yes
|
||||
become: true
|
||||
listen: "update traggo upstream"
|
||||
|
||||
# upstream already exists, patch it
|
||||
|
|
@ -31,7 +31,7 @@
|
|||
container: "{{ caddy_container_id }}"
|
||||
command: >
|
||||
curl -X DELETE localhost:2019/id/{{ stack_name }}_upstream/
|
||||
become: yes
|
||||
become: true
|
||||
when: (result.stdout | from_json)['error'] is not defined
|
||||
listen: "update traggo upstream"
|
||||
|
||||
|
|
@ -41,13 +41,13 @@
|
|||
container: "{{ caddy_container_id }}"
|
||||
command: >
|
||||
curl -X POST -H "Content-Type: application/json" -d @{{ traggo_upstream_file_dir }}/upstream.json localhost:2019/config/apps/http/servers/{{ (traggo_use_https == True) | ternary(caddy_https_server_name, caddy_http_server_name) }}/routes/0/
|
||||
become: yes
|
||||
become: true
|
||||
listen: "update traggo upstream"
|
||||
|
||||
- name: Ensure upstream directory is gone again
|
||||
ansible.builtin.file:
|
||||
path: "{{ traggo_upstream_file_dir }}"
|
||||
state: absent
|
||||
become: yes
|
||||
become: true
|
||||
listen: "update traggo upstream"
|
||||
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
curl localhost:2019/id/{{ stack_name }}_upstream/
|
||||
register: result
|
||||
changed_when: (result.stdout | from_json) != (lookup('template', 'upstream.json.j2') | from_yaml)
|
||||
become: yes
|
||||
become: true
|
||||
notify: "update traggo upstream"
|
||||
|
||||
- name: Deploy traggo to swarm
|
||||
|
|
@ -17,7 +17,7 @@
|
|||
prune: yes
|
||||
compose:
|
||||
- "{{ stack_compose }}"
|
||||
become: yes
|
||||
become: true
|
||||
tags:
|
||||
- docker-swarm
|
||||
notify: "update traggo upstream"
|
||||
|
|
|
|||
|
|
@ -4,14 +4,14 @@
|
|||
path: "{{ wallabag_upstream_file_dir }}"
|
||||
state: directory
|
||||
mode: '0755'
|
||||
become: yes
|
||||
become: true
|
||||
listen: "update wallabag upstream"
|
||||
|
||||
- name: Update upstream template
|
||||
ansible.builtin.template:
|
||||
src: upstream.json.j2
|
||||
dest: "{{ wallabag_upstream_file_dir }}/upstream.json"
|
||||
become: yes
|
||||
become: true
|
||||
listen: "update wallabag upstream"
|
||||
|
||||
# figure out if upstream id exists
|
||||
|
|
@ -22,7 +22,7 @@
|
|||
curl localhost:2019/id/{{ stack.name }}_upstream/
|
||||
changed_when: False
|
||||
register: result
|
||||
become: yes
|
||||
become: true
|
||||
listen: "update wallabag upstream"
|
||||
|
||||
# upstream already exists, patch it
|
||||
|
|
@ -31,7 +31,7 @@
|
|||
container: "{{ caddy_container_id }}"
|
||||
command: >
|
||||
curl -X DELETE localhost:2019/id/{{ stack.name }}_upstream/
|
||||
become: yes
|
||||
become: true
|
||||
when: (result.stdout | from_json)['error'] is not defined
|
||||
listen: "update wallabag upstream"
|
||||
|
||||
|
|
@ -41,13 +41,13 @@
|
|||
container: "{{ caddy_container_id }}"
|
||||
command: >
|
||||
curl -X POST -H "Content-Type: application/json" -d @{{ wallabag_upstream_file_dir }}/upstream.json localhost:2019/config/apps/http/servers/{{ (wallabag_use_https == True) | ternary(caddy_https_server_name, caddy_http_server_name) }}/routes/0/
|
||||
become: yes
|
||||
become: true
|
||||
listen: "update wallabag upstream"
|
||||
|
||||
- name: Ensure upstream directory is gone again
|
||||
ansible.builtin.file:
|
||||
path: "{{ wallabag_upstream_file_dir }}"
|
||||
state: absent
|
||||
become: yes
|
||||
become: true
|
||||
listen: "update wallabag upstream"
|
||||
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
curl localhost:2019/id/{{ stack.name }}_upstream/
|
||||
register: result
|
||||
changed_when: (result.stdout | from_json) != (lookup('template', 'upstream.json.j2') | from_yaml)
|
||||
become: yes
|
||||
become: true
|
||||
notify: "update wallabag upstream"
|
||||
|
||||
- name: Deploy wallabag to swarm
|
||||
|
|
@ -18,7 +18,7 @@
|
|||
compose:
|
||||
- "{{ stack.compose }}"
|
||||
when: stack is defined
|
||||
become: yes
|
||||
become: true
|
||||
tags:
|
||||
- docker-swarm
|
||||
notify: "update wallabag upstream"
|
||||
|
|
|
|||
|
|
@ -4,14 +4,14 @@
|
|||
path: "{{ whoami_upstream_file_dir }}"
|
||||
state: directory
|
||||
mode: '0755'
|
||||
become: yes
|
||||
become: true
|
||||
listen: "update whoami upstream"
|
||||
|
||||
- name: update whoami upstream template
|
||||
ansible.builtin.template:
|
||||
src: upstream.json.j2
|
||||
dest: "{{ whoami_upstream_file_dir }}/upstream.json"
|
||||
become: yes
|
||||
become: true
|
||||
listen: "update whoami upstream"
|
||||
|
||||
# figure out if upstream id exists
|
||||
|
|
@ -22,7 +22,7 @@
|
|||
curl localhost:2019/id/{{ stack.name }}_upstream/
|
||||
changed_when: False
|
||||
register: result
|
||||
become: yes
|
||||
become: true
|
||||
listen: "update whoami upstream"
|
||||
|
||||
# upstream already exists, patch it
|
||||
|
|
@ -31,7 +31,7 @@
|
|||
container: "{{ caddy_container_id }}"
|
||||
command: >
|
||||
curl -X DELETE localhost:2019/id/{{ stack.name }}_upstream/
|
||||
become: yes
|
||||
become: true
|
||||
when: (result.stdout | from_json)['error'] is not defined
|
||||
listen: "update whoami upstream"
|
||||
|
||||
|
|
@ -41,13 +41,13 @@
|
|||
container: "{{ caddy_container_id }}"
|
||||
command: >
|
||||
curl -X POST -H "Content-Type: application/json" -d @{{ whoami_upstream_file_dir }}/upstream.json localhost:2019/config/apps/http/servers/{{ (whoami_use_https == True) | ternary(caddy_https_server_name, caddy_http_server_name) }}/routes/0/
|
||||
become: yes
|
||||
become: true
|
||||
listen: "update whoami upstream"
|
||||
|
||||
- name: Ensure upstream directory is gone again
|
||||
ansible.builtin.file:
|
||||
path: "{{ whoami_upstream_file_dir }}"
|
||||
state: absent
|
||||
become: yes
|
||||
become: true
|
||||
listen: "update whoami upstream"
|
||||
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
curl localhost:2019/id/{{ stack.name }}_upstream/
|
||||
register: result
|
||||
changed_when: (result.stdout | from_json) != (lookup('template', 'upstream.json.j2') | from_yaml)
|
||||
become: yes
|
||||
become: true
|
||||
notify: "update whoami upstream"
|
||||
|
||||
- name: Deploy whoami to swarm
|
||||
|
|
@ -18,7 +18,7 @@
|
|||
compose:
|
||||
- "{{ stack.compose }}"
|
||||
when: stack is defined
|
||||
become: yes
|
||||
become: true
|
||||
tags:
|
||||
- docker-swarm
|
||||
notify: "update whoami upstream"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue