!remove(docker): Python SDK install & pyhton path workaround
Both is not needed anymore, since ansible docker modules use the api directly.
This commit is contained in:
parent
7469b6bbf4
commit
ddd0effa0d
33 changed files with 11 additions and 140 deletions
|
@ -23,5 +23,3 @@
|
||||||
- docker_cleanup
|
- docker_cleanup
|
||||||
- traefik
|
- traefik
|
||||||
- camo
|
- camo
|
||||||
environment:
|
|
||||||
PYTHONPATH: /opt/ansible-dependencies/lib/python{{ env_ansible_deps_python_version | default(2.7) }}/site-packages
|
|
||||||
|
|
|
@ -22,5 +22,3 @@
|
||||||
- docker_cleanup
|
- docker_cleanup
|
||||||
- traefik
|
- traefik
|
||||||
- codimd
|
- codimd
|
||||||
environment:
|
|
||||||
PYTHONPATH: /opt/ansible-dependencies/lib/python{{ env_ansible_deps_python_version | default(2.7) }}/site-packages
|
|
||||||
|
|
|
@ -21,5 +21,3 @@
|
||||||
- docker
|
- docker
|
||||||
- docker_cleanup
|
- docker_cleanup
|
||||||
- docker_ipv6_nat
|
- docker_ipv6_nat
|
||||||
environment:
|
|
||||||
PYTHONPATH: /opt/ansible-dependencies/lib/python{{ env_ansible_deps_python_version | default(2.7) }}/site-packages
|
|
||||||
|
|
|
@ -21,5 +21,3 @@
|
||||||
- docker
|
- docker
|
||||||
- docker_cleanup
|
- docker_cleanup
|
||||||
- factorio
|
- factorio
|
||||||
environment:
|
|
||||||
PYTHONPATH: /opt/ansible-dependencies/lib/python{{ env_ansible_deps_python_version | default(2.7) }}/site-packages
|
|
||||||
|
|
|
@ -23,5 +23,3 @@
|
||||||
- docker_cleanup
|
- docker_cleanup
|
||||||
- traefik
|
- traefik
|
||||||
- gitlab
|
- gitlab
|
||||||
environment:
|
|
||||||
PYTHONPATH: /opt/ansible-dependencies/lib/python{{ env_ansible_deps_python_version | default(2.7) }}/site-packages
|
|
||||||
|
|
|
@ -22,8 +22,6 @@
|
||||||
- docker
|
- docker
|
||||||
- docker_cleanup
|
- docker_cleanup
|
||||||
- gitlab_runner
|
- gitlab_runner
|
||||||
environment:
|
|
||||||
PYTHONPATH: /opt/ansible-dependencies/lib/python{{ env_ansible_deps_python_version | default(2.7) }}/site-packages
|
|
||||||
tasks:
|
tasks:
|
||||||
- name: Install docker image prune crontab
|
- name: Install docker image prune crontab
|
||||||
ansible.builtin.cron:
|
ansible.builtin.cron:
|
||||||
|
|
|
@ -23,5 +23,3 @@
|
||||||
- docker_cleanup
|
- docker_cleanup
|
||||||
- traefik
|
- traefik
|
||||||
- keycloak
|
- keycloak
|
||||||
environment:
|
|
||||||
PYTHONPATH: /opt/ansible-dependencies/lib/python{{ env_ansible_deps_python_version | default(2.7) }}/site-packages
|
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
---
|
---
|
||||||
|
|
||||||
# Infrastructure
|
# Infrastructure
|
||||||
# Ansible instructions to deploy the infrastructure
|
# Ansible instructions to deploy the infrastructure
|
||||||
# Copyright (C) 2020 Saibotk
|
# Copyright (C) 2020 Saibotk
|
||||||
|
@ -21,5 +20,3 @@
|
||||||
roles:
|
roles:
|
||||||
- docker
|
- docker
|
||||||
- lvm_self_backup
|
- lvm_self_backup
|
||||||
environment:
|
|
||||||
PYTHONPATH: /opt/ansible-dependencies/lib/python{{ env_ansible_deps_python_version | default(2.7) }}/site-packages
|
|
||||||
|
|
|
@ -19,8 +19,6 @@
|
||||||
hosts: mailcow
|
hosts: mailcow
|
||||||
roles:
|
roles:
|
||||||
- docker
|
- docker
|
||||||
environment:
|
|
||||||
PYTHONPATH: /opt/ansible-dependencies/lib/python{{ env_ansible_deps_python_version | default(2.7) }}/site-packages
|
|
||||||
tasks:
|
tasks:
|
||||||
- name: Install backup crontab
|
- name: Install backup crontab
|
||||||
ansible.builtin.cron:
|
ansible.builtin.cron:
|
||||||
|
|
|
@ -23,5 +23,3 @@
|
||||||
- docker_cleanup
|
- docker_cleanup
|
||||||
- traefik
|
- traefik
|
||||||
- mastodon
|
- mastodon
|
||||||
environment:
|
|
||||||
PYTHONPATH: /opt/ansible-dependencies/lib/python{{ env_ansible_deps_python_version | default(2.7) }}/site-packages
|
|
||||||
|
|
|
@ -22,5 +22,3 @@
|
||||||
- docker_cleanup
|
- docker_cleanup
|
||||||
- traefik
|
- traefik
|
||||||
- matrix
|
- matrix
|
||||||
environment:
|
|
||||||
PYTHONPATH: /opt/ansible-dependencies/lib/python{{ env_ansible_deps_python_version | default(2.7) }}/site-packages
|
|
||||||
|
|
|
@ -22,5 +22,3 @@
|
||||||
- docker_cleanup
|
- docker_cleanup
|
||||||
- traefik
|
- traefik
|
||||||
- matrix_delegate
|
- matrix_delegate
|
||||||
environment:
|
|
||||||
PYTHONPATH: /opt/ansible-dependencies/lib/python{{ env_ansible_deps_python_version | default(2.7) }}/site-packages
|
|
||||||
|
|
|
@ -22,5 +22,3 @@
|
||||||
- docker_cleanup
|
- docker_cleanup
|
||||||
- traefik
|
- traefik
|
||||||
- matrix_elementweb
|
- matrix_elementweb
|
||||||
environment:
|
|
||||||
PYTHONPATH: /opt/ansible-dependencies/lib/python{{ env_ansible_deps_python_version | default(2.7) }}/site-packages
|
|
||||||
|
|
|
@ -22,5 +22,3 @@
|
||||||
- docker_cleanup
|
- docker_cleanup
|
||||||
- traefik
|
- traefik
|
||||||
- matrix_maubot
|
- matrix_maubot
|
||||||
environment:
|
|
||||||
PYTHONPATH: /opt/ansible-dependencies/lib/python{{ env_ansible_deps_python_version | default(2.7) }}/site-packages
|
|
||||||
|
|
|
@ -22,5 +22,3 @@
|
||||||
- docker_cleanup
|
- docker_cleanup
|
||||||
- traefik
|
- traefik
|
||||||
- matrix_sliding_sync
|
- matrix_sliding_sync
|
||||||
environment:
|
|
||||||
PYTHONPATH: /opt/ansible-dependencies/lib/python{{ env_ansible_deps_python_version | default(2.7) }}/site-packages
|
|
||||||
|
|
|
@ -22,5 +22,3 @@
|
||||||
- docker_cleanup
|
- docker_cleanup
|
||||||
- traefik
|
- traefik
|
||||||
- matrix_webhooks
|
- matrix_webhooks
|
||||||
environment:
|
|
||||||
PYTHONPATH: /opt/ansible-dependencies/lib/python{{ env_ansible_deps_python_version | default(2.7) }}/site-packages
|
|
||||||
|
|
|
@ -22,5 +22,3 @@
|
||||||
- docker
|
- docker
|
||||||
- docker_cleanup
|
- docker_cleanup
|
||||||
- minecraft
|
- minecraft
|
||||||
environment:
|
|
||||||
PYTHONPATH: /opt/ansible-dependencies/lib/python{{ env_ansible_deps_python_version | default(2.7) }}/site-packages
|
|
||||||
|
|
|
@ -22,5 +22,3 @@
|
||||||
- docker_cleanup
|
- docker_cleanup
|
||||||
- traefik
|
- traefik
|
||||||
- minecraft_blockmap
|
- minecraft_blockmap
|
||||||
environment:
|
|
||||||
PYTHONPATH: /opt/ansible-dependencies/lib/python{{ env_ansible_deps_python_version | default(2.7) }}/site-packages
|
|
||||||
|
|
|
@ -23,5 +23,3 @@
|
||||||
- docker_cleanup
|
- docker_cleanup
|
||||||
- traefik
|
- traefik
|
||||||
- minio
|
- minio
|
||||||
environment:
|
|
||||||
PYTHONPATH: /opt/ansible-dependencies/lib/python{{ env_ansible_deps_python_version | default(2.7) }}/site-packages
|
|
||||||
|
|
|
@ -23,8 +23,6 @@
|
||||||
- docker_cleanup
|
- docker_cleanup
|
||||||
- traefik
|
- traefik
|
||||||
- monitoring
|
- monitoring
|
||||||
environment:
|
|
||||||
PYTHONPATH: /opt/ansible-dependencies/lib/python{{ env_ansible_deps_python_version | default(2.7) }}/site-packages
|
|
||||||
|
|
||||||
- name: Install & configure monitoring clients
|
- name: Install & configure monitoring clients
|
||||||
hosts: all
|
hosts: all
|
||||||
|
@ -33,5 +31,3 @@
|
||||||
- docker
|
- docker
|
||||||
- docker_cleanup
|
- docker_cleanup
|
||||||
- telegraf
|
- telegraf
|
||||||
environment:
|
|
||||||
PYTHONPATH: /opt/ansible-dependencies/lib/python{{ env_ansible_deps_python_version | default(2.7) }}/site-packages
|
|
||||||
|
|
|
@ -22,5 +22,3 @@
|
||||||
- docker_cleanup
|
- docker_cleanup
|
||||||
- traefik
|
- traefik
|
||||||
- owncast
|
- owncast
|
||||||
environment:
|
|
||||||
PYTHONPATH: /opt/ansible-dependencies/lib/python{{ env_ansible_deps_python_version | default(2.7) }}/site-packages
|
|
||||||
|
|
|
@ -22,5 +22,3 @@
|
||||||
- docker_cleanup
|
- docker_cleanup
|
||||||
- traefik
|
- traefik
|
||||||
- penpot
|
- penpot
|
||||||
environment:
|
|
||||||
PYTHONPATH: /opt/ansible-dependencies/lib/python{{ env_ansible_deps_python_version | default(2.7) }}/site-packages
|
|
||||||
|
|
|
@ -24,5 +24,3 @@
|
||||||
- docker_cleanup
|
- docker_cleanup
|
||||||
- traefik
|
- traefik
|
||||||
- static_websites
|
- static_websites
|
||||||
environment:
|
|
||||||
PYTHONPATH: /opt/ansible-dependencies/lib/python{{ env_ansible_deps_python_version | default(2.7) }}/site-packages
|
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
---
|
---
|
||||||
|
|
||||||
# Infrastructure
|
# Infrastructure
|
||||||
# Ansible instructions to deploy the infrastructure
|
# Ansible instructions to deploy the infrastructure
|
||||||
# Copyright (C) 2022 Saibotk
|
# Copyright (C) 2022 Saibotk
|
||||||
|
@ -20,5 +19,3 @@
|
||||||
hosts: all
|
hosts: all
|
||||||
roles:
|
roles:
|
||||||
- sys_upgrade
|
- sys_upgrade
|
||||||
environment:
|
|
||||||
PYTHONPATH: /opt/ansible-dependencies/lib/python{{ env_ansible_deps_python_version | default(2.7) }}/site-packages
|
|
||||||
|
|
|
@ -22,5 +22,3 @@
|
||||||
- docker_cleanup
|
- docker_cleanup
|
||||||
- traefik
|
- traefik
|
||||||
- teamspeak
|
- teamspeak
|
||||||
environment:
|
|
||||||
PYTHONPATH: /opt/ansible-dependencies/lib/python{{ env_ansible_deps_python_version | default(2.7) }}/site-packages
|
|
||||||
|
|
|
@ -22,5 +22,3 @@
|
||||||
- docker_cleanup
|
- docker_cleanup
|
||||||
- traefik
|
- traefik
|
||||||
- vikunja
|
- vikunja
|
||||||
environment:
|
|
||||||
PYTHONPATH: /opt/ansible-dependencies/lib/python{{ env_ansible_deps_python_version | default(2.7) }}/site-packages
|
|
||||||
|
|
|
@ -1,26 +1,17 @@
|
||||||
Docker
|
# Docker
|
||||||
=========
|
|
||||||
|
|
||||||
This will install [Docker](https://www.docker.com/) from their official repository and install the docker python library via pip.
|
This will install [Docker](https://www.docker.com/) from their official repository.
|
||||||
|
|
||||||
Requirements
|
## Role Variables
|
||||||
------------
|
|
||||||
|
|
||||||
For CentOS: You will need to have the EPEL repository enabled (eg. by installing the `epel-release` package).
|
|
||||||
|
|
||||||
Role Variables
|
|
||||||
--------------
|
|
||||||
|
|
||||||
**Please look at the [defaults/main.yml](defaults/main.yml) for all available variables and their description.**
|
**Please look at the [defaults/main.yml](defaults/main.yml) for all available variables and their description.**
|
||||||
|
|
||||||
**Note: Lines that are commented out via `#` are usually still valid/used variables, but they are not defined by default, so they might enable a feature, when uncommenting/defining them!**
|
**Note: Lines that are commented out via `#` are usually still valid/used variables, but they are not defined by default, so they might enable a feature, when uncommenting/defining them!**
|
||||||
|
|
||||||
Dependencies
|
## Dependencies
|
||||||
------------
|
|
||||||
|
|
||||||
- epel (for CentOS)
|
None
|
||||||
|
|
||||||
License
|
## License
|
||||||
-------
|
|
||||||
|
|
||||||
GPL-3.0-only
|
GPL-3.0-only
|
||||||
|
|
|
@ -27,7 +27,7 @@ docker_apt_architecture_map:
|
||||||
"armv7l": "armhf"
|
"armv7l": "armhf"
|
||||||
|
|
||||||
# Edition can be one of: 'ce' (Community Edition) or 'ee' (Enterprise Edition).
|
# Edition can be one of: 'ce' (Community Edition) or 'ee' (Enterprise Edition).
|
||||||
docker_edition: 'ce'
|
docker_edition: "ce"
|
||||||
|
|
||||||
# The docker package settings
|
# The docker package settings
|
||||||
docker_package: "docker-{{ docker_edition }}"
|
docker_package: "docker-{{ docker_edition }}"
|
||||||
|
@ -55,17 +55,3 @@ docker_apt_repository: >
|
||||||
deb [arch={{ docker_apt_architecture_map[ansible_architecture] }}]
|
deb [arch={{ docker_apt_architecture_map[ansible_architecture] }}]
|
||||||
https://download.docker.com/linux/{{ ansible_distribution | lower }}
|
https://download.docker.com/linux/{{ ansible_distribution | lower }}
|
||||||
{{ ansible_distribution_release }} stable
|
{{ ansible_distribution_release }} stable
|
||||||
|
|
||||||
# Should the python package for docker be installed via pip?
|
|
||||||
docker_python_package_install: true
|
|
||||||
# Where should it be installed? (Note: This will be installed as a standalone without breaking system dependencies)
|
|
||||||
docker_python_package_path: /opt/ansible-dependencies
|
|
||||||
|
|
||||||
# The package states of needed packages to install for the python libraries
|
|
||||||
docker_python_pip_package_state: "present"
|
|
||||||
docker_python_virtualenv_package_state: "present"
|
|
||||||
|
|
||||||
# The pip package name of the docker library
|
|
||||||
docker_pip_package: "docker"
|
|
||||||
docker_pip_package_state: "present"
|
|
||||||
docker_pip_package_version: "{{ omit }}" # This will be omitted by default, so the latest version will be installed.
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
galaxy_info:
|
galaxy_info:
|
||||||
author: saibotk
|
author: saibotk
|
||||||
description: "Installs Docker package from their official repository and installs the docker python package via pip."
|
description: "Installs Docker package from their official repository."
|
||||||
license: GPL-3.0-only
|
license: GPL-3.0-only
|
||||||
min_ansible_version: "2.9"
|
min_ansible_version: "2.9"
|
||||||
standalone: true
|
standalone: true
|
||||||
|
|
|
@ -43,16 +43,3 @@
|
||||||
when:
|
when:
|
||||||
- docker_install_repository
|
- docker_install_repository
|
||||||
become: true
|
become: true
|
||||||
|
|
||||||
- name: Ensure pip & virtualenv are installed.
|
|
||||||
ansible.builtin.package:
|
|
||||||
name: "{{ item.name }}"
|
|
||||||
state: "{{ item.state }}"
|
|
||||||
loop:
|
|
||||||
- name: "python3-pip"
|
|
||||||
state: "{{ docker_python_pip_package_state }}"
|
|
||||||
- name: "python3-virtualenv"
|
|
||||||
state: "{{ docker_python_virtualenv_package_state }}"
|
|
||||||
when:
|
|
||||||
- docker_python_package_install
|
|
||||||
become: true
|
|
||||||
|
|
|
@ -41,20 +41,7 @@
|
||||||
dest: "{{ docker_yum_repository_destination }}"
|
dest: "{{ docker_yum_repository_destination }}"
|
||||||
owner: root
|
owner: root
|
||||||
group: root
|
group: root
|
||||||
mode: '0644'
|
mode: "0644"
|
||||||
when:
|
when:
|
||||||
- docker_install_repository
|
- docker_install_repository
|
||||||
become: true
|
become: true
|
||||||
|
|
||||||
- name: Ensure pip & virtualenv are installed.
|
|
||||||
ansible.builtin.package:
|
|
||||||
name: "{{ item.name }}"
|
|
||||||
state: "{{ item.state }}"
|
|
||||||
loop:
|
|
||||||
- name: "python-pip"
|
|
||||||
state: "{{ docker_python_pip_package_state }}"
|
|
||||||
- name: "python-virtualenv"
|
|
||||||
state: "{{ docker_python_virtualenv_package_state }}"
|
|
||||||
when:
|
|
||||||
- docker_python_package_install
|
|
||||||
become: true
|
|
||||||
|
|
|
@ -49,20 +49,7 @@
|
||||||
dest: "{{ docker_yum_repository_destination }}"
|
dest: "{{ docker_yum_repository_destination }}"
|
||||||
owner: root
|
owner: root
|
||||||
group: root
|
group: root
|
||||||
mode: '0644'
|
mode: "0644"
|
||||||
when:
|
when:
|
||||||
- docker_install_repository
|
- docker_install_repository
|
||||||
become: true
|
become: true
|
||||||
|
|
||||||
- name: Ensure pip & virtualenv are installed.
|
|
||||||
ansible.builtin.package:
|
|
||||||
name: "{{ item.name }}"
|
|
||||||
state: "{{ item.state }}"
|
|
||||||
loop:
|
|
||||||
- name: "python3-pip"
|
|
||||||
state: "{{ docker_python_pip_package_state }}"
|
|
||||||
- name: "python3-virtualenv"
|
|
||||||
state: "{{ docker_python_virtualenv_package_state }}"
|
|
||||||
when:
|
|
||||||
- docker_python_package_install
|
|
||||||
become: true
|
|
||||||
|
|
|
@ -43,14 +43,3 @@
|
||||||
|
|
||||||
- name: Ensure handlers are notified now to avoid firewall conflicts.
|
- name: Ensure handlers are notified now to avoid firewall conflicts.
|
||||||
ansible.builtin.meta: flush_handlers
|
ansible.builtin.meta: flush_handlers
|
||||||
|
|
||||||
- name: Install docker python package.
|
|
||||||
ansible.builtin.pip:
|
|
||||||
name: "{{ docker_pip_package }}"
|
|
||||||
state: "{{ docker_pip_package_state }}"
|
|
||||||
virtualenv: "{{ docker_python_package_path }}"
|
|
||||||
virtualenv_python: "python{{ ansible_python_version | regex_search('\\d+\\.\\d+') }}"
|
|
||||||
version: "{{ docker_pip_package_version }}"
|
|
||||||
become: true
|
|
||||||
changed_when: false
|
|
||||||
when: docker_python_package_install
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue