got it running, added net, pf and jail roles

This commit is contained in:
2024-11-08 20:08:56 +01:00
parent a5ab199dc8
commit 9c4b80cb5b
22 changed files with 229 additions and 16 deletions

7
bak/Makefile Normal file
View File

@@ -0,0 +1,7 @@
.PHONY: all deploy check
deploy:
ansible-playbook -vvv --ask-vault-pass server-role.yaml -i inventory
check:
ansible-playbook -vvv --ask-vault-pass server-role.yaml -i inventory --syntax-check

5
bak/group_vars/all.yaml Normal file
View File

@@ -0,0 +1,5 @@
type: cpx11
image: 191285714
packages:
- cpdup
- bash

2
bak/host_vars/shell.yaml Normal file
View File

@@ -0,0 +1,2 @@
hostname: shell.daemon.de
ansible_user: root

3
bak/inventory/all.yaml Normal file
View File

@@ -0,0 +1,3 @@
shellservers:
hosts:
shell.daemon.de:

View File

@@ -0,0 +1,19 @@
---
# - name: Create server
# hcloud_server:
# api_token: "{{ hcloud_token }}"
# name: "{{ hostname }}"
# server_type: "{{ type }}"
# image: "{{ image }}"
# location: ash
# enable_ipv4: false
# state: present
# register: server
- command: which python
register: result
# - name: Install Packages
# community.general.pkgng:
# state: present
# name: "{{ packages }}"

23
bak/server-role.yaml Normal file
View File

@@ -0,0 +1,23 @@
---
- name: Create BSDNIX Servers
hosts: all
connection: local
gather_facts: False
user: root
vars:
# generated with:
# echo -n $(hcloud config get token --allow-sensitive) \
# | ansible-vault encrypt_string --stdin-name hcloud_token
hcloud_token: !vault |
$ANSIBLE_VAULT;1.1;AES256
64393765623232326566303864653934396432613235626330326335383332623437396163336432
3035386161376333386334653863323933393366636537300a666338373539633566336230353362
66653331663364346137383637666332333565373138646533313339323034353833383832336261
3665656264356165300a636633366166363261663663336664653832646666313936396665356132
37373235623735633266353963666364363461303939343532636131643164333930343434336366
36346235336561386237323931333435343461336239323435356634333439303765313663656231
65313964306535376236613635346363376235363330303962353365383537616139393965646563
37356465653663373362
roles:
- role: server