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