Files
k3s-ansible/roles/ghostfolio/enable-ssh/tasks/main.yml
T
Lino Silva c487d5cec4 Stocks
2024-10-12 20:48:09 +01:00

13 lines
487 B
YAML

---
# Unable to use ansible.builtin.lineinfile, because we need to run this through the proxmox host (because SSH is not enabled duh)
- name: Pause for 10 seconds to wait for SSH server
ansible.builtin.pause:
seconds: 10
- name: Allow SSH into LXC
ansible.builtin.command: lxc-attach -n 640 -- sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config
- name: Restart SSH Service
ansible.builtin.command: lxc-attach -n 640 service ssh restart