Fix SSH service disabling on fedora

This commit is contained in:
2019-05-20 21:29:26 +02:00
parent 354e00aa73
commit 520f7d96a6

View File

@@ -70,13 +70,22 @@
vars:
query: "{{ 'list.*.%s[]'|format(distro) }}"
- set_fact:
disable_services:
- sshd
when: distro == 'fedora'
- set_fact:
disable_services:
- ssh
when: distro != 'fedora'
- name: disable services
service:
state: stopped
enabled: false
name: "{{ item }}"
with_items:
- ssh
with_items: "{{ disable_services }}"
become: true
- name: enable services