parent
7ac27becaf
commit
d8f2141eb0
@ -1,41 +0,0 @@
|
||||
---
|
||||
|
||||
- ansible.builtin.include_tasks: "{{ role_path }}/tasks/server_base/setup_redhat.yml"
|
||||
when: ansible_os_family == 'RedHat' and ansible_distribution_major_version | int < 8
|
||||
|
||||
- ansible.builtin.include_tasks: "{{ role_path }}/tasks/server_base/setup_redhat8.yml"
|
||||
when: ansible_os_family == 'RedHat' and ansible_distribution_major_version | int > 7 and ansible_distribution_major_version | int < 30
|
||||
|
||||
- ansible.builtin.include_tasks: "{{ role_path }}/tasks/server_base/setup_fedora.yml"
|
||||
when: ansible_os_family == 'RedHat' and ansible_distribution_major_version | int > 30
|
||||
|
||||
- when: ansible_os_family == 'Debian'
|
||||
block:
|
||||
# ansible_lsb is only available if lsb-release is installed.
|
||||
- name: Ensure lsb-release installed
|
||||
ansible.builtin.apt:
|
||||
name:
|
||||
- lsb-release
|
||||
state: present
|
||||
update_cache: true
|
||||
register: lsb_release_installation_result
|
||||
|
||||
- name: Reread ansible_lsb facts if lsb-release got installed
|
||||
ansible.builtin.setup:
|
||||
filter: ansible_lsb*
|
||||
when: lsb_release_installation_result.changed
|
||||
|
||||
- ansible.builtin.include_tasks: "{{ role_path }}/tasks/server_base/setup_debian.yml"
|
||||
when: (ansible_os_family == 'Debian') and (ansible_lsb.id != 'Raspbian')
|
||||
|
||||
- ansible.builtin.include_tasks: "{{ role_path }}/tasks/server_base/setup_raspbian.yml"
|
||||
when: (ansible_os_family == 'Debian') and (ansible_lsb.id == 'Raspbian')
|
||||
|
||||
- ansible.builtin.include_tasks: "{{ role_path }}/tasks/server_base/setup_archlinux.yml"
|
||||
when: ansible_distribution == 'Archlinux'
|
||||
|
||||
- name: Ensure Docker is started and autoruns
|
||||
ansible.builtin.service:
|
||||
name: docker
|
||||
state: started
|
||||
enabled: true
|
@ -1,16 +0,0 @@
|
||||
---
|
||||
|
||||
- name: Install host dependencies
|
||||
community.general.pacman:
|
||||
name:
|
||||
- python-docker
|
||||
- python-dnspython
|
||||
state: present
|
||||
update_cache: true
|
||||
|
||||
- name: Ensure Docker is installed
|
||||
community.general.pacman:
|
||||
name:
|
||||
- docker
|
||||
state: present
|
||||
when: matrix_docker_installation_enabled | bool
|
@ -1,34 +0,0 @@
|
||||
---
|
||||
|
||||
- name: Ensure APT usage dependencies are installed
|
||||
ansible.builtin.apt:
|
||||
name:
|
||||
- apt-transport-https
|
||||
- ca-certificates
|
||||
- gnupg
|
||||
state: present
|
||||
update_cache: true
|
||||
|
||||
- name: Ensure Docker's APT key is trusted
|
||||
ansible.builtin.apt_key:
|
||||
url: "https://download.docker.com/linux/{{ ansible_distribution | lower }}/gpg"
|
||||
id: 9DC858229FC7DD38854AE2D88D81803C0EBFCD88
|
||||
state: present
|
||||
register: add_repository_key
|
||||
ignore_errors: true
|
||||
when: matrix_docker_installation_enabled | bool and matrix_docker_package_name == 'docker-ce'
|
||||
|
||||
- name: Ensure Docker repository is enabled
|
||||
ansible.builtin.apt_repository:
|
||||
repo: "deb [arch={{ matrix_debian_arch }}] https://download.docker.com/linux/{{ ansible_distribution | lower }} {{ ansible_distribution_release }} stable"
|
||||
state: present
|
||||
update_cache: true
|
||||
when: matrix_docker_installation_enabled | bool and matrix_docker_package_name == 'docker-ce'
|
||||
|
||||
- name: Ensure Docker is installed
|
||||
ansible.builtin.apt:
|
||||
name:
|
||||
- "{{ matrix_docker_package_name }}"
|
||||
- "python{{ '3' if ansible_python.version.major == 3 else '' }}-docker"
|
||||
state: present
|
||||
when: matrix_docker_installation_enabled | bool
|
@ -1,32 +0,0 @@
|
||||
---
|
||||
|
||||
- name: Ensure Docker repository is enabled
|
||||
ansible.builtin.template:
|
||||
src: "{{ role_path }}/files/yum.repos.d/{{ item }}"
|
||||
dest: "/etc/yum.repos.d/docker-ce.repo"
|
||||
owner: "root"
|
||||
group: "root"
|
||||
mode: 0644
|
||||
with_items:
|
||||
- docker-ce-fedora.repo
|
||||
when: matrix_docker_installation_enabled | bool and matrix_docker_package_name == 'docker-ce'
|
||||
|
||||
- name: Ensure Docker's RPM key is trusted
|
||||
ansible.builtin.rpm_key:
|
||||
state: present
|
||||
key: https://download.docker.com/linux/fedora/gpg
|
||||
when: matrix_docker_installation_enabled | bool and matrix_docker_package_name == 'docker-ce'
|
||||
|
||||
- name: Ensure Docker is installed
|
||||
ansible.builtin.yum:
|
||||
name:
|
||||
- "{{ matrix_docker_package_name }}"
|
||||
- python3-pip
|
||||
state: present
|
||||
when: matrix_docker_installation_enabled | bool
|
||||
|
||||
- name: Ensure Docker-Py is installed
|
||||
ansible.builtin.pip:
|
||||
name: docker-py
|
||||
state: present
|
||||
when: matrix_docker_installation_enabled | bool
|
@ -1,34 +0,0 @@
|
||||
---
|
||||
|
||||
- name: Ensure APT usage dependencies are installed
|
||||
ansible.builtin.apt:
|
||||
name:
|
||||
- apt-transport-https
|
||||
- ca-certificates
|
||||
- gnupg
|
||||
state: present
|
||||
update_cache: true
|
||||
|
||||
- name: Ensure Docker's APT key is trusted
|
||||
ansible.builtin.apt_key:
|
||||
url: https://download.docker.com/linux/raspbian/gpg
|
||||
id: 9DC858229FC7DD38854AE2D88D81803C0EBFCD88
|
||||
state: present
|
||||
register: add_repository_key
|
||||
ignore_errors: true
|
||||
when: matrix_docker_installation_enabled | bool and matrix_docker_package_name == 'docker-ce'
|
||||
|
||||
- name: Ensure Docker repository is enabled
|
||||
ansible.builtin.apt_repository:
|
||||
repo: "deb [arch={{ matrix_debian_arch }}] https://download.docker.com/linux/raspbian {{ ansible_distribution_release }} stable"
|
||||
state: present
|
||||
update_cache: true
|
||||
when: matrix_docker_installation_enabled | bool and matrix_docker_package_name == 'docker-ce'
|
||||
|
||||
- name: Ensure Docker is installed
|
||||
ansible.builtin.apt:
|
||||
name:
|
||||
- "{{ matrix_docker_package_name }}"
|
||||
- "python{{ '3' if ansible_python.version.major == 3 else '' }}-docker"
|
||||
state: present
|
||||
when: matrix_docker_installation_enabled | bool
|
@ -1,24 +0,0 @@
|
||||
---
|
||||
|
||||
- name: Ensure Docker repository is enabled
|
||||
ansible.builtin.template:
|
||||
src: "{{ role_path }}/files/yum.repos.d/docker-ce-centos.repo"
|
||||
dest: "/etc/yum.repos.d/docker-ce.repo"
|
||||
owner: "root"
|
||||
group: "root"
|
||||
mode: 0644
|
||||
when: matrix_docker_installation_enabled | bool and matrix_docker_package_name == 'docker-ce'
|
||||
|
||||
- name: Ensure Docker's RPM key is trusted
|
||||
ansible.builtin.rpm_key:
|
||||
state: present
|
||||
key: https://download.docker.com/linux/centos/gpg
|
||||
when: matrix_docker_installation_enabled | bool and matrix_docker_package_name == 'docker-ce'
|
||||
|
||||
- name: Ensure Docker is installed
|
||||
ansible.builtin.yum:
|
||||
name:
|
||||
- "{{ matrix_docker_package_name }}"
|
||||
- docker-python
|
||||
state: present
|
||||
when: matrix_docker_installation_enabled | bool
|
@ -1,37 +0,0 @@
|
||||
---
|
||||
|
||||
- name: Ensure Docker repository is enabled
|
||||
ansible.builtin.template:
|
||||
src: "{{ role_path }}/files/yum.repos.d/docker-ce-centos.repo"
|
||||
dest: "/etc/yum.repos.d/docker-ce.repo"
|
||||
owner: "root"
|
||||
group: "root"
|
||||
mode: 0644
|
||||
when: matrix_docker_installation_enabled | bool and matrix_docker_package_name == 'docker-ce'
|
||||
|
||||
- name: Ensure Docker's RPM key is trusted
|
||||
ansible.builtin.rpm_key:
|
||||
state: present
|
||||
key: https://download.docker.com/linux/centos/gpg
|
||||
when: matrix_docker_installation_enabled | bool and matrix_docker_package_name == 'docker-ce'
|
||||
|
||||
- name: Ensure EPEL is installed
|
||||
ansible.builtin.yum:
|
||||
name:
|
||||
- epel-release
|
||||
state: present
|
||||
update_cache: true
|
||||
|
||||
- name: Ensure Docker is installed
|
||||
ansible.builtin.yum:
|
||||
name:
|
||||
- "{{ matrix_docker_package_name }}"
|
||||
- python3-pip
|
||||
state: present
|
||||
when: matrix_docker_installation_enabled | bool
|
||||
|
||||
- name: Ensure Docker-Py is installed
|
||||
ansible.builtin.pip:
|
||||
name: docker-py
|
||||
state: present
|
||||
when: matrix_docker_installation_enabled | bool
|
Loading…
Reference in new issue