Skip to content

Commit 1180759

Browse files
committed
Fix idempotence for Ubuntu tests in MySQL role.
1 parent cb3558b commit 1180759

File tree

1 file changed

+8
-10
lines changed

1 file changed

+8
-10
lines changed

tests/test.yml

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,14 @@
22
- hosts: all
33

44
pre_tasks:
5-
# Override initctl on Ubuntu 14.04.
6-
- block:
7-
- name: Remove existing initctl.
8-
file: path=/sbin/initctl state=absent
9-
- name: Copy initctl_faker into place for Ubuntu 14.04.
10-
copy:
11-
src: initctl_faker
12-
dest: /sbin/initctl
13-
mode: 0755
14-
when: ansible_distribution == 'Ubuntu' and ansible_distribution_version == '14.04'
5+
- name: Copy initctl_faker into place for Ubuntu 14.04.
6+
copy:
7+
src: initctl_faker
8+
dest: /sbin/initctl
9+
mode: 0755
10+
force: yes
11+
when: ansible_distribution == 'Ubuntu' and ansible_distribution_version|version_compare(16.04, '<')
12+
changed_when: false
1513

1614
roles:
1715
- role_under_test

0 commit comments

Comments
 (0)