Skip to content

Commit 21b0b6f

Browse files
jokimakiDavidWittman
authored andcommitted
Ensure file permissions are correct (#222)
Fixes permissions when umask is 0027 (#197)
1 parent ef7224c commit 21b0b6f

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

tasks/install.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
when: redis_travis_ci is not defined
1010

1111
- name: compile redis
12-
command: make -j{{ ansible_processor_cores|default(1) + 1 }}{{ ' 32bit' if redis_make_32bit|bool else '' }}
12+
shell: umask 0022 && make -j{{ ansible_processor_cores|default(1) + 1 }}{{ ' 32bit' if redis_make_32bit|bool else '' }}
1313
args:
1414
chdir: /usr/local/src/redis-{{ redis_version }}
1515
creates: /usr/local/src/redis-{{ redis_version }}/src/redis-server
@@ -18,11 +18,13 @@
1818
file:
1919
path: "{{ redis_install_dir }}"
2020
state: directory
21+
mode: 0755
2122

2223
- name: create /etc/redis
2324
file:
2425
path: /etc/redis
2526
state: directory
27+
mode: 0755
2628

2729
- name: check if redis user exists (ignore errors)
2830
command: id {{ redis_user }}
@@ -53,7 +55,7 @@
5355
owner: "{{ redis_user }}"
5456

5557
- name: install redis
56-
command: make PREFIX={{ redis_install_dir }} install
58+
shell: umask 0022 && make PREFIX={{ redis_install_dir }} install
5759
args:
5860
chdir: /usr/local/src/redis-{{ redis_version }}
5961
creates: "{{ redis_install_dir }}/bin/redis-server"

0 commit comments

Comments
 (0)