fix ansible-lint errors
This commit is contained in:
@@ -31,7 +31,7 @@
|
||||
executable: /bin/bash
|
||||
|
||||
roles:
|
||||
- role: genlab.curl_scheduled
|
||||
- role: genlab.common.curl_scheduled
|
||||
services:
|
||||
- label: "localhost-test-zero"
|
||||
url: "http://127.0.0.1:8080"
|
||||
|
||||
@@ -7,75 +7,75 @@
|
||||
# Verify the systemd timers
|
||||
|
||||
- name: "Check the timer status - localhost-test-zero"
|
||||
register: timer_zero
|
||||
register: curl_scheduled_timer_zero
|
||||
ansible.builtin.systemd:
|
||||
name: "curl-localhost-test-zero.timer"
|
||||
|
||||
- name: "Assert that the localhost-test-zero timer is running"
|
||||
ansible.builtin.assert:
|
||||
that:
|
||||
- timer_zero.status.ActiveState == "active"
|
||||
- curl_scheduled_timer_zero.status.ActiveState == "active"
|
||||
success_msg: "Timer is running"
|
||||
fail_msg: "Unexpected timer state: '{{ timer_zero.status.ActiveState }}'"
|
||||
fail_msg: "Unexpected timer state: '{{ curl_scheduled_timer_zero.status.ActiveState }}'"
|
||||
|
||||
- name: "Check the timer status - localhost-test-one"
|
||||
register: timer_one
|
||||
register: curl_scheduled_timer_one
|
||||
ansible.builtin.systemd:
|
||||
name: "curl-localhost-test-one.timer"
|
||||
|
||||
- name: "Assert that the localhost-test-one timer is running"
|
||||
ansible.builtin.assert:
|
||||
that:
|
||||
- timer_one.status.ActiveState == "active"
|
||||
- curl_scheduled_timer_one.status.ActiveState == "active"
|
||||
success_msg: "Timer is running"
|
||||
fail_msg: "Unexpected timer state: '{{ timer_one.status.ActiveState }}'"
|
||||
fail_msg: "Unexpected timer state: '{{ curl_scheduled_timer_one.status.ActiveState }}'"
|
||||
|
||||
- name: "Check the timer status - localhost-test-chained-curl"
|
||||
register: timer_chained_curl
|
||||
register: curl_scheduled_timer_chained_curl
|
||||
ansible.builtin.systemd:
|
||||
name: "curl-localhost-test-chained-curl.timer"
|
||||
|
||||
- name: "Assert that the localhost-test-chained-curl timer is running"
|
||||
ansible.builtin.assert:
|
||||
that:
|
||||
- timer_chained_curl.status.ActiveState == "active"
|
||||
- curl_scheduled_timer_chained_curl.status.ActiveState == "active"
|
||||
success_msg: "Timer is running"
|
||||
fail_msg: "Unexpected timer state: '{{ timer_chained_curl.status.ActiveState }}'"
|
||||
fail_msg: "Unexpected timer state: '{{ curl_scheduled_timer_chained_curl.status.ActiveState }}'"
|
||||
|
||||
## Verify the systemd services
|
||||
|
||||
- name: "Check the service status - zero"
|
||||
register: service_zero
|
||||
register: curl_scheduled_service_zero
|
||||
ansible.builtin.systemd:
|
||||
name: "curl-localhost-test-zero.service"
|
||||
|
||||
- name: "Assert that the localhost-test-zero service exited with a 0/SUCCESS status"
|
||||
ansible.builtin.assert:
|
||||
that:
|
||||
- 'service_zero.status.ExecMainStatus == "0"'
|
||||
- 'curl_scheduled_service_zero.status.ExecMainStatus == "0"'
|
||||
success_msg: "Service has exited with a 0/SUCCESS status"
|
||||
fail_msg: "Unexpected service status code: '{{ service_zero.status.ExecMainStatus }}'"
|
||||
fail_msg: "Unexpected service status code: '{{ curl_scheduled_service_zero.status.ExecMainStatus }}'"
|
||||
|
||||
- name: "Check the service status - one"
|
||||
register: service_one
|
||||
register: curl_scheduled_service_one
|
||||
ansible.builtin.systemd:
|
||||
name: "curl-localhost-test-one.service"
|
||||
|
||||
- name: "Assert that the localhost-test-one service exited with a 0/SUCCESS status"
|
||||
ansible.builtin.assert:
|
||||
that:
|
||||
- 'service_one.status.ExecMainStatus == "0"'
|
||||
- 'curl_scheduled_service_one.status.ExecMainStatus == "0"'
|
||||
success_msg: "Service has exited with a 0/SUCCESS status"
|
||||
fail_msg: "Unexpected service status code: '{{ service_one.status.ExecMainStatus }}'"
|
||||
fail_msg: "Unexpected service status code: '{{ curl_scheduled_service_one.status.ExecMainStatus }}'"
|
||||
|
||||
- name: "Check the service status - localhost-test-chained-curl"
|
||||
register: service_chained_curl
|
||||
register: curl_scheduled_service_chained_curl
|
||||
ansible.builtin.systemd:
|
||||
name: "curl-localhost-test-chained-curl.service"
|
||||
|
||||
- name: "Assert that the localhost-test-chained-curl service exited with a 0/SUCCESS status"
|
||||
ansible.builtin.assert:
|
||||
that:
|
||||
- 'service_chained_curl.status.ExecMainStatus == "0"'
|
||||
- 'curl_scheduled_service_chained_curl.status.ExecMainStatus == "0"'
|
||||
success_msg: "Service has exited with a 0/SUCCESS status"
|
||||
fail_msg: "Unexpected service status code: '{{ service_chained_curl.status.ExecMainStatus }}'"
|
||||
fail_msg: "Unexpected service status code: '{{ curl_scheduled_service_chained_curl.status.ExecMainStatus }}'"
|
||||
|
||||
Reference in New Issue
Block a user