Ansible Playbook for Hetzner (incl. OPNsense)

kpma1985

New Member
Oct 17, 2022
5
5
3
Hello,

i just created a playbook for provision a Proxmox Server with preinstalled opnsense on Hetzner baremetal.

you dont need a second ip. All traffic will route to opnsense (exposed bridge)

just set the root server into rescue mode and fire it up


i need some feedbacks
:D


https://github.com/kpma1985/ansible_proxmox_hetzner



have fun
 
Very nice! I'd probably use Ansible Vault to store the LUKS passphrase, I prefer not having that lying around in plain text. ;)
 
Sorry @kpma1985 , I have little experience with ansible.

How can I run the pb?

I have edited the inventor/hosts file, there I have put the domain, ip and server number.

then i have edited the ansible_proxmox_hetzner/roles/hetzner_pve/defaults/main.yml

and I have put the credentials of the hetzner api and the storage box

Do I have to edit any more files?

I launch the pb and it tells me that it doesn't reach the host:
Code:
TASK [Check for SSH Port] **********************************************************************************************
fatal: [myhost.atroz.network]: FAILED! => {"changed": false, "elapsed": 10, "msg": "Timeout when waiting for myhost.atroz.network:48622"}
...ignoring

TASK [set ansible_port] ************************************************************************************************
skipping: [myhost.atroz.network]

TASK [ansible.builtin.setup] *******************************************************************************************
fatal: [myhost.atroz.network]: UNREACHABLE! => {"changed": false, "msg": "Failed to connect to the host via ssh: Warning: Permanently added '65.xxxxx' (ED25519) to the list of known hosts.\r\nroot@65.xxx: Permission denied (publickey,password).", "unreachable": true}

I have to put the host in rescue mode? also I have doubts if it does raid1 in the installation of pve.

Thank you very much
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!