Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NOTASK: ensure ansible-lint rules #24

Merged
merged 1 commit into from
Apr 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion galaxy.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
namespace: damex
name: systemd
version: 0.2.8
version: 1.0.0
readme: README.md
authors:
- Roman Kuzmitskii <[email protected]>
Expand Down
2 changes: 1 addition & 1 deletion roles/systemd_hostnamed/tasks/systemd_service.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
- name: Ensure {{ systemd_hostnamed_service_name }} systemd service
- name: Ensure systemd service {{ systemd_hostnamed_service_name }}
ansible.builtin.include_role:
name: damex.systemd.systemd_service
vars:
Expand Down
2 changes: 1 addition & 1 deletion roles/systemd_journald/tasks/systemd_service.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
- name: Ensure {{ systemd_journald_service_name }} systemd service
- name: Ensure systemd service {{ systemd_journald_service_name }}
ansible.builtin.include_role:
name: damex.systemd.systemd_service
vars:
Expand Down
2 changes: 1 addition & 1 deletion roles/systemd_localed/tasks/systemd_service.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
- name: Ensure {{ systemd_localed_service_name }} systemd service
- name: Ensure systemd service {{ systemd_localed_service_name }}
ansible.builtin.include_role:
name: damex.systemd.systemd_service
vars:
Expand Down
2 changes: 1 addition & 1 deletion roles/systemd_logind/tasks/systemd_service.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
- name: Ensure {{ systemd_logind_service_name }} systemd service
- name: Ensure systemd service {{ systemd_logind_service_name }}
ansible.builtin.include_role:
name: damex.systemd.systemd_service
vars:
Expand Down
2 changes: 1 addition & 1 deletion roles/systemd_networkd/tasks/systemd_service.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
- name: Ensure {{ systemd_networkd_service_name }} systemd service
- name: Ensure systemd service {{ systemd_networkd_service_name }}
ansible.builtin.include_role:
name: damex.systemd.systemd_service
vars:
Expand Down
2 changes: 1 addition & 1 deletion roles/systemd_pstore/tasks/systemd_service.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
- name: Ensure {{ systemd_pstore_service_name }} systemd service
- name: Ensure systemd service {{ systemd_pstore_service_name }}
ansible.builtin.include_role:
name: damex.systemd.systemd_service
vars:
Expand Down
2 changes: 1 addition & 1 deletion roles/systemd_resolved/tasks/systemd_service.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
- name: Ensure {{ systemd_resolved_service_name }} systemd service
- name: Ensure systemd service {{ systemd_resolved_service_name }}
ansible.builtin.include_role:
name: damex.systemd.systemd_service
vars:
Expand Down
4 changes: 2 additions & 2 deletions roles/systemd_service/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
---
- name: Ensure {{ systemd_service_name }} systemd service
- name: Ensure systemd service {{ systemd_service_name }}
tags:
- service
- systemd_service
- systemd
block:
- name: Ensure {{ systemd_service_name }} systemd service
- name: Ensure systemd service {{ systemd_service_name }}
ansible.builtin.import_tasks: systemd_service.yml
10 changes: 5 additions & 5 deletions roles/systemd_service/tasks/systemd_service.yml
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
---
- name: Ensure {{ systemd_service_name }} systemd service
- name: Ensure systemd service {{ systemd_service_name }}
become: true
when:
- systemd_service_name | length
block:
- name: Ensure {{ systemd_service_name }} systemd service is enabled
- name: Ensure systemd service is enabled {{ systemd_service_name }}
ansible.builtin.systemd:
name: "{{ systemd_service_name }}"
enabled: "{{ systemd_service_enabled }}"

- name: Ensure {{ systemd_service_name }} systemd service is started
- name: Ensure systemd service is started {{ systemd_service_name }}
ansible.builtin.systemd:
name: "{{ systemd_service_name }}"
state: "{{ systemd_service_state }}"

- name: Ensure {{ systemd_service_name }} systemd service is reloaded
- name: Ensure systemd service is reloaded {{ systemd_service_name }}
ansible.builtin.systemd:
name: "{{ systemd_service_name }}"
state: reloaded
when:
- systemd_service_reload_on

- name: Ensure {{ systemd_service_name }} systemd service is restarted
- name: Ensure systemd service is restarted {{ systemd_service_name }}
ansible.builtin.systemd:
name: "{{ systemd_service_name }}"
state: restarted
Expand Down
2 changes: 1 addition & 1 deletion roles/systemd_timedated/tasks/systemd_service.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
- name: Ensure {{ systemd_timedated_service_name }} systemd service
- name: Ensure systemd service {{ systemd_timedated_service_name }}
ansible.builtin.include_role:
name: damex.systemd.systemd_service
vars:
Expand Down
2 changes: 1 addition & 1 deletion roles/systemd_timesyncd/tasks/package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
ansible.builtin.include_role:
name: damex.apt.apt_packages
vars:
apt_packages:
apt_packages: # noqa: var-naming[no-role-prefix]
- name: "{{ systemd_timesyncd_package_name }}"
version: "{{ systemd_timesyncd_package_version }}"
state: "{{ systemd_timesyncd_package_state }}"
2 changes: 1 addition & 1 deletion roles/systemd_timesyncd/tasks/systemd_service.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
- name: Ensure {{ systemd_timesyncd_service_name }} systemd service
- name: Ensure systemd service {{ systemd_timesyncd_service_name }}
ansible.builtin.include_role:
name: damex.systemd.systemd_service
vars:
Expand Down
4 changes: 2 additions & 2 deletions roles/systemd_unit/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
---
- name: Ensure {{ systemd_unit_name }} systemd unit
- name: Ensure systemd unit {{ systemd_unit_name }}
tags:
- unit
- systemd_unit
- systemd
block:
- name: Ensure {{ systemd_unit_name }} systemd unit
- name: Ensure systemd unit {{ systemd_unit_name }}
ansible.builtin.import_tasks: systemd_unit.yml
6 changes: 3 additions & 3 deletions roles/systemd_unit/tasks/systemd_unit.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
- name: Ensure {{ systemd_unit_name }} systemd unit
- name: Ensure systemd unit {{ systemd_unit_name }}
ansible.builtin.template:
src: unit.j2
dest: "{{ systemd_unit_file }}"
Expand All @@ -13,7 +13,7 @@
register: systemd_unit_state
become: true

- name: Ensure {{ systemd_unit_name }} systemd unit override directory
- name: Ensure override directory for systemd unit {{ systemd_unit_name }}
ansible.builtin.file:
path: "{{ systemd_unit_override_directory }}"
owner: root
Expand All @@ -26,7 +26,7 @@
- systemd_unit_override_name
become: true

- name: Ensure {{ systemd_unit_name }} systemd unit {{ systemd_unit_override_name }} override
- name: Ensure override for systemd unit {{ systemd_unit_name }}
ansible.builtin.template:
src: unit.j2
dest: "{{ systemd_unit_override_file }}"
Expand Down
Loading