Combine status with state update for start/stop
This commit is contained in:
parent
ab4cc3e394
commit
a8d1a9e9b2
@ -4,18 +4,10 @@
|
||||
name: "services/include"
|
||||
vars_from: "user"
|
||||
|
||||
- block:
|
||||
|
||||
- name: "enable pod-{{ services_service_name }}"
|
||||
- name: "enable and start pod-{{ services_service_name }}"
|
||||
become_user: "{{ services_service_user_name }}"
|
||||
ansible.builtin.systemd:
|
||||
name: "pod-{{ services_service_name }}.service"
|
||||
enabled: true
|
||||
scope: "user"
|
||||
|
||||
- name: "start pod-{{ services_service_name }}"
|
||||
ansible.builtin.systemd:
|
||||
name: "pod-{{ services_service_name }}.service"
|
||||
state: "started"
|
||||
scope: "user"
|
||||
|
||||
become_user: "{{ services_service_user_name }}"
|
||||
|
@ -4,18 +4,10 @@
|
||||
name: "services/include"
|
||||
vars_from: "user"
|
||||
|
||||
- block:
|
||||
|
||||
- name: "stop pod-{{ services_service_name }}"
|
||||
ansible.builtin.systemd:
|
||||
name: "pod-{{ services_service_name }}.service"
|
||||
state: "stopped"
|
||||
scope: "user"
|
||||
|
||||
- name: "disable pod-{{ services_service_name }}"
|
||||
- name: "disable and stop pod-{{ services_service_name }}"
|
||||
become_user: "{{ services_service_user_name }}"
|
||||
ansible.builtin.systemd:
|
||||
name: "pod-{{ services_service_name }}.service"
|
||||
enabled: false
|
||||
state: "stopped"
|
||||
scope: "user"
|
||||
|
||||
become_user: "{{ services_service_user_name }}"
|
||||
|
Loading…
Reference in New Issue
Block a user