From 445261a2973b0a829dcc85b9e3b7a0d8b6cc7170 Mon Sep 17 00:00:00 2001 From: Aleksandr Kostyrev Date: Wed, 12 Aug 2015 18:41:46 +0300 Subject: [PATCH] Do not manage /var/run/sshd on CentOS7 fixes #27 --- defaults/main.yml | 2 ++ tasks/main.yml | 1 + 2 files changed, 3 insertions(+) diff --git a/defaults/main.yml b/defaults/main.yml index a1bade9..017e06f 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -7,6 +7,8 @@ sshd_skip_defaults: false sshd_manage_service: "{{ false if ansible_virtualization_type == 'docker' else true }}" # If the below is false, don't reload the ssh deamon on change sshd_allow_reload: "{{ sshd_manage_service }}" +# If the below is false, don't manage /var/run/sshd directory +sshd_manage_var_run: "{{ false if ansible_os_family == 'RedHat' and ansible_distribution_major_version == '7' }}" # Empty dicts to avoid errors sshd: {} diff --git a/tasks/main.yml b/tasks/main.yml index 87a36d7..3310b1d 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -30,6 +30,7 @@ path: /var/run/sshd state: directory mode: 0755 + when: sshd_manage_var_run tags: - sshd