[TIDY] Update to ansible 4 module names
This commit is contained in:
parent
3c1939f431
commit
a2fc598416
19 changed files with 89 additions and 89 deletions
|
|
@ -2,12 +2,12 @@
|
|||
# Server/Caddyserver-Install: Install/Update Caddy Webserver (with some modules)
|
||||
|
||||
- name: caddyserver - Create cache directory
|
||||
file:
|
||||
ansible.builtin.file:
|
||||
path: "{{ caddy_cachedir }}"
|
||||
state: directory
|
||||
|
||||
- name: caddyserver - Get all caddy releases
|
||||
get_url:
|
||||
ansible.builtin.get_url:
|
||||
url: https://api.github.com/repos/caddyserver/caddy/git/refs/tags
|
||||
dest: "{{ caddy_cachedir }}/releases.txt"
|
||||
force: yes
|
||||
|
|
@ -16,13 +16,13 @@
|
|||
- name: caddyserver - Install or update
|
||||
block:
|
||||
- name: caddyserver - Make temp download directory
|
||||
file:
|
||||
ansible.builtin.file:
|
||||
path: "{{ caddy_cachedir }}/tmp"
|
||||
state: directory
|
||||
|
||||
- name: caddyserver - Download caddy webserver (amd64)
|
||||
become: yes
|
||||
get_url:
|
||||
ansible.builtin.get_url:
|
||||
url: "https://caddyserver.com/api/download?os=linux&arch=amd64"
|
||||
dest: "{{ caddy_cachedir }}/tmp/caddy"
|
||||
group: root
|
||||
|
|
@ -31,7 +31,7 @@
|
|||
when: ansible_architecture == "x86_64"
|
||||
- name: caddyserver - Download caddy webserver (armv7/ raspberry pi)
|
||||
become: yes
|
||||
get_url:
|
||||
ansible.builtin.get_url:
|
||||
url: "https://caddyserver.com/api/download?os=linux&arch=arm&arm=7"
|
||||
dest: "{{ caddy_cachedir }}/tmp/caddy"
|
||||
group: root
|
||||
|
|
@ -40,7 +40,7 @@
|
|||
when: ansible_architecture == "armv7l"
|
||||
- name: caddyserver - Download caddy webserver (arm64)
|
||||
become: yes
|
||||
get_url:
|
||||
ansible.builtin.get_url:
|
||||
url: "https://caddyserver.com/api/download?os=linux&arch=arm64"
|
||||
dest: "{{ caddy_cachedir }}/tmp/caddy"
|
||||
group: root
|
||||
|
|
@ -50,17 +50,17 @@
|
|||
|
||||
- name: caddyserver - Stop caddy
|
||||
become: yes
|
||||
service:
|
||||
ansible.builtin.service:
|
||||
name: caddy
|
||||
state: stopped
|
||||
ignore_errors: yes
|
||||
|
||||
- name: caddyserver - Copy caddy to a PATH location
|
||||
become: yes
|
||||
shell: "cp {{ caddy_cachedir }}/tmp/caddy /usr/local/bin"
|
||||
ansible.builtin.shell: "cp {{ caddy_cachedir }}/tmp/caddy /usr/local/bin"
|
||||
- name: caddyserver - Clean up download files
|
||||
become: yes
|
||||
file:
|
||||
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