|
3 | 3 | ansible.builtin.debug:
|
4 | 4 | var: ansible_lsb
|
5 | 5 |
|
| 6 | +- name: "Print OS Information." |
| 7 | + ansible.builtin.debug: |
| 8 | + var: ansible_facts |
| 9 | + |
6 | 10 | - name: "Install dependencies."
|
7 | 11 | ansible.builtin.package:
|
8 | 12 | name: python3-apt
|
|
20 | 24 | url_password: "{{ checkmk_var_download_pass | default(omit) }}"
|
21 | 25 | loop: "{{ checkmk_var_test_sites }}"
|
22 | 26 | when: |
|
23 |
| - ((checkmk_var_download_pass is defined and checkmk_var_download_pass | length) or item.edition == "cre") |
24 |
| - and not 'check-mk-' + __checkmk_server_edition_mapping[item.edition] + '-' +item.version in ansible_facts.packages |
| 27 | + not 'check-mk-' + __checkmk_server_edition_mapping[item.edition] + '-' +item.version in ansible_facts.packages |
25 | 28 |
|
26 | 29 | - name: "Install Checkmk Versions."
|
27 | 30 | ansible.builtin.apt:
|
28 | 31 | deb: /tmp/checkmk-server-{{ item.site }}.deb
|
29 | 32 | state: present
|
30 | 33 | loop: "{{ checkmk_var_test_sites }}"
|
31 | 34 | when: |
|
32 |
| - ((checkmk_var_download_pass is defined and checkmk_var_download_pass | length) or item.edition == "cre") |
33 |
| - and not 'check-mk-' + __checkmk_server_edition_mapping[item.edition] + '-' +item.version in ansible_facts.packages |
| 35 | + not 'check-mk-' + __checkmk_server_edition_mapping[item.edition] + '-' +item.version in ansible_facts.packages |
34 | 36 |
|
35 | 37 | - name: "Create Sites."
|
36 | 38 | ansible.builtin.command: "omd -V {{ item.version }}.{{ item.edition }} create --no-tmpfs --admin-password {{ checkmk_var_automation_secret }} {{ item.site }}"
|
37 | 39 | args:
|
38 | 40 | creates: "/omd/sites/{{ item.site }}"
|
39 | 41 | loop: "{{ checkmk_var_test_sites }}"
|
40 |
| - when: (checkmk_var_download_pass is defined and checkmk_var_download_pass | length) or item.edition == "cre" |
41 | 42 |
|
42 | 43 | - name: "Start Apache2."
|
43 | 44 | ansible.builtin.service:
|
|
49 | 50 | register: __checkmk_var_site_status
|
50 | 51 | changed_when: __checkmk_var_site_status.rc == "0"
|
51 | 52 | loop: "{{ checkmk_var_test_sites }}"
|
52 |
| - when: (checkmk_var_download_pass is defined and checkmk_var_download_pass | length) or item.edition == "cre" |
53 | 53 |
|
54 | 54 | - name: "Wait for site to be ready."
|
55 | 55 | ansible.builtin.pause:
|
56 | 56 | seconds: 5
|
57 | 57 | when: |
|
58 |
| - ((checkmk_var_download_pass is defined and checkmk_var_download_pass | length) or item.item.edition == 'cre') |
59 |
| - and (item.stdout_lines is defined and 'OVERALL 1' in item.stdout_lines) |
| 58 | + item.stdout_lines is defined and 'OVERALL 1' in item.stdout_lines |
60 | 59 | loop: "{{ __checkmk_var_site_status.results }}"
|
0 commit comments