Files
states/linux/SSHPubKeys.sls
2019-02-19 18:51:05 +01:00

29 lines
548 B
Plaintext

{% if grains['kernel'] == 'Linux' %}
Creation of directory /root/.ssh:
file.directory:
- name: /root/.ssh
- mode: '0700'
- user: root
- group: root
- makedirs: True
Creation of file /root/.ssh/authorized_keys:
file.managed:
- name: /root/.ssh/authorized_keys
- mode: '0600'
- user: root
- group: root
/root/.ssh/authorized_keys:
file.append:
- makedirs: True
- text:
{% for KEY in pillar.get('GoodSSHKeys',{}) %}
- {{KEY}}
{% endfor %}
include:
- linux.RemoveBadSSHKeys
{% endif %}