[TIDY] move when statements, fix whitespace
Having the when condition of a task at the top instead of bottom is easiert to read. Also some spaces were another whitespace character on accident.
This commit is contained in:
parent
1de4e4ef24
commit
a0ac0a67a7
13 changed files with 54 additions and 60 deletions
|
|
@ -14,6 +14,7 @@
|
|||
register: caddy_releases_cache
|
||||
|
||||
- name: caddyserver - Install or update
|
||||
when: caddy_releases_cache.changed
|
||||
block:
|
||||
- name: caddyserver - Make temp download directory
|
||||
ansible.builtin.file:
|
||||
|
|
@ -21,6 +22,7 @@
|
|||
state: directory
|
||||
|
||||
- name: caddyserver - Download caddy webserver (amd64)
|
||||
when: ansible_architecture == "x86_64"
|
||||
become: yes
|
||||
ansible.builtin.get_url:
|
||||
url: "https://caddyserver.com/api/download?os=linux&arch=amd64"
|
||||
|
|
@ -28,8 +30,8 @@
|
|||
group: root
|
||||
owner: root
|
||||
mode: 0755
|
||||
when: ansible_architecture == "x86_64"
|
||||
- name: caddyserver - Download caddy webserver (armv7/ raspberry pi)
|
||||
when: ansible_architecture == "armv7l"
|
||||
become: yes
|
||||
ansible.builtin.get_url:
|
||||
url: "https://caddyserver.com/api/download?os=linux&arch=arm&arm=7"
|
||||
|
|
@ -37,8 +39,8 @@
|
|||
group: root
|
||||
owner: root
|
||||
mode: 0755
|
||||
when: ansible_architecture == "armv7l"
|
||||
- name: caddyserver - Download caddy webserver (arm64)
|
||||
when: ansible_architecture == "aarch64"
|
||||
become: yes
|
||||
ansible.builtin.get_url:
|
||||
url: "https://caddyserver.com/api/download?os=linux&arch=arm64"
|
||||
|
|
@ -46,7 +48,6 @@
|
|||
group: root
|
||||
owner: root
|
||||
mode: 0755
|
||||
when: ansible_architecture == "aarch64"
|
||||
|
||||
- name: caddyserver - Stop caddy
|
||||
become: yes
|
||||
|
|
@ -63,4 +64,3 @@
|
|||
ansible.builtin.file:
|
||||
path: "{{ caddy_cachedir }}/tmp"
|
||||
state: absent
|
||||
when: caddy_releases_cache.changed
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue