made a little progress, but networking still fails
This commit is contained in:
parent
a82f6e61e8
commit
9c2c43730a
11
Makefile
11
Makefile
@ -1,4 +1,4 @@
|
||||
.PHONY: all deploy check clean create
|
||||
.PHONY: all deploy check clean create debug
|
||||
|
||||
TOKEN = $(shell ansible-vault decrypt --vault-password-file \
|
||||
~/.config/ansible/hcloud.secret --output - group_vars/all/vars.yaml | cut -d' ' -f2)
|
||||
@ -10,16 +10,23 @@ CREATE_COMMAND = ansible-playbook create.yaml -i inventory
|
||||
DEPLOY_COMMAND = ansible-playbook deploy.yaml -i inventory
|
||||
CLEAN_COMMAND = ansible-playbook cleanup.yaml -i inventory
|
||||
HOSTS_COMMAND = ansible-playbook knownhosts.yaml -i inventory
|
||||
DEBUG_COMMAND = ansible-playbook debug.yaml -i inventory
|
||||
|
||||
ENV = HCLOUD_TOKEN="$(TOKEN)" SNAPSHOT="$(SNAPSHOT)" ANSIBLE_VERBOSITY=$(verbose)
|
||||
|
||||
debug:
|
||||
$(ENV) $(DEBUG_COMMAND)
|
||||
|
||||
create:
|
||||
$(ENV) $(CREATE_COMMAND)
|
||||
|
||||
hosts:
|
||||
$(ENV) $(HOSTS_COMMAND)
|
||||
|
||||
deploy: create
|
||||
all: create
|
||||
$(ENV) $(DEPLOY_COMMAND)
|
||||
|
||||
deploy:
|
||||
$(ENV) $(DEPLOY_COMMAND)
|
||||
|
||||
clean:
|
||||
|
||||
7
debug.yaml
Normal file
7
debug.yaml
Normal file
@ -0,0 +1,7 @@
|
||||
---
|
||||
- name: DEBUGGING ROLES
|
||||
hosts: running
|
||||
gather_facts: true
|
||||
user: root
|
||||
roles:
|
||||
- role: network
|
||||
@ -20,4 +20,5 @@ ssh_keys:
|
||||
- scip@pixel8
|
||||
|
||||
jails:
|
||||
pubnix: 10.1.1.1
|
||||
pubnix:
|
||||
octet: 2
|
||||
|
||||
@ -1,14 +1,22 @@
|
||||
---
|
||||
- name: Add lo1 interface
|
||||
- name: Add bridge interface
|
||||
community.general.sysrc:
|
||||
name: cloned_interfaces
|
||||
state: value_present
|
||||
value: "lo1"
|
||||
value: "bridge0"
|
||||
|
||||
- name: Name lo1 interface bastille0
|
||||
- name: Setup bridge interface
|
||||
community.general.sysrc:
|
||||
name: ifconfig_lo1_name
|
||||
value: "bastille0"
|
||||
name: ifconfig_bridge0
|
||||
state: value_present
|
||||
value: "up"
|
||||
notify: netif cloneup
|
||||
|
||||
- name: Setup bridge interface ipv6
|
||||
community.general.sysrc:
|
||||
name: ifconfig_bridge0_ipv6
|
||||
state: value_present
|
||||
value: "inet6 auto_linklocal"
|
||||
notify: netif cloneup
|
||||
|
||||
- meta: flush_handlers
|
||||
|
||||
@ -28,8 +28,12 @@
|
||||
extra_zfs_properties:
|
||||
mountpoint: /data/home
|
||||
|
||||
- name: determine ipv6 address
|
||||
shell: ifconfig vtnet0 inet6 | awk '{ if (/2a01/) { sub(/::.$/, "::2", $2); print $2 }}'
|
||||
register: jailip
|
||||
|
||||
- name: create jail
|
||||
shell: "bastille create {{ role_name }} {{ release }} {{ jails[role_name] }}"
|
||||
shell: "bastille create -V {{ role_name }} {{ release }} {{ jailip.stdout }}/64 vtnet0"
|
||||
args:
|
||||
creates: /usr/local/bastille/jails/{{ role_name }}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user