Skip to content

Commit a64644d

Browse files
committed
Set up alternatives for redis binaries
1 parent 882d728 commit a64644d

File tree

3 files changed

+23
-3
lines changed

3 files changed

+23
-3
lines changed

.kitchen.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ platforms:
1414
- name: ubuntu-14.04
1515
- name: centos-6.7
1616
driver_config:
17-
box: wittman/centos-6.7-ansible
18-
- name: centos-7.2
17+
box: wittman/centos-6.8-ansible
18+
- name: centos-7.3
1919
driver_config:
20-
box: wittman/centos-7.2-ansible
20+
box: wittman/centos-7.3-ansible
2121
- name: ubuntu-16.04
2222

2323
suites:

tasks/install.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,3 +51,15 @@
5151
args:
5252
chdir: /usr/local/src/redis-{{ redis_version }}
5353
creates: "{{ redis_install_dir }}/bin/redis-server"
54+
55+
- name: list redis binaries to add to alternatives
56+
command: ls -1 {{ redis_install_dir }}/bin
57+
register: redis_binaries
58+
changed_when: false
59+
60+
- name: add redis binaries to alternatives
61+
alternatives:
62+
name: "{{ item }}"
63+
path: "{{ redis_install_dir }}/bin/{{ item }}"
64+
link: "/usr/bin/{{ item }}"
65+
with_items: "{{ redis_binaries.stdout_lines }}"

test/integration/default/serverspec/redis_spec.rb

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,12 @@
2626
it { should be_file }
2727
it { should contain '1' }
2828
end
29+
30+
describe file('/usr/bin/redis-server') do
31+
it { should be_symlink }
32+
end
33+
34+
describe file('/usr/bin/redis-cli') do
35+
it { should be_symlink }
36+
end
2937
end

0 commit comments

Comments
 (0)