mirror of
https://github.com/willshersystems/ansible-sshd
synced 2024-11-29 22:20:19 +01:00
41 lines
696 B
Bash
Executable file
41 lines
696 B
Bash
Executable file
#!/bin/sh
|
|
|
|
# Full configuration file
|
|
(
|
|
cat 01_ansible_head.j2
|
|
cat 10_top.j2
|
|
|
|
cat options_match |
|
|
awk '{
|
|
print "{{ render_option(\""$1"\",match[\""$1"\"],true) -}}"
|
|
}'
|
|
|
|
cat 20_middle.j2
|
|
|
|
cat options_body |
|
|
awk '{
|
|
print "{{ body_option(\""$1"\",sshd_"$1") -}}"
|
|
}'
|
|
|
|
cat 30_bottom.j2
|
|
) >../templates/sshd_config.j2
|
|
|
|
# Snippet of configuration file
|
|
(
|
|
cat 10_top.j2 |
|
|
sed -e "s/indent=false/indent=true/"
|
|
|
|
cat options_match |
|
|
awk '{
|
|
print "{{ render_option(\""$1"\",match[\""$1"\"],true) -}}"
|
|
}'
|
|
|
|
cat 20_middle.j2
|
|
|
|
cat options_body |
|
|
awk '{
|
|
print "{{ body_option(\""$1"\",sshd_"$1") -}}"
|
|
}'
|
|
|
|
cat 30_bottom.j2
|
|
) >../templates/sshd_config_snippet.j2
|