Browse Source

add option to skip routing config

master
cinnaboot 5 years ago
parent
commit
7ac910bd3e
  1. 3
      roles/lxd_host/tasks/lxd_host.yml
  2. 1
      roles/lxd_host/tasks/main.yml

3
roles/lxd_host/tasks/lxd_host.yml

@ -21,6 +21,7 @@
apt:
name: [iptables, iptables-persistent]
state: present
when: do_routing
- name: add DNAT rules for containers
tags: routing
@ -36,6 +37,7 @@
to_destination: "{{ hostvars[item]['internal_ip'] }}"
become: yes
with_items: "{{ groups['containers'] }}"
when: do_routing
- name: save DNAT rules on lxd host
tags: routing
@ -44,6 +46,7 @@
table: nat
state: saved
path: /etc/iptables/rules.v4
when: do_routing
# TODO: add other dnat ports in above loop?
#- name: add dokuwiki DNAT routing

1
roles/lxd_host/tasks/main.yml

@ -9,4 +9,5 @@
tmp_pubkey: /tmp/controller_key_rsa.pub
host_iface: enp2s0
host_cidr: '192.168.11.0/24'
do_routing: false

Loading…
Cancel
Save