Compare commits
2 commits
7f391e9fc8
...
87b23b5b8a
Author | SHA1 | Date | |
---|---|---|---|
Jannik Beyerstedt | 87b23b5b8a | ||
Jannik Beyerstedt | 4ecd30ba5f |
|
@ -1,11 +1,6 @@
|
|||
---
|
||||
# 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 }}"
|
||||
|
@ -29,12 +24,17 @@
|
|||
get_url:
|
||||
url: "https://caddyserver.com/download/linux/amd64?plugins=http.ratelimit&license=personal"
|
||||
dest: "{{ caddy_cachedir }}/tmp/caddy.tar.gz"
|
||||
when: lsb_id.stdout != "Raspbian"
|
||||
- name: caddyserver - Download caddy webserver (raspberry pi)
|
||||
when: ansible_architecture == "x86_64"
|
||||
- name: caddyserver - Download caddy webserver (armv7/ raspberry pi)
|
||||
get_url:
|
||||
url: "https://caddyserver.com/download/linux/arm7?plugins=http.ratelimit&license=personal"
|
||||
dest: "{{ caddy_cachedir }}/tmp/caddy.tar.gz"
|
||||
when: lsb_id.stdout == "Raspbian"
|
||||
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"
|
||||
|
||||
- name: caddyserver - Stop caddy
|
||||
become: yes
|
||||
|
|
|
@ -7,9 +7,6 @@
|
|||
- 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
|
||||
|
@ -36,13 +33,13 @@
|
|||
apt_repository:
|
||||
repo: "deb [arch={{ dpkg_arch.stdout }}] https://download.docker.com/linux/debian {{ ansible_distribution_release }} stable"
|
||||
state: present
|
||||
when: lsb_id.stdout != "Raspbian"
|
||||
when: ansible_lsb.id != "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: lsb_id.stdout == "Raspbian"
|
||||
when: ansible_lsb.id == "Raspbian"
|
||||
|
||||
- name: docker - Install docker CE
|
||||
become: yes
|
||||
|
@ -50,15 +47,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 raspbian is used
|
||||
- name: docker-compose - Discover if ARM is used
|
||||
set_fact:
|
||||
dockercompose_use_pip: true
|
||||
when: lsb_id.stdout == "Raspbian"
|
||||
when: ansible_architecture == "aarch64" or ansible_architecture == "armv7f"
|
||||
|
||||
- name: docker-compose - Install x86_46 binary
|
||||
block:
|
||||
|
|
Loading…
Reference in a new issue