1
0
Fork 0
mirror of https://github.com/roles-ansible/ansible_role_packages.git synced 2024-08-16 10:19:51 +02:00

install python and python3 different

This commit is contained in:
L3D 2020-08-29 15:00:05 +02:00
parent 74b4d22449
commit 0210360d9f
Signed by: l3d
GPG key ID: CD08445BFF4313D1
2 changed files with 49 additions and 6 deletions

View file

@ -5,7 +5,24 @@
name: "{{ base__packages }}" name: "{{ base__packages }}"
state: "{{ base__package_state }}" state: "{{ base__package_state }}"
- name: install packages for all non-legacy x86 systems - name: install python3 for all non-legacy systems
become: true
package:
name: "{{ base__python3_packages }}"
state: "{{ base__package_state }}"
when: |
ansible_distribution == 'Ubuntu' and ansible_distribution_version | float >= 16.0 or
ansible_os_family == 'RedHat' and ansible_distribution_version | float >= 7 or
ansible_distribution == 'Debian' and ansible_distribution_version | float >= 7
- name: install python for systems where python3 packages are renamed to python
become: true
package:
name: "{{ base__python_packages }}"
state: "{{ base__package_state }}"
when: ansible_os_family == 'Archlinux'
- name: install packages for all non-legacy systems
become: true become: true
package: package:
name: "{{ base__modern_packages }}" name: "{{ base__modern_packages }}"
@ -25,7 +42,7 @@
ansible_distribution == 'Ubuntu' and ansible_distribution_version | float >= 16.0 or ansible_distribution == 'Ubuntu' and ansible_distribution_version | float >= 16.0 or
ansible_distribution == 'Debian' and ansible_distribution_version | float >= 8 ansible_distribution == 'Debian' and ansible_distribution_version | float >= 8
- name: install packages for all reasonable non-legacy x86 systems - name: install packages for all reasonable non-legacy systems
become: true become: true
package: package:
name: "{{ base__linux_packages }}" name: "{{ base__linux_packages }}"
@ -35,3 +52,14 @@
ansible_distribution == 'Fedora' and ansible_distribution_version | float >= 32 or ansible_distribution == 'Fedora' and ansible_distribution_version | float >= 32 or
ansible_distribution == 'Debian' and ansible_distribution_version | float >= 9 or ansible_distribution == 'Debian' and ansible_distribution_version | float >= 9 or
ansible_os_family == 'Archlinux' ansible_os_family == 'Archlinux'
- name: install os_family specific packages for all non-legacy systems
become: true
package:
name: "{{ ansible_os_family }}"
state: "{{ base__package_state }}"
when: |
ansible_distribution == 'Ubuntu' and ansible_distribution_version | float >= 18.0 or
ansible_os_family == 'RedHat' and ansible_distribution_version | float >= 7 or
ansible_distribution == 'Debian' and ansible_distribution_version | float >= 9 or
ansible_os_family == 'Archlinux'

View file

@ -21,7 +21,6 @@ base__modern_packages:
- sysstat - sysstat
- smartmontools - smartmontools
# debian/ubuntu packages # debian/ubuntu packages
base__debian_packages: base__debian_packages:
- debian-goodies - debian-goodies
@ -36,12 +35,20 @@ base__debian_packages:
- python3-apt - python3-apt
- ethstatus - ethstatus
# modern python packages where python stands for python3
base__python_packages:
- python-pip
- python
# modern python packages
base__python3_packages:
- python3-pip
- python3
# packages for reasonable linux servers (not RHEL/Centos) # packages for reasonable linux servers (not RHEL/Centos)
base__linux_packages: base__linux_packages:
- links - links
- ranger - ranger
- python3-pip
- python3
- htop - htop
- iotop - iotop
- iftop - iftop
@ -51,7 +58,15 @@ base__linux_packages:
- atop - atop
- asciinema - asciinema
- youtube-dl - youtube-dl
# os family_specific packages
Debian:
- mpv - mpv
playbook_version_number: 9002 # should be over ninethousand RedHat: []
Archlinux:
- mpv
playbook_version_number: 9003 # should be over ninethousand
playbook_version_path: 'base-packages_roles-ansible_github.version' playbook_version_path: 'base-packages_roles-ansible_github.version'