From ffeef2cb8eebfab7580178a3fc5a5b21967cc1ee Mon Sep 17 00:00:00 2001 From: chrisjsimpson Date: Sat, 19 Oct 2024 22:42:10 +0100 Subject: [PATCH] #14 template early Template ssh_private_key_server_bootstrap --- src/vpn/playbooks/create-rebuild-vpn-server.yml | 9 +++++++++ src/vpn/playbooks/deploy-vpn-client.yml | 9 --------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/vpn/playbooks/create-rebuild-vpn-server.yml b/src/vpn/playbooks/create-rebuild-vpn-server.yml index daf7b2d..97c244b 100644 --- a/src/vpn/playbooks/create-rebuild-vpn-server.yml +++ b/src/vpn/playbooks/create-rebuild-vpn-server.yml @@ -3,6 +3,15 @@ hosts: localhost tasks: + + - name: Template ssh_private_key_server_bootstrap + ansible.builtin.template: + src: ./templates/ssh/ssh_private_key_server_bootstrap.j2 + dest: "{{ ansible_ssh_private_key_file }}" + delegate_to: 127.0.0.1 + tags: + - 'ssh' + - name: Attempt to destroy vpn-server regardless if exists or not hetzner.hcloud.server: api_token: "{{ hetzner_hcloud_token }}" diff --git a/src/vpn/playbooks/deploy-vpn-client.yml b/src/vpn/playbooks/deploy-vpn-client.yml index 5391507..7a4f98a 100644 --- a/src/vpn/playbooks/deploy-vpn-client.yml +++ b/src/vpn/playbooks/deploy-vpn-client.yml @@ -7,15 +7,6 @@ tasks: - - name: Template ssh_private_key_server_bootstrap - ansible.builtin.template: - src: ./templates/ssh/ssh_private_key_server_bootstrap.j2 - dest: "{{ ansible_ssh_private_key_file }}" - delegate_to: 127.0.0.1 - tags: - - 'ssh' - - - name: Install strongswan and xl2tpd apt: name: ['strongswan', 'xl2tpd']