INT 21h

Hi, I am Vladimir Smagin, SysAdmin. Telegram Email GPG / Микроблог

Ansible: trick to install python2 on python3-only hosts

№ 9442 В разделе "Администрирование" от September 28th, 2018,

Most of Ansible plugins requires Python 2 installed but modern Linux OS doesn’t have it. I created separated from other playbook task to install python 2 but temporarily changed interpreter with ansible_python_interpreter: /usr/bin/python3. After this you can start other tasks as usual.

Playbook project.yml:

- name: Checkout python2
  hosts: project
  vars:
    ansible_python_interpreter: /usr/bin/python3
  roles:
    - python2

- name: Configure platform
  hosts: project
  roles:
    - system

Sample code https://git.blindage.org/21h/ansible-library/src/branch/python3_trick

Нет комментариев »

Leave a Reply

Your email address will not be published. Required fields are marked *

*

Микроблог перейти

# 2018-11-26 09:15:41

Обнаружил в kubedb код google analytics UA-62096468-20, слежка включена по умолчанию.

# 2018-11-24 23:30:12

Несложно смог контейнеризовать nginx unit с предзагрузкой конфигурации перед стартом контейнера blindage.org/?p=9575


© Vladimir Smagin, 2005-2018. Копирование материалов без разрешения запрещено. GPG 0x29AE91B1A37721C3
Яндекс.Метрика

Fortune cookie: Q: What is Smoorplay? A: What Smurfs do before they smuck!