mirror of
https://github.com/Crocmagnon/ansible.git
synced 2024-11-25 08:48:03 +01:00
21 lines
647 B
YAML
21 lines
647 B
YAML
---
|
|
- name: Setup ansible python dependencies
|
|
hosts: servers
|
|
gather_facts: false
|
|
tasks:
|
|
- name: Install system deps
|
|
become: true
|
|
ansible.builtin.apt:
|
|
pkg:
|
|
- python3-venv
|
|
- name: Setup venv
|
|
# github3.py required by the goatcounter playbook
|
|
ansible.builtin.shell: |
|
|
if [ -x /tmp/ansible/bin/python ]; then exit 123; fi
|
|
/usr/bin/python3 -m venv /tmp/ansible
|
|
/tmp/ansible/bin/pip install --upgrade 'github3.py >= 1.0.0a3'
|
|
args:
|
|
executable: /bin/bash
|
|
register: venv
|
|
changed_when: venv.rc != 123
|
|
failed_when: venv.rc != 0 and venv.rc != 123
|