| 
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 | +    # For some reason, OpenSuSE 15 with Python 2 does ont work on ansible-core 2.13  | 
 | 17 | +    - ansible_version.minor != 13 or ansible_distribution != 'openSUSE Leap' or ansible_python.version.major != 2  | 
 | 18 | +  block:  | 
 | 19 | +    - block:  | 
 | 20 | +      - tempfile:  | 
 | 21 | +          state: directory  | 
 | 22 | +          suffix: supervisorctl-tests  | 
 | 23 | +        register: supervisord_sock_path  | 
 | 24 | + | 
 | 25 | +      - command: 'echo {{ remote_tmp_dir }}'  | 
 | 26 | +        register: echo  | 
 | 27 | +      - set_fact:  | 
 | 28 | +          remote_dir: '{{ echo.stdout }}'  | 
 | 29 | + | 
 | 30 | +      - include_vars: '{{ item }}'  | 
 | 31 | +        with_first_found:  | 
 | 32 | +          - files:  | 
 | 33 | +              - '{{ ansible_distribution }}.yml'  | 
 | 34 | +              - '{{ ansible_os_family }}.yml'  | 
 | 35 | +              - 'defaults.yml'  | 
 | 36 | + | 
 | 37 | +      - include_tasks: '{{ item }}'  | 
 | 38 | +        with_first_found:  | 
 | 39 | +          - files:  | 
 | 40 | +            - 'install_{{ ansible_distribution }}.yml' # CentOS  | 
 | 41 | +            - 'install_{{ ansible_os_family }}.yml'    # RedHat  | 
 | 42 | +            - 'install_{{ ansible_system }}.yml'       # Linux  | 
 | 43 | + | 
 | 44 | +      - include_tasks: test.yml  | 
 | 45 | +        with_items:  | 
 | 46 | +            - { username: '', password: '' }  | 
 | 47 | +            - { username: 'testétest', password: 'passéword' } # non-ASCII credentials  | 
 | 48 | +        loop_control:  | 
 | 49 | +          loop_var: credentials  | 
 | 50 | + | 
 | 51 | +      always:  | 
 | 52 | +      - include_tasks: '{{ item }}'  | 
 | 53 | +        with_first_found:  | 
 | 54 | +          - files:  | 
 | 55 | +            - 'uninstall_{{ ansible_distribution }}.yml' # CentOS  | 
 | 56 | +            - 'uninstall_{{ ansible_os_family }}.yml'    # RedHat  | 
 | 57 | +            - 'uninstall_{{ ansible_system }}.yml'       # Linux  | 
 | 58 | + | 
 | 59 | +      - file:  | 
 | 60 | +          path: '{{ supervisord_sock_path.path }}'  | 
 | 61 | +          state: absent  | 
0 commit comments