Skip to content

Commit

Permalink
Merge pull request #21 from kysrpex/shell_bash
Browse files Browse the repository at this point in the history
Use Bash for all shell tasks
  • Loading branch information
kysrpex authored Dec 20, 2023
2 parents 8500315 + 5145ae8 commit 83a31c9
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions roles/os_setup/tasks/remap_user.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
block:
- name: Compute user mapping using script.
ansible.builtin.shell:
executable: /bin/bash
chdir: "{{ role_path }}/files"
cmd: |
set -o pipefail;
Expand All @@ -58,6 +59,7 @@
block:
- name: Compute group mapping using script.
ansible.builtin.shell:
executable: /bin/bash
chdir: "{{ role_path }}/files"
cmd: |
set -o pipefail;
Expand Down Expand Up @@ -93,6 +95,7 @@

- name: Search and replace owner of user's files.
ansible.builtin.shell:
executable: /bin/bash
cmd: "find / -mount -uid {{ item.0 }} -exec chown {{ item.1 }} '{}' +"
loop: "{{ os_setup_user_mapping }}"
changed_when: true
Expand All @@ -119,6 +122,7 @@

- name: Search and replace group of group's files.
ansible.builtin.shell:
executable: /bin/bash
cmd: "find / -mount -gid {{ item.0 }} -exec chgrp {{ item.1 }} '{}' +"
loop: "{{ os_setup_group_mapping }}"
changed_when: true

0 comments on commit 83a31c9

Please sign in to comment.