Skip to content

Commit a5e9318

Browse files
Merge pull request #200 from bschonec/become_root_on_linux
Install tasks should become: true so that the role can be run as a non-root user. Fixes #190
2 parents 1662b29 + 51d03f8 commit a5e9318

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

tasks/install_deps.yml

+9
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
- libicu57
1212
state: present
1313
update_cache: true
14+
become: true
1415
when: (ansible_facts.distribution == "Debian" and ansible_facts.distribution_major_version == "9")
1516

1617
- name: Install dependencies on Debian Buster
@@ -24,6 +25,7 @@
2425
- libicu63
2526
state: present
2627
update_cache: true
28+
become: true
2729
when: (ansible_facts.distribution == "Debian" and ansible_facts.distribution_major_version == "10")
2830

2931
- name: Install dependencies on Debian Bullseye
@@ -37,6 +39,7 @@
3739
- libicu67
3840
state: present
3941
update_cache: true
42+
become: true
4043
when: (ansible_facts.distribution == "Debian" and ansible_facts.distribution_major_version == "11")
4144

4245
- name: Install dependencies on Debian Bookworm
@@ -50,6 +53,7 @@
5053
- libicu72
5154
state: present
5255
update_cache: true
56+
become: true
5357
when: (ansible_facts.distribution == "Debian" and ansible_facts.distribution_major_version == "12")
5458

5559
- name: Install dependencies on Ubuntu Xenial systems
@@ -63,6 +67,7 @@
6367
- libicu55
6468
state: present
6569
update_cache: true
70+
become: true
6671
when: (ansible_facts.distribution == "Ubuntu" and ansible_facts.distribution_major_version == "16")
6772

6873
- name: Install dependencies on Ubuntu Bionic systems
@@ -76,6 +81,7 @@
7681
- libicu60
7782
state: present
7883
update_cache: true
84+
become: true
7985
when: (ansible_facts.distribution == "Ubuntu" and ansible_facts.distribution_major_version == "18")
8086

8187
- name: Install dependencies on Ubuntu Focal systems
@@ -89,6 +95,7 @@
8995
- libicu66
9096
state: present
9197
update_cache: true
98+
become: true
9299
when: (ansible_facts.distribution == "Ubuntu" and ansible_facts.distribution_major_version == "20")
93100

94101
- name: Install dependencies on Ubuntu Jammy systems
@@ -101,6 +108,7 @@
101108
- libicu70
102109
state: present
103110
update_cache: true
111+
become: true
104112
when: (ansible_facts.distribution == "Ubuntu" and ansible_facts.distribution_major_version == "22")
105113

106114
- name: Install dependencies on RHEL/CentOS/Fedora systems
@@ -113,6 +121,7 @@
113121
- libicu
114122
state: present
115123
update_cache: true
124+
become: true
116125
when: (ansible_facts.distribution == "RedHat") or
117126
(ansible_facts.distribution == "CentOS") or
118127
(ansible_facts.distribution == "Fedora") or

tasks/install_runner.yml

+1
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,7 @@
123123
ansible.builtin.command: "./svc.sh start"
124124
args:
125125
chdir: "{{ runner_dir }}"
126+
become: true
126127
no_log: "{{ hide_sensitive_logs | bool }}"
127128
ignore_errors: "{{ ansible_check_mode }}"
128129
changed_when: true

0 commit comments

Comments
 (0)