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
|
|
@ -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"
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue