Skip to content

Commit

Permalink
ci: support ansible-lint and ansible-test 2.16
Browse files Browse the repository at this point in the history
Fix yamllint issue with markdownlint config

The `name` must come first in a task or play

Signed-off-by: Rich Megginson <[email protected]>
  • Loading branch information
richm committed Jan 6, 2024
1 parent 25eb972 commit 6d9f368
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 24 deletions.
1 change: 1 addition & 0 deletions .markdownlint.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
# Default state for all rules
default: true

Expand Down
40 changes: 20 additions & 20 deletions tests/tests_basic.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# SPDX-License-Identifier: MIT
---
- hosts: all
name: Ensure that deploying unit files work correctly
- name: Ensure that deploying unit files work correctly
hosts: all
gather_facts: false
vars:
systemd_unit_file_templates:
Expand All @@ -13,8 +13,8 @@
stat:
path: /etc/systemd/system/foo.service

- hosts: all
name: Ensure that deploying unit file dropins work correctly
- name: Ensure that deploying unit file dropins work correctly
hosts: all
gather_facts: false
vars:
systemd_dropins:
Expand All @@ -36,8 +36,8 @@
stat:
path: /etc/systemd/system/foo.service.d/99-override.conf

- hosts: all
name: Ensure that we can start units using the role
- name: Ensure that we can start units using the role
hosts: all
gather_facts: false
vars:
systemd_started_units:
Expand All @@ -57,8 +57,8 @@
['foo.service']
['sub_state'] == "running"
- hosts: all
name: Ensure that we can restart units using the role
- name: Ensure that we can restart units using the role
hosts: all
gather_facts: false
vars:
systemd_restarted_units:
Expand All @@ -83,8 +83,8 @@
that:
- pid_before_restart.stdout != pid_after_restart.stdout

- hosts: all
name: Ensure that we can reload units
- name: Ensure that we can reload units
hosts: all
gather_facts: false
vars:
systemd_reloaded_units:
Expand All @@ -101,8 +101,8 @@
stat:
path: /tmp/foo-service-reloaded

- hosts: all
name: Ensure that we can enable unit files
- name: Ensure that we can enable unit files
hosts: all
gather_facts: false
vars:
systemd_enabled_units:
Expand All @@ -128,8 +128,8 @@
- unit_file_state_before.stdout == "UnitFileState=disabled"
- unit_file_state_after.stdout == "UnitFileState=enabled"

- hosts: all
name: Ensure that we can disable unit files
- name: Ensure that we can disable unit files
hosts: all
gather_facts: false
vars:
systemd_disabled_units:
Expand All @@ -148,8 +148,8 @@
that:
- unit_file_state_now.stdout == "UnitFileState=disabled"

- hosts: all
name: Ensure that we can mask unit files
- name: Ensure that we can mask unit files
hosts: all
gather_facts: false
vars:
# It is not possible to mask admin units files in /etc/systemd/system.
Expand Down Expand Up @@ -178,8 +178,8 @@
sshd_state_after.stdout == "UnitFileState=masked" or
sshd_state_after.stdout == "UnitFileState=bad"
- hosts: all
name: Ensure that we can unmask unit files
- name: Ensure that we can unmask unit files
hosts: all
gather_facts: false
vars:
systemd_unmasked_units:
Expand All @@ -198,8 +198,8 @@
that:
- sshd_state_now.stdout == "UnitFileState=enabled"

- hosts: all
name: Ensure that we can stop units
- name: Ensure that we can stop units
hosts: all
gather_facts: false
vars:
systemd_stopped_units:
Expand Down
4 changes: 2 additions & 2 deletions tests/tests_default.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# SPDX-License-Identifier: MIT
---
- hosts: all
name: Ensure that the role runs with no arguments
- name: Ensure that the role runs with no arguments
hosts: all
gather_facts: false
roles:
- linux-system-roles.systemd
4 changes: 2 additions & 2 deletions tests/tests_facts.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# SPDX-License-Identifier: MIT
---
- hosts: all
name: Ensure that basic features of role work correctly
- name: Ensure that basic features of role work correctly
hosts: all
roles:
- linux-system-roles.systemd
tasks:
Expand Down

0 comments on commit 6d9f368

Please sign in to comment.