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:
|
lineinfile:
|
||||||
path: /etc/ssh/ssh_config.d/certificates.conf
|
path: /etc/ssh/ssh_config.d/certificates.conf
|
||||||
line: "CertificateFile /etc/ssh/{{ item.name }}-cert.pub"
|
line: "CertificateFile /etc/ssh/{{ item.name }}-cert.pub"
|
||||||
|
create: true
|
||||||
when: item.type == "user"
|
when: item.type == "user"
|
||||||
|
|
||||||
- name: Enable user identity
|
- name: Enable user identity
|
||||||
lineinfile:
|
lineinfile:
|
||||||
path: /etc/ssh/ssh_config.d/certificates.conf
|
path: /etc/ssh/ssh_config.d/certificates.conf
|
||||||
line: "IdentityFile /etc/ssh/{{ item.name }}"
|
line: "IdentityFile /etc/ssh/{{ item.name }}"
|
||||||
|
create: true
|
||||||
when: item.type == "user"
|
when: item.type == "user"
|
||||||
|
|
||||||
- name: Enable host certificate
|
- name: Enable host certificate
|
||||||
lineinfile:
|
lineinfile:
|
||||||
path: /etc/ssh/sshd_config.d/certificates.conf
|
path: /etc/ssh/sshd_config.d/certificates.conf
|
||||||
line: "HostCertificate /etc/ssh/{{ item.name }}-cert.pub"
|
line: "HostCertificate /etc/ssh/{{ item.name }}-cert.pub"
|
||||||
|
create: true
|
||||||
when: item.type == "host"
|
when: item.type == "host"
|
||||||
|
|
||||||
- name: Enable host key
|
- name: Enable host key
|
||||||
lineinfile:
|
lineinfile:
|
||||||
path: /etc/ssh/sshd_config.d/certificates.conf
|
path: /etc/ssh/sshd_config.d/certificates.conf
|
||||||
line: "HostKey /etc/ssh/{{ item.name }}"
|
line: "HostKey /etc/ssh/{{ item.name }}"
|
||||||
|
create: true
|
||||||
when: item.type == "host"
|
when: item.type == "host"
|
||||||
|
|
Reference in a new issue