create files in lineinfile
This commit is contained in:
parent
42917c227a
commit
96bc6e97c0
1 changed files with 4 additions and 0 deletions
|
@ -34,22 +34,26 @@
|
|||
lineinfile:
|
||||
path: /etc/ssh/ssh_config.d/certificates.conf
|
||||
line: "CertificateFile /etc/ssh/{{ item.name }}-cert.pub"
|
||||
create: true
|
||||
when: item.type == "user"
|
||||
|
||||
- name: Enable user identity
|
||||
lineinfile:
|
||||
path: /etc/ssh/ssh_config.d/certificates.conf
|
||||
line: "IdentityFile /etc/ssh/{{ item.name }}"
|
||||
create: true
|
||||
when: item.type == "user"
|
||||
|
||||
- name: Enable host certificate
|
||||
lineinfile:
|
||||
path: /etc/ssh/sshd_config.d/certificates.conf
|
||||
line: "HostCertificate /etc/ssh/{{ item.name }}-cert.pub"
|
||||
create: true
|
||||
when: item.type == "host"
|
||||
|
||||
- name: Enable host key
|
||||
lineinfile:
|
||||
path: /etc/ssh/sshd_config.d/certificates.conf
|
||||
line: "HostKey /etc/ssh/{{ item.name }}"
|
||||
create: true
|
||||
when: item.type == "host"
|
||||
|
|
Reference in a new issue