Compare commits
No commits in common. "87b23b5b8af14499f772bce8fb80f60f8136ff22" and "7f391e9fc8d6c61d8c6197581104ee297367fe27" have entirely different histories.
87b23b5b8a
...
7f391e9fc8
|
@ -1,6 +1,11 @@
|
|||
---
|
||||
# Server/Caddyserver-Install: Install/Update Caddy Webserver (with some modules)
|
||||
|
||||
# Detect some more host facts
|
||||
- name: caddyserver - Detect debian distributor ID
|
||||
shell: lsb_release -is
|
||||
register: lsb_id
|
||||
|
||||
- name: caddyserver - Create cache directory
|
||||
file:
|
||||
path: "{{ caddy_cachedir }}"
|
||||
|
@ -24,17 +29,12 @@
|
|||
get_url:
|
||||
url: "https://caddyserver.com/download/linux/amd64?plugins=http.ratelimit&license=personal"
|
||||
dest: "{{ caddy_cachedir }}/tmp/caddy.tar.gz"
|
||||
when: ansible_architecture == "x86_64"
|
||||
- name: caddyserver - Download caddy webserver (armv7/ raspberry pi)
|
||||
when: lsb_id.stdout != "Raspbian"
|
||||
- name: caddyserver - Download caddy webserver (raspberry pi)
|
||||
get_url:
|
||||
url: "https://caddyserver.com/download/linux/arm7?plugins=http.ratelimit&license=personal"
|
||||
dest: "{{ caddy_cachedir }}/tmp/caddy.tar.gz"
|
||||
when: ansible_architecture == "armv7l"
|
||||
- name: caddyserver - Download caddy webserver (arm64)
|
||||
get_url:
|
||||
url: "https://caddyserver.com/download/linux/arm64?plugins=http.ratelimit&license=personal"
|
||||
dest: "{{ caddy_cachedir }}/tmp/caddy.tar.gz"
|
||||
when: ansible_architecture == "aarch64"
|
||||
when: lsb_id.stdout == "Raspbian"
|
||||
|
||||
- name: caddyserver - Stop caddy
|
||||
become: yes
|
||||
|
|
|
@ -7,6 +7,9 @@
|
|||
- name: docker - Detect architecture
|
||||
shell: dpkg --print-architecture
|
||||
register: dpkg_arch
|
||||
- name: docker - Detect debian distributor ID
|
||||
shell: lsb_release -is
|
||||
register: lsb_id
|
||||
|
||||
# Install docker CE
|
||||
- name: docker - Install docker CE APT dependencies
|
||||
|
@ -33,13 +36,13 @@
|
|||
apt_repository:
|
||||
repo: "deb [arch={{ dpkg_arch.stdout }}] https://download.docker.com/linux/debian {{ ansible_distribution_release }} stable"
|
||||
state: present
|
||||
when: ansible_lsb.id != "Raspbian"
|
||||
when: lsb_id.stdout != "Raspbian"
|
||||
- name: docker - Add docker CE repo (Rasbian)
|
||||
become: yes
|
||||
apt_repository:
|
||||
repo: "deb [arch={{ dpkg_arch.stdout }}] https://download.docker.com/linux/raspbian {{ ansible_distribution_release }} stable"
|
||||
state: present
|
||||
when: ansible_lsb.id == "Raspbian"
|
||||
when: lsb_id.stdout == "Raspbian"
|
||||
|
||||
- name: docker - Install docker CE
|
||||
become: yes
|
||||
|
@ -47,15 +50,15 @@
|
|||
name: docker-ce
|
||||
state: latest
|
||||
update_cache: yes
|
||||
cache_valid_time: "3600"
|
||||
cache_valid_time: 3600
|
||||
|
||||
# Install latest release of docker-compose (using pip3)
|
||||
# docker only provides pre-compiled binaries for x86_64, but not for armhf/ arm64!
|
||||
# but ansible needs the python package anyway
|
||||
- name: docker-compose - Discover if ARM is used
|
||||
- name: docker-compose - Discover if raspbian is used
|
||||
set_fact:
|
||||
dockercompose_use_pip: true
|
||||
when: ansible_architecture == "aarch64" or ansible_architecture == "armv7f"
|
||||
when: lsb_id.stdout == "Raspbian"
|
||||
|
||||
- name: docker-compose - Install x86_46 binary
|
||||
block:
|
||||
|
|
Loading…
Reference in a new issue