17 lines
461 B
YAML
17 lines
461 B
YAML
---
|
|
- name: apache-service | Ensure that the apache service is enabled and started
|
|
ansible.builtin.service:
|
|
name: '{{ apache_service_name }}'
|
|
state: started
|
|
enabled: yes
|
|
when: apache_service_enabled
|
|
tags: apache
|
|
|
|
- name: apache-service | Ensure that the apache service is stopped and disabled
|
|
ansible.builtin.service:
|
|
name: '{{ apache_service_name }}'
|
|
state: stopped
|
|
enabled: no
|
|
when: not apache_service_enabled
|
|
tags: apache
|