fix: Enable ssh

This commit is contained in:
Lino Silva
2023-03-26 15:51:28 +01:00
parent a43c1593d9
commit 0ad4fd3945
18 changed files with 285 additions and 3 deletions
@@ -0,0 +1,8 @@
---
# Unable to use ansible.builtin.lineinfile, because we need to run this through the proxmox host (because SSH is not enabled duh)
- name: Allow SSH into LXC
ansible.builtin.command: lxc-attach -n 607 -- sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config
- name: Restart SSH Service
ansible.builtin.command: lxc-attach -n 607 service ssh restart
@@ -1,14 +1,14 @@
---
- name: Create directory for docker-compose
ansible.builtin.file:
path: /root/docker/swag/
path: /root/docker/
state: directory
mode: "0755"
- name: Copy docker-compose file
template:
src: "docker-compose.yml"
dest: /root/docker/swag/docker-compose.yml
dest: /root/docker/docker-compose.yml
owner: root
group: root
mode: 0755
@@ -17,4 +17,4 @@
ansible.builtin.shell:
args:
cmd: docker compose up -d
chdir: /root/docker/swag/
chdir: /root/docker/