fixed ip variables, now using inventory vars
This commit is contained in:
parent
fe04b3fe87
commit
158048f51d
4
Makefile
4
Makefile
@ -16,6 +16,7 @@ DEPLOY_COMMAND = ansible-playbook deploy.yaml $(OPTIONS)
|
||||
CLEAN_COMMAND = ansible-playbook cleanup.yaml $(OPTIONS)
|
||||
HOSTS_COMMAND = ansible-playbook knownhosts.yaml $(OPTIONS)
|
||||
DEBUG_COMMAND = ansible-playbook debug.yaml $(OPTIONS)
|
||||
SHOW_COMMAND = ansible-inventory -i inventory/hosts.hcloud.yaml --list
|
||||
|
||||
ENV = HCLOUD_TOKEN="$(TOKEN)" SNAPSHOT="$(SNAPSHOT)" ANSIBLE_VERBOSITY=$(verbose)
|
||||
|
||||
@ -49,3 +50,6 @@ editvars:
|
||||
|
||||
showvars:
|
||||
ansible-vault decrypt $(VARS) --output -
|
||||
|
||||
showinventory:
|
||||
$(ENV) $(SHOW_COMMAND)
|
||||
|
||||
@ -6,4 +6,3 @@
|
||||
user: root
|
||||
roles:
|
||||
- role: network
|
||||
- role: pubnix
|
||||
|
||||
@ -5,3 +5,5 @@ status:
|
||||
groups:
|
||||
dev:
|
||||
connect_with: "public_ipv6"
|
||||
compose:
|
||||
server_ipv6: ipv6
|
||||
|
||||
@ -1,12 +1,13 @@
|
||||
---
|
||||
- name: determine ipv6 address
|
||||
shell: ifconfig {{ netif.primary }} inet6 | awk '{ if (/2a01/) { sub(/::.$/, "::2", $2); print $2 }}'
|
||||
- name: determine ipv6 jail address
|
||||
shell: echo {{ server_ipv6 }} | sed 's/::1/::2/'
|
||||
register: jailip
|
||||
|
||||
- name: determine ipv6 net
|
||||
shell: ifconfig {{ netif.primary }} inet6 | awk '{ if (/2a01/) { sub(/::.$/, "::", $2); print $2"/64" }}'
|
||||
shell: echo '{{ ipv6_network }}/64'
|
||||
register: jailnet
|
||||
|
||||
- name: determine primary ipv6 address
|
||||
shell: ifconfig {{ netif.primary }} inet6 | awk '{ if (/2a01/) { print $2 }}'
|
||||
shell: echo {{ server_ipv6 }}
|
||||
register: primaryip
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user