Browse Source

Merge pull request #138 from hudecof/config_backup_option

Config backup option
tags/v0.41.0
N 6 years ago
parent
commit
2979af9bf5
No account linked to committer's email address
2 changed files with 8 additions and 0 deletions
  1. +6
    -0
      openssh/config.sls
  2. +2
    -0
      openssh/defaults.yaml

+ 6
- 0
openssh/config.sls View File

- group: {{ openssh.sshd_config_group }} - group: {{ openssh.sshd_config_group }}
- mode: {{ openssh.sshd_config_mode }} - mode: {{ openssh.sshd_config_mode }}
- check_cmd: {{ openssh.sshd_binary }} -t -f - check_cmd: {{ openssh.sshd_binary }} -t -f
{%- if openssh.sshd_config_backup %}
- backup: minion
{%- endif %}
- watch_in: - watch_in:
- service: {{ openssh.service }} - service: {{ openssh.service }}
{% endif %} {% endif %}
- user: {{ openssh.ssh_config_user }} - user: {{ openssh.ssh_config_user }}
- group: {{ openssh.ssh_config_group }} - group: {{ openssh.ssh_config_group }}
- mode: {{ openssh.ssh_config_mode }} - mode: {{ openssh.ssh_config_mode }}
{%- if openssh.ssh_config_backup %}
- backup: minion
{%- endif %}
{% endif %} {% endif %}


{%- for keyType in ['ecdsa', 'dsa', 'rsa', 'ed25519'] %} {%- for keyType in ['ecdsa', 'dsa', 'rsa', 'ed25519'] %}

+ 2
- 0
openssh/defaults.yaml View File

sshd_config_user: root sshd_config_user: root
sshd_config_group: root sshd_config_group: root
sshd_config_mode: '644' sshd_config_mode: '644'
sshd_config_backup: True
ssh_config: /etc/ssh/ssh_config ssh_config: /etc/ssh/ssh_config
ssh_config_src: salt://openssh/files/ssh_config ssh_config_src: salt://openssh/files/ssh_config
ssh_config_user: root ssh_config_user: root
ssh_config_group: root ssh_config_group: root
ssh_config_mode: '644' ssh_config_mode: '644'
ssh_config_backup: True
banner: /etc/ssh/banner banner: /etc/ssh/banner
banner_src: salt://openssh/files/banner banner_src: salt://openssh/files/banner
ssh_known_hosts: /etc/ssh/ssh_known_hosts ssh_known_hosts: /etc/ssh/ssh_known_hosts

Loading…
Cancel
Save