diff --git a/setup/generate-keys.sh b/setup/generate-keys.sh new file mode 100755 index 0000000..1e4a499 --- /dev/null +++ b/setup/generate-keys.sh @@ -0,0 +1,7 @@ +cd host_vars +for i in cluster-master01 cluster-master02 cluster-master03 cluster-worker01 cluster-worker02 cluster-worker03 cluster-worker04 cluster-worker05 cluster-worker06 +do + sed -i "s#^wg_secret_key.*#wg_secret_key: $(wg genkey)#" ${i}.yaml + pubkey=$(cat ${i}.yaml | yq .wg_secret_key | sed 's/"//g' | wg pubkey) + sed -i "s#^wg_public_key.*#wg_public_key: ${pubkey}#" ${i}.yaml +done diff --git a/setup/host_vars/cluster-master01.yaml b/setup/host_vars/cluster-master01.yaml new file mode 100644 index 0000000..90e9e52 --- /dev/null +++ b/setup/host_vars/cluster-master01.yaml @@ -0,0 +1,3 @@ +wg_secret_key: uC00qKf4vbfQ1Mn/ndWFX9h3JXKDv5ijIXpjchY/2Gc= +wg_public_key: 4a0DAKvszfFGxDn8Pq9OMdyZbqiELNalF/bOU+lS4ww= +wg_ip: 10.42.23.11 diff --git a/setup/host_vars/cluster-master02.yaml b/setup/host_vars/cluster-master02.yaml new file mode 100644 index 0000000..6b22cb3 --- /dev/null +++ b/setup/host_vars/cluster-master02.yaml @@ -0,0 +1,3 @@ +wg_secret_key: QNqBGoi2Vd/J0Zc+s5G0y+yPFqV9kmqH9pGxb5ojDGE= +wg_public_key: 8wmpoiFyWhHEAP88dR1bBsZP7bQOKAUkNMki5S/9uFc= +wg_ip: 10.42.23.12 diff --git a/setup/host_vars/cluster-master03.yaml b/setup/host_vars/cluster-master03.yaml new file mode 100644 index 0000000..1467ebd --- /dev/null +++ b/setup/host_vars/cluster-master03.yaml @@ -0,0 +1,3 @@ +wg_secret_key: sM+AFAKPGOcXNalGCGoBbCXG9msG5qF66Wz49CVvL2A= +wg_public_key: PhCEr0T1F0ABbFN0ngkIcLQ8OXmQZj+/U3DgAsWXXA8= +wg_ip: 10.42.23.13 diff --git a/setup/host_vars/cluster-worker01.yaml b/setup/host_vars/cluster-worker01.yaml new file mode 100644 index 0000000..017f454 --- /dev/null +++ b/setup/host_vars/cluster-worker01.yaml @@ -0,0 +1,3 @@ +wg_secret_key: MMw5jxqi+4iO3pS1C99+Hck9jabDssQuQ3yC5Rhsgn0= +wg_public_key: GG1AGeGLX2KiCiK+/5wH3JhHDZvKHexfZgVhyX3I8Ag= +wg_ip: 10.42.23.21 diff --git a/setup/host_vars/cluster-worker02.yaml b/setup/host_vars/cluster-worker02.yaml new file mode 100644 index 0000000..7c28239 --- /dev/null +++ b/setup/host_vars/cluster-worker02.yaml @@ -0,0 +1,3 @@ +wg_secret_key: KBMAarDchzYpPIq7J9LRUgll5jeo9wJkgjwC+tJc80Y= +wg_public_key: CiOc+aYn9xCvLLm2rDEE0HrfY9n/kHggwK0LNRDD0Qg= +wg_ip: 10.42.23.22 diff --git a/setup/host_vars/cluster-worker03.yaml b/setup/host_vars/cluster-worker03.yaml new file mode 100644 index 0000000..a10522b --- /dev/null +++ b/setup/host_vars/cluster-worker03.yaml @@ -0,0 +1,3 @@ +wg_secret_key: AE9mrGQ3jJCqdWj6ZAHu9mdULr4HyBV5vE1+Wzjo+FY= +wg_public_key: hJ2CtHqxeB321TJZD+7bzSMNA1GzEteckUb//6KzjhQ= +wg_ip: 10.42.23.23 diff --git a/setup/host_vars/cluster-worker04.yaml b/setup/host_vars/cluster-worker04.yaml new file mode 100644 index 0000000..951603d --- /dev/null +++ b/setup/host_vars/cluster-worker04.yaml @@ -0,0 +1,3 @@ +wg_secret_key: WFMMXY1HPcIUw2I/2Z8x6wyR0r/CnGYeV6Rmyt6WbXo= +wg_public_key: Tc+GCAYefY+MJMwDVqyjLuR0JPvZMFj2xtS9oTAQvSg= +wg_ip: 10.42.23.24 diff --git a/setup/host_vars/cluster-worker05.yaml b/setup/host_vars/cluster-worker05.yaml new file mode 100644 index 0000000..9f34215 --- /dev/null +++ b/setup/host_vars/cluster-worker05.yaml @@ -0,0 +1,3 @@ +wg_secret_key: oEql4vfFXVqdI6HiSDyQsSK19Xs+IzyMrz+7gbRgWWQ= +wg_public_key: xQozpZLyW7Gl+xYsLBvegmEtjhB7vBP2sKBJgfP22D4= +wg_ip: 10.42.23.25 diff --git a/setup/host_vars/cluster-worker06.yaml b/setup/host_vars/cluster-worker06.yaml new file mode 100644 index 0000000..410b2a5 --- /dev/null +++ b/setup/host_vars/cluster-worker06.yaml @@ -0,0 +1,3 @@ +wg_secret_key: WCvlYVbX/ieEU6ZLNJcQEAl9YcHASiLMgrmkU9cUElI= +wg_public_key: iV+fDDW5bw9ANklUKa9Vbqi+fwJCzqebahcT7nE6PCA= +wg_ip: 10.42.23.26