INT 21h

Hi, I am Vladimir Smagin, SysAdmin, DevOps and barely good guy. Telegram Email / GIT / Микроблог / Thingiverse / 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 *

*

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

# 2019-04-14 20:17:08

офигенный проект БК на rasperry pi www.drive2.ru/b/3013396/

# 2019-04-05 19:15:52

habr.com/ru/company/oleg-bunin

# 2019-03-29 19:32:52

Интересное SDK на NodeJS для программирования ESP8266 nodered.org/


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

Fortune cookie: Sex is dirty, but only if you do it right.