collection of ansible roles
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

32 lines
752 B

- name: Install or update pip
package:
name: python-pip3
state: latest
- name: install ansible python package
ansible.builtin.pip:
name: ansible
- name: Create a directory if it does not exist
ansible.builtin.file:
path: ~/.kube
state: directory
mode: '0700'
owner: "{{ ansible_user }}"
- name: copy kube config to ansible home dir
copy:
src: /etc/rancher/k3s/k3s.yaml
dest: ~/.kube/config
mode: '0600'
owner: "{{ ansible_user }}"
remote_src: yes
become: yes
- name: install necessary ansible collections
community.general.ansible_galaxy_install:
type: collection
name: "{{ collection_name }}"
loop: "{{ k3s_ansible_collections }}"
loop_control:
loop_var: collection_name