Merge pull request #138 from hudecof/config_backup_option

Config backup option
This commit is contained in:
N 2018-10-14 22:28:34 +01:00 committed by GitHub
commit 2979af9bf5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 0 deletions

View File

@ -15,6 +15,9 @@ sshd_config:
- group: {{ openssh.sshd_config_group }}
- mode: {{ openssh.sshd_config_mode }}
- check_cmd: {{ openssh.sshd_binary }} -t -f
{%- if openssh.sshd_config_backup %}
- backup: minion
{%- endif %}
- watch_in:
- service: {{ openssh.service }}
{% endif %}
@ -28,6 +31,9 @@ ssh_config:
- user: {{ openssh.ssh_config_user }}
- group: {{ openssh.ssh_config_group }}
- mode: {{ openssh.ssh_config_mode }}
{%- if openssh.ssh_config_backup %}
- backup: minion
{%- endif %}
{% endif %}
{%- for keyType in ['ecdsa', 'dsa', 'rsa', 'ed25519'] %}

View File

@ -6,11 +6,13 @@ openssh:
sshd_config_user: root
sshd_config_group: root
sshd_config_mode: '644'
sshd_config_backup: True
ssh_config: /etc/ssh/ssh_config
ssh_config_src: salt://openssh/files/ssh_config
ssh_config_user: root
ssh_config_group: root
ssh_config_mode: '644'
ssh_config_backup: True
banner: /etc/ssh/banner
banner_src: salt://openssh/files/banner
ssh_known_hosts: /etc/ssh/ssh_known_hosts