Skip to content
Snippets Groups Projects
Commit 4a255176 authored by Jan Philipp Timme's avatar Jan Philipp Timme
Browse files

Attempt to only use managed blocks for ssh known_hosts and config files

parent 269b8552
Branches
No related tags found
No related merge requests found
...@@ -5,19 +5,42 @@ deployer: ...@@ -5,19 +5,42 @@ deployer:
group.absent: [] group.absent: []
/root/.ssh/known_hosts: deploy_user_ssh_known_hosts_file_present:
file.managed: file.managed:
- source: salt://deploy/tpl/ssh/known_hosts - name: /root/.ssh/known_hosts
- create: True
- makedirs: True
- user: root - user: root
- group: root - group: root
- mode: 600
deploy_user_add_managed_host_keys_to_known_hosts:
file.blockreplace:
- name: /root/.ssh/known_hosts
- append_if_not_found: True
- show_changes: True
- source: salt://deploy/tpl/ssh/known_hosts
- makedirs: True - makedirs: True
- require:
- file: deploy_user_ssh_known_hosts_file_present
/root/.ssh/config: deploy_users_ssh_config_file_present:
file.managed: file.managed:
- source: salt://deploy/tpl/ssh/config - name: /root/.ssh/config
- create: True
- makedirs: True
- user: root - user: root
- group: root - group: root
- makedirs: True - mode: 600
deploy_users_add_managed_config_to_ssh_config_file:
file.blockreplace:
- name: /root/.ssh/config
- append_if_not_found: True
- show_changes: True
- source: salt://deploy/tpl/ssh/config
- require:
- file: deploy_users_ssh_config_file_present
deploy_key: deploy_key:
file.managed: file.managed:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment