|
8 | 8 | # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) |
9 | 9 | # SPDX-License-Identifier: GPL-3.0-or-later |
10 | 10 |
|
11 | | -- block: |
12 | | - - tempfile: |
13 | | - state: directory |
14 | | - suffix: supervisorctl-tests |
15 | | - register: supervisord_sock_path |
16 | | - |
17 | | - - command: 'echo {{ remote_tmp_dir }}' |
18 | | - register: echo |
19 | | - - set_fact: |
20 | | - remote_dir: '{{ echo.stdout }}' |
21 | | - |
22 | | - - include_vars: '{{ item }}' |
23 | | - with_first_found: |
24 | | - - files: |
25 | | - - '{{ ansible_distribution }}.yml' |
26 | | - - '{{ ansible_os_family }}.yml' |
27 | | - - 'defaults.yml' |
28 | | - |
29 | | - - include_tasks: '{{ item }}' |
30 | | - with_first_found: |
31 | | - - files: |
32 | | - - 'install_{{ ansible_distribution }}.yml' # CentOS |
33 | | - - 'install_{{ ansible_os_family }}.yml' # RedHat |
34 | | - - 'install_{{ ansible_system }}.yml' # Linux |
35 | | - |
36 | | - - include_tasks: test.yml |
37 | | - with_items: |
38 | | - - { username: '', password: '' } |
39 | | - - { username: 'testétest', password: 'passéword' } # non-ASCII credentials |
40 | | - loop_control: |
41 | | - loop_var: credentials |
42 | | - |
43 | | - # setuptools is too old on RHEL/CentOS 6 (https://github.com/Supervisor/meld3/issues/23) |
44 | | - when: ansible_os_family != 'RedHat' or ansible_distribution_major_version|int > 6 |
45 | | - |
46 | | - always: |
47 | | - - include_tasks: '{{ item }}' |
48 | | - when: ansible_os_family != 'RedHat' or ansible_distribution_major_version|int > 6 |
49 | | - with_first_found: |
50 | | - - files: |
51 | | - - 'uninstall_{{ ansible_distribution }}.yml' # CentOS |
52 | | - - 'uninstall_{{ ansible_os_family }}.yml' # RedHat |
53 | | - - 'uninstall_{{ ansible_system }}.yml' # Linux |
54 | | - |
55 | | - - file: |
56 | | - path: '{{ supervisord_sock_path.path }}' |
57 | | - state: absent |
| 11 | +- when: |
| 12 | + # setuptools is too old on RHEL/CentOS 6 (https://github.com/Supervisor/meld3/issues/23) |
| 13 | + - ansible_os_family != 'RedHat' or ansible_distribution_major_version|int > 6 |
| 14 | + # For some reason CentOS 7 and OpenSuSE 15 do not work on ansible-core 2.16 |
| 15 | + - ansible_version.minor != 16 or ansible_distribution not in ['CentOS', 'openSUSE Leap'] |
| 16 | + block: |
| 17 | + - block: |
| 18 | + - tempfile: |
| 19 | + state: directory |
| 20 | + suffix: supervisorctl-tests |
| 21 | + register: supervisord_sock_path |
| 22 | + |
| 23 | + - command: 'echo {{ remote_tmp_dir }}' |
| 24 | + register: echo |
| 25 | + - set_fact: |
| 26 | + remote_dir: '{{ echo.stdout }}' |
| 27 | + |
| 28 | + - include_vars: '{{ item }}' |
| 29 | + with_first_found: |
| 30 | + - files: |
| 31 | + - '{{ ansible_distribution }}.yml' |
| 32 | + - '{{ ansible_os_family }}.yml' |
| 33 | + - 'defaults.yml' |
| 34 | + |
| 35 | + - include_tasks: '{{ item }}' |
| 36 | + with_first_found: |
| 37 | + - files: |
| 38 | + - 'install_{{ ansible_distribution }}.yml' # CentOS |
| 39 | + - 'install_{{ ansible_os_family }}.yml' # RedHat |
| 40 | + - 'install_{{ ansible_system }}.yml' # Linux |
| 41 | + |
| 42 | + - include_tasks: test.yml |
| 43 | + with_items: |
| 44 | + - { username: '', password: '' } |
| 45 | + - { username: 'testétest', password: 'passéword' } # non-ASCII credentials |
| 46 | + loop_control: |
| 47 | + loop_var: credentials |
| 48 | + |
| 49 | + always: |
| 50 | + - include_tasks: '{{ item }}' |
| 51 | + with_first_found: |
| 52 | + - files: |
| 53 | + - 'uninstall_{{ ansible_distribution }}.yml' # CentOS |
| 54 | + - 'uninstall_{{ ansible_os_family }}.yml' # RedHat |
| 55 | + - 'uninstall_{{ ansible_system }}.yml' # Linux |
| 56 | + |
| 57 | + - file: |
| 58 | + path: '{{ supervisord_sock_path.path }}' |
| 59 | + state: absent |
0 commit comments