ericsysmin.python3

ericsysmin.python3

Ansible-Rolle, die Python3 installiert und das System oder den Benutzer so einrichtet, dass Python verwendet wird.

Anforderungen

  • Ubuntu >= 16.04
  • Debian >= 9
  • RHEL >= 7
  • CentOS >= 7

Rollen-Variablen

Variable Erforderlich Standard Kommentare
python3_install_from Optional package Art der Python3-Installation package oder source
python3_package_name Optional python3 Name des Python-Pakets
python3_executable_name Optional {{ python3_package_name }} Name des Python-Executables
python3_default_system Optional false Setzt /usr/bin/python auf /usr/bin/{{ python3_executable_name }}
python3_default_profile Optional false Setzt 'alias python={{ python3_executable_name}}' in /etc/profile
python3_default_user Optional false Setzt 'alias python={{ python3_executable_name}}' in ~/.bashrc

Installationsvariablen aus Quelle

Variable Erforderlich Standard Kommentare
python3_version Optional 3.6.9 Version des Python-Pakets
python3_src_url Optional Bitte siehe defaults/main.yml Quell-URL des Python-Pakets, verwendet python3_version
python3_install_dir Optional Bitte siehe defaults/main.yml Legt das Verzeichnis fest, in dem die Quelle entpackt wird
python3_debian_build_packages Optional Bitte siehe defaults/main.yml Pakete, die für den Build benötigt werden.

Beispiel-Playbook

Einfach Python3 installieren, keine Änderungen am python-Executable.

- hosts: servers
  roles:
    - role: ericsysmin.python3

Aktuellen Benutzer so einrichten, dass er Python3 verwendet

- hosts: servers
  roles:
    - role: ericsysmin.python3
      python3_default_user: true

Alle Benutzer so einrichten, dass sie Python3 verwenden

- hosts: servers
  roles:
    - role: ericsysmin.python3
      python3_default_profile: true

Python3 aus Quelle installieren

- hosts: servers
  roles:
    - role: ericsysmin.python3
      python3_install_from: source
      python3_version: 3.6.9

System so einrichten, dass es Python3 verwendet VORSICHT GEBOTEN

- hosts: servers
  roles:
    - role: ericsysmin.python3
      python3_default_system: true

Lizenz

MIT

Autor

ericsysmin

Über das Projekt

Ansible module to install and configure python as python3

Installieren
ansible-galaxy install ericsysmin.python3
GitHub Repository
Lizenz
Unknown
Downloads
6.2k
Besitzer
Senior MTS