site: Bootstrap python for any target
Before running the main site playbook or any other tasks, we ensure that python is installed on any host so we can actually connect with ansible.
This commit is contained in:
parent
84d7319465
commit
c5448b17cc
1 changed files with 19 additions and 0 deletions
19
site.yaml
19
site.yaml
|
|
@ -1,4 +1,22 @@
|
|||
---
|
||||
# TODO: Add to bootstrapping role / make less dependent on apt-get & debian (python3)
|
||||
- name: Bootstrap python everywhere
|
||||
hosts: all
|
||||
gather_facts: False
|
||||
become: true
|
||||
tags:
|
||||
- system
|
||||
- bootstrap
|
||||
tasks:
|
||||
- name: check for python
|
||||
ansible.builtin.raw: python3 --version
|
||||
changed_when: false
|
||||
failed_when: false
|
||||
register: pythoncheck
|
||||
- name: install debian python
|
||||
ansible.builtin.raw: apt-get update && apt-get install python3 -y
|
||||
when: pythoncheck.rc == 127
|
||||
|
||||
- name: Prepare incus server host
|
||||
hosts: host_system
|
||||
tasks:
|
||||
|
|
@ -31,6 +49,7 @@
|
|||
- python3-requests # for docker network
|
||||
|
||||
- name: Prepare all docker hosted containers
|
||||
gather_facts: True
|
||||
hosts: instance_system
|
||||
tags:
|
||||
- containers
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue