Skip to content

Commit

Permalink
Merge pull request #58 from AaltoSciComp/main
Browse files Browse the repository at this point in the history
Add a variable to control how large bitshifts to use
  • Loading branch information
rwxd committed May 25, 2023
2 parents d014b47 + 75ab464 commit 74b3697
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions defaults/main.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
---
subid_users: []
ansible_become: true
subuid_bitshift: 16
subgid_bitshift: "{{subuid_bitshift}}"
4 changes: 2 additions & 2 deletions tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
ansible.builtin.lineinfile:
path: "/etc/subuid"
regexp: "{{ user }}"
line: "{{ user }}:{{ getent_passwd[user].1 | int | bitwise_shift_left(16) }}:65536"
line: "{{ user }}:{{ getent_passwd[user].1 | int | bitwise_shift_left(subuid_bitshift) }}:65536"
backup: true
create: true
mode: 0644
Expand All @@ -23,7 +23,7 @@
ansible.builtin.lineinfile:
path: "/etc/subgid"
regexp: "{{ user }}"
line: "{{ user }}:{{ getent_passwd[user].2 | int | bitwise_shift_left(16) }}:65536"
line: "{{ user }}:{{ getent_passwd[user].2 | int | bitwise_shift_left(subgid_bitshift) }}:65536"
backup: true
create: true
mode: 0644
Expand Down

0 comments on commit 74b3697

Please sign in to comment.