From 814fa367d409915851aeb14eb4f232092cb44b8d Mon Sep 17 00:00:00 2001 From: Andrew Eason Date: Fri, 27 Jul 2018 10:08:17 -0400 Subject: [PATCH] expose sshd_config template backup option with sshd_backup --- defaults/main.yml | 2 ++ tasks/main.yml | 1 + 2 files changed, 3 insertions(+) diff --git a/defaults/main.yml b/defaults/main.yml index 8ccb1b9..0238232 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -7,6 +7,8 @@ sshd_skip_defaults: false sshd_manage_service: true # If the below is false, don't reload the ssh daemon on change sshd_allow_reload: true +# If the below is true, create a backup of the config file when the template is copied +sshd_backup: false # Empty dicts to avoid errors sshd: {} diff --git a/tasks/main.yml b/tasks/main.yml index 30c143d..587051e 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -25,6 +25,7 @@ owner: "{{ sshd_config_owner }}" group: "{{ sshd_config_group }}" mode: "{{ sshd_config_mode }}" + backup: "{{ sshd_backup }}" validate: "{{ sshd_binary }} -t -f %s" notify: reload_sshd