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 }}"
|
||||||
|
become_user: "{{ services_service_user_name }}"
|
||||||
- name: "enable pod-{{ services_service_name }}"
|
|
||||||
ansible.builtin.systemd:
|
ansible.builtin.systemd:
|
||||||
name: "pod-{{ services_service_name }}.service"
|
name: "pod-{{ services_service_name }}.service"
|
||||||
enabled: true
|
enabled: true
|
||||||
scope: "user"
|
|
||||||
|
|
||||||
- name: "start pod-{{ services_service_name }}"
|
|
||||||
ansible.builtin.systemd:
|
|
||||||
name: "pod-{{ services_service_name }}.service"
|
|
||||||
state: "started"
|
state: "started"
|
||||||
scope: "user"
|
scope: "user"
|
||||||
|
|
||||||
become_user: "{{ services_service_user_name }}"
|
|
||||||
|
@ -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 }}"
|
||||||
|
become_user: "{{ services_service_user_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:
|
ansible.builtin.systemd:
|
||||||
name: "pod-{{ services_service_name }}.service"
|
name: "pod-{{ services_service_name }}.service"
|
||||||
enabled: false
|
enabled: false
|
||||||
|
state: "stopped"
|
||||||
scope: "user"
|
scope: "user"
|
||||||
|
|
||||||
become_user: "{{ services_service_user_name }}"
|
|
||||||
|
Loading…
Reference in New Issue
Block a user