!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
|
||||
- traefik
|
||||
- camo
|
||||
environment:
|
||||
PYTHONPATH: /opt/ansible-dependencies/lib/python{{ env_ansible_deps_python_version | default(2.7) }}/site-packages
|
||||
|
|
|
@ -22,5 +22,3 @@
|
|||
- docker_cleanup
|
||||
- traefik
|
||||
- codimd
|
||||
environment:
|
||||
PYTHONPATH: /opt/ansible-dependencies/lib/python{{ env_ansible_deps_python_version | default(2.7) }}/site-packages
|
||||
|
|
|
@ -21,5 +21,3 @@
|
|||
- docker
|
||||
- docker_cleanup
|
||||
- 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_cleanup
|
||||
- factorio
|
||||
environment:
|
||||
PYTHONPATH: /opt/ansible-dependencies/lib/python{{ env_ansible_deps_python_version | default(2.7) }}/site-packages
|
||||
|
|
|
@ -23,5 +23,3 @@
|
|||
- docker_cleanup
|
||||
- traefik
|
||||
- gitlab
|
||||
environment:
|
||||
PYTHONPATH: /opt/ansible-dependencies/lib/python{{ env_ansible_deps_python_version | default(2.7) }}/site-packages
|
||||
|
|
|
@ -22,8 +22,6 @@
|
|||
- docker
|
||||
- docker_cleanup
|
||||
- gitlab_runner
|
||||
environment:
|
||||
PYTHONPATH: /opt/ansible-dependencies/lib/python{{ env_ansible_deps_python_version | default(2.7) }}/site-packages
|
||||
tasks:
|
||||
- name: Install docker image prune crontab
|
||||
ansible.builtin.cron:
|
||||
|
|
|
@ -23,5 +23,3 @@
|
|||
- docker_cleanup
|
||||
- traefik
|
||||
- keycloak
|
||||
environment:
|
||||
PYTHONPATH: /opt/ansible-dependencies/lib/python{{ env_ansible_deps_python_version | default(2.7) }}/site-packages
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
---
|
||||
|
||||
# Infrastructure
|
||||
# Ansible instructions to deploy the infrastructure
|
||||
# Copyright (C) 2020 Saibotk
|
||||
|
@ -21,5 +20,3 @@
|
|||
roles:
|
||||
- docker
|
||||
- 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
|
||||
roles:
|
||||
- docker
|
||||
environment:
|
||||
PYTHONPATH: /opt/ansible-dependencies/lib/python{{ env_ansible_deps_python_version | default(2.7) }}/site-packages
|
||||
tasks:
|
||||
- name: Install backup crontab
|
||||
ansible.builtin.cron:
|
||||
|
|
|
@ -23,5 +23,3 @@
|
|||
- docker_cleanup
|
||||
- traefik
|
||||
- mastodon
|
||||
environment:
|
||||
PYTHONPATH: /opt/ansible-dependencies/lib/python{{ env_ansible_deps_python_version | default(2.7) }}/site-packages
|
||||
|
|
|
@ -22,5 +22,3 @@
|
|||
- docker_cleanup
|
||||
- traefik
|
||||
- matrix
|
||||
environment:
|
||||
PYTHONPATH: /opt/ansible-dependencies/lib/python{{ env_ansible_deps_python_version | default(2.7) }}/site-packages
|
||||
|
|
|
@ -22,5 +22,3 @@
|
|||
- docker_cleanup
|
||||
- traefik
|
||||
- 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
|
||||
- traefik
|
||||
- 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
|
||||
- traefik
|
||||
- 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
|
||||
- traefik
|
||||
- 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
|
||||
- traefik
|
||||
- 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_cleanup
|
||||
- minecraft
|
||||
environment:
|
||||
PYTHONPATH: /opt/ansible-dependencies/lib/python{{ env_ansible_deps_python_version | default(2.7) }}/site-packages
|
||||
|
|
|
@ -22,5 +22,3 @@
|
|||
- docker_cleanup
|
||||
- traefik
|
||||
- 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
|
||||
- traefik
|
||||
- minio
|
||||
environment:
|
||||
PYTHONPATH: /opt/ansible-dependencies/lib/python{{ env_ansible_deps_python_version | default(2.7) }}/site-packages
|
||||
|
|
|
@ -23,8 +23,6 @@
|
|||
- docker_cleanup
|
||||
- traefik
|
||||
- monitoring
|
||||
environment:
|
||||
PYTHONPATH: /opt/ansible-dependencies/lib/python{{ env_ansible_deps_python_version | default(2.7) }}/site-packages
|
||||
|
||||
- name: Install & configure monitoring clients
|
||||
hosts: all
|
||||
|
@ -33,5 +31,3 @@
|
|||
- docker
|
||||
- docker_cleanup
|
||||
- telegraf
|
||||
environment:
|
||||
PYTHONPATH: /opt/ansible-dependencies/lib/python{{ env_ansible_deps_python_version | default(2.7) }}/site-packages
|
||||
|
|
|
@ -22,5 +22,3 @@
|
|||
- docker_cleanup
|
||||
- traefik
|
||||
- owncast
|
||||
environment:
|
||||
PYTHONPATH: /opt/ansible-dependencies/lib/python{{ env_ansible_deps_python_version | default(2.7) }}/site-packages
|
||||
|
|
|
@ -22,5 +22,3 @@
|
|||
- docker_cleanup
|
||||
- traefik
|
||||
- penpot
|
||||
environment:
|
||||
PYTHONPATH: /opt/ansible-dependencies/lib/python{{ env_ansible_deps_python_version | default(2.7) }}/site-packages
|
||||
|
|
|
@ -24,5 +24,3 @@
|
|||
- docker_cleanup
|
||||
- traefik
|
||||
- static_websites
|
||||
environment:
|
||||
PYTHONPATH: /opt/ansible-dependencies/lib/python{{ env_ansible_deps_python_version | default(2.7) }}/site-packages
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
---
|
||||
|
||||
# Infrastructure
|
||||
# Ansible instructions to deploy the infrastructure
|
||||
# Copyright (C) 2022 Saibotk
|
||||
|
@ -20,5 +19,3 @@
|
|||
hosts: all
|
||||
roles:
|
||||
- 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
|
||||
- traefik
|
||||
- teamspeak
|
||||
environment:
|
||||
PYTHONPATH: /opt/ansible-dependencies/lib/python{{ env_ansible_deps_python_version | default(2.7) }}/site-packages
|
||||
|
|
|
@ -22,5 +22,3 @@
|
|||
- docker_cleanup
|
||||
- traefik
|
||||
- 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
|
||||
------------
|
||||
|
||||
For CentOS: You will need to have the EPEL repository enabled (eg. by installing the `epel-release` package).
|
||||
|
||||
Role Variables
|
||||
--------------
|
||||
## Role Variables
|
||||
|
||||
**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
|
||||
|
|
|
@ -27,7 +27,7 @@ docker_apt_architecture_map:
|
|||
"armv7l": "armhf"
|
||||
|
||||
# Edition can be one of: 'ce' (Community Edition) or 'ee' (Enterprise Edition).
|
||||
docker_edition: 'ce'
|
||||
docker_edition: "ce"
|
||||
|
||||
# The docker package settings
|
||||
docker_package: "docker-{{ docker_edition }}"
|
||||
|
@ -55,17 +55,3 @@ docker_apt_repository: >
|
|||
deb [arch={{ docker_apt_architecture_map[ansible_architecture] }}]
|
||||
https://download.docker.com/linux/{{ ansible_distribution | lower }}
|
||||
{{ 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:
|
||||
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
|
||||
min_ansible_version: "2.9"
|
||||
standalone: true
|
||||
|
|
|
@ -43,16 +43,3 @@
|
|||
when:
|
||||
- docker_install_repository
|
||||
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 }}"
|
||||
owner: root
|
||||
group: root
|
||||
mode: '0644'
|
||||
mode: "0644"
|
||||
when:
|
||||
- docker_install_repository
|
||||
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 }}"
|
||||
owner: root
|
||||
group: root
|
||||
mode: '0644'
|
||||
mode: "0644"
|
||||
when:
|
||||
- docker_install_repository
|
||||
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.
|
||||
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