Install python 2 or 3 libraries according to running python version
parent
dc1a01ce37
commit
b293cf2cf9
|
@ -47,7 +47,7 @@ The **patch** part changes is incremented if multiple releases happen the same m
|
|||
### Changed
|
||||
|
||||
* Change version pattern
|
||||
* Use python3 modules for Debian 11 and later
|
||||
* Install python 2 or 3 libraries according to running python version
|
||||
* Remove embedded GPG keys only if legacy keyring is present
|
||||
* apt: remove workaround for Evolix public repositories with Debian 11
|
||||
* apt: use the new security repository for Bullseye
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
owner: root
|
||||
group: root
|
||||
|
||||
- name: Install docker and python-docker
|
||||
- name: Install Docker
|
||||
apt:
|
||||
name:
|
||||
- docker-ce
|
||||
|
@ -48,13 +48,13 @@
|
|||
apt:
|
||||
name: python-docker
|
||||
state: present
|
||||
when: ansible_distribution_major_version is version('10', '<=')
|
||||
when: ansible_python_version is version('3', '<')
|
||||
|
||||
- name: python3-docker is installed
|
||||
apt:
|
||||
name: python3-docker
|
||||
state: present
|
||||
when: ansible_distribution_major_version is version('10', '>=')
|
||||
when: ansible_python_version is version('3', '>=')
|
||||
|
||||
- name: Copy Docker daemon configuration file
|
||||
template:
|
||||
|
|
|
@ -10,13 +10,13 @@
|
|||
apt:
|
||||
name: python-lxc
|
||||
state: present
|
||||
when: ansible_distribution_major_version is version('10', '<=')
|
||||
when: ansible_python_version is version('3', '<')
|
||||
|
||||
- name: python3-lxc is installed (Debian >= 10)
|
||||
apt:
|
||||
name: python3-lxc
|
||||
state: present
|
||||
when: ansible_distribution_major_version is version('10', '>=')
|
||||
when: ansible_python_version is version('3', '>=')
|
||||
|
||||
- name: Install additional packages (Debian >= 10)
|
||||
apt:
|
||||
|
|
|
@ -1,26 +1,24 @@
|
|||
---
|
||||
|
||||
# dependency for mysql_user and mysql_db
|
||||
- name: python modules is installed (Ansible dependency)
|
||||
- name: Python2 dependencies for Ansible are installed
|
||||
apt:
|
||||
name:
|
||||
- python-mysqldb
|
||||
- python-pymysql
|
||||
state: present
|
||||
when: ansible_distribution_major_version is version('10', '<=')
|
||||
tags:
|
||||
- mysql
|
||||
when: ansible_python_version is version('3', '<')
|
||||
|
||||
# dependency for mysql_user and mysql_db
|
||||
- name: python3 modules is installed (Ansible dependency)
|
||||
- name: Python3 dependencies for Ansible are installed
|
||||
apt:
|
||||
name:
|
||||
- python3-mysqldb
|
||||
- python3-pymysql
|
||||
state: present
|
||||
when: ansible_distribution_major_version is version('10', '>=')
|
||||
tags:
|
||||
- mysql
|
||||
when: ansible_python_version is version('3', '>=')
|
||||
|
||||
- name: create a password for mysqladmin
|
||||
command: "apg -n 1 -m 16 -M lcN"
|
||||
|
|
|
@ -1,15 +1,24 @@
|
|||
---
|
||||
|
||||
- name: Python dependencies for Ansible are installed
|
||||
- name: Python2 dependencies for Ansible are installed
|
||||
apt:
|
||||
name:
|
||||
- python-mysqldb
|
||||
- python-pymysql
|
||||
state: present
|
||||
tags:
|
||||
- mysql
|
||||
when: ansible_python_version is version('3', '<')
|
||||
|
||||
- name: Python3 dependencies for Ansible are installed
|
||||
apt:
|
||||
name:
|
||||
- python3-mysqldb
|
||||
- python3-pymysql
|
||||
state: present
|
||||
tags:
|
||||
- mysql
|
||||
when: ansible_python_version is version('3', '>=')
|
||||
|
||||
- name: create a password for mysqladmin
|
||||
command: "apg -n 1 -m 16 -M lcN"
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
|
||||
- name: Python dependencies for Ansible are installed
|
||||
- name: Python2 dependencies for Ansible are installed
|
||||
apt:
|
||||
name:
|
||||
- python-mysqldb
|
||||
|
@ -8,6 +8,17 @@
|
|||
state: present
|
||||
tags:
|
||||
- mysql
|
||||
when: ansible_python_version is version('3', '<')
|
||||
|
||||
- name: Python3 dependencies for Ansible are installed
|
||||
apt:
|
||||
name:
|
||||
- python3-mysqldb
|
||||
- python3-pymysql
|
||||
state: present
|
||||
tags:
|
||||
- mysql
|
||||
when: ansible_python_version is version('3', '>=')
|
||||
|
||||
- name: create a password for mysqladmin
|
||||
command: "apg -n 1 -m 16 -M lcN"
|
||||
|
|
|
@ -13,13 +13,13 @@
|
|||
apt:
|
||||
name: python-psycopg2
|
||||
state: present
|
||||
when: ansible_distribution_major_version is version('10', '<=')
|
||||
when: ansible_python_version is version('3', '<')
|
||||
|
||||
- name: python3-psycopg2 is installed (Ansible dependency)
|
||||
apt:
|
||||
name: python3-psycopg2
|
||||
state: present
|
||||
when: ansible_distribution_major_version is version('10', '>=')
|
||||
when: ansible_python_version is version('3', '>=')
|
||||
|
||||
- name: Is nrpe present ?
|
||||
stat:
|
||||
|
|
|
@ -4,13 +4,13 @@
|
|||
apt:
|
||||
name: python-requests
|
||||
state: present
|
||||
when: ansible_distribution_major_version is version('10', '<=')
|
||||
when: ansible_python_version is version('3', '<')
|
||||
|
||||
- name: python3-requests is installed (check_rabbitmq dependency)
|
||||
apt:
|
||||
name: python3-requests
|
||||
state: present
|
||||
when: ansible_distribution_major_version is version('10', '>=')
|
||||
when: ansible_python_version is version('3', '>=')
|
||||
|
||||
- include_role:
|
||||
name: evolix/remount-usr
|
||||
|
|
|
@ -25,9 +25,9 @@
|
|||
- python-mysqldb
|
||||
- python-pymysql
|
||||
state: present
|
||||
when: ansible_distribution_major_version is version('10', '<=')
|
||||
tags:
|
||||
- redmine
|
||||
when: ansible_python_version is version('3', '<')
|
||||
|
||||
# dependency for mysql_user and mysql_db
|
||||
- name: python3 modules is installed (Ansible dependency)
|
||||
|
@ -36,6 +36,6 @@
|
|||
- python3-mysqldb
|
||||
- python3-pymysql
|
||||
state: present
|
||||
when: ansible_distribution_major_version is version('10', '>=')
|
||||
tags:
|
||||
- redmine
|
||||
- redmine
|
||||
when: ansible_python_version is version('3', '>=')
|
|
@ -26,9 +26,9 @@
|
|||
- python-mysqldb
|
||||
- python-pymysql
|
||||
state: present
|
||||
when: ansible_distribution_major_version is version('10', '<=')
|
||||
tags:
|
||||
- nextcloud
|
||||
when: ansible_python_version is version('3', '<)
|
||||
|
||||
# dependency for mysql_user and mysql_db
|
||||
- name: python3 modules is installed (Ansible dependency)
|
||||
|
@ -37,9 +37,9 @@
|
|||
- python3-mysqldb
|
||||
- python3-pymysql
|
||||
state: present
|
||||
when: ansible_distribution_major_version is version('10', '>=')
|
||||
tags:
|
||||
- nextcloud
|
||||
when: ansible_python_version is version('3', '>=')
|
||||
|
||||
- include: user.yml
|
||||
|
||||
|
|
Loading…
Reference in New Issue