testnet-ops/service-provider-setup/setup-k8s.yml

32 lines
722 B
YAML

- name: Install Stack Orchestrator if it isn't present
import_playbook: ../stack-orchestrator-setup/setup-laconic-so.yml
- name: Setup k8s
hosts: "{{ target_host }}"
vars:
target_host: "localhost"
tasks:
- name: Install Python and pip
apt:
name: "{{ item }}"
state: present
become: true
loop:
- python3
- python3-pip
- name: Install Ansible on remote host
pip:
name: ansible
extra_args: --user
when: target_host != "localhost"
- name: Ensure ~/.local/bin is in PATH in .bashrc
lineinfile:
path: ~/.bashrc
line: 'export PATH="$HOME/.local/bin:$PATH"'
state: present
create: yes