fix: replace shell commands by Ansible modules

This commit is contained in:
Christoph Schug 2024-03-03 17:25:42 +01:00
parent b46f18d437
commit d06aab167e
3 changed files with 15 additions and 6 deletions

View File

@ -9,5 +9,8 @@
classic: true
name: microk8s
- name: Add user permissions
ansible.builtin.shell: "usermod -aG microk8s {{ lookup('env', 'USER') }}"
- name: Add user to group microk8s
ansible.builtin.user:
name: "{{ lookup('env', 'USER') }}"
groups: microk8s
append: true

View File

@ -31,5 +31,8 @@
- docker-compose
update_cache: true
- name: Add user permissions
ansible.builtin.shell: "usermod -aG docker vagrant"
- name: Add user vagrant to group docker
ansible.builtin.user:
name: vagrant
groups: docker
append: true

View File

@ -9,5 +9,8 @@
classic: true
name: microk8s
- name: Add user permissions
ansible.builtin.shell: "usermod -aG microk8s vagrant"
- name: Add user vagrant to group microk8s
ansible.builtin.user:
name: vagrant
groups: microk8s
append: true