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 classic: true
name: microk8s name: microk8s
- name: Add user permissions - name: Add user to group microk8s
ansible.builtin.shell: "usermod -aG microk8s {{ lookup('env', 'USER') }}" ansible.builtin.user:
name: "{{ lookup('env', 'USER') }}"
groups: microk8s
append: true

View File

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

View File

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