update..
This commit is contained in:
parent
ab2a578955
commit
f662fe0f30
261
group_vars/all/vars_network-setup.yml.sample
Normal file
261
group_vars/all/vars_network-setup.yml.sample
Normal file
@ -0,0 +1,261 @@
|
|||||||
|
---
|
||||||
|
|
||||||
|
# ---
|
||||||
|
# vars used by roles/network_interfaces
|
||||||
|
# ---
|
||||||
|
|
||||||
|
|
||||||
|
# If true, all additional files in /etc/network/interfaces/interfaces.d/ are deleted
|
||||||
|
network_manage_devices: True
|
||||||
|
|
||||||
|
# Should the interfaces be reloaded after config change?
|
||||||
|
network_interface_reload: False
|
||||||
|
|
||||||
|
network_interface_path: /etc/network/interfaces.d
|
||||||
|
network_interface_required_packages:
|
||||||
|
- vlan
|
||||||
|
- bridge-utils
|
||||||
|
- ifmetric
|
||||||
|
- ifupdown2
|
||||||
|
- ifenslave
|
||||||
|
|
||||||
|
|
||||||
|
network_interfaces:
|
||||||
|
|
||||||
|
# Many device configurations are possible (as many as needed)
|
||||||
|
#
|
||||||
|
- device: <device-name>
|
||||||
|
# use only once per device (for the first device entry)
|
||||||
|
headline: br0 - bridge over device eno1
|
||||||
|
|
||||||
|
# auto & allow are only used for the first entry of that devicei-name)
|
||||||
|
#
|
||||||
|
allow: [] # array of allow-[stanzas] eg. allow-hotplug
|
||||||
|
auto: true
|
||||||
|
|
||||||
|
family: <inet|inet6>
|
||||||
|
|
||||||
|
# The statisc Mode
|
||||||
|
# Options
|
||||||
|
# address <dotted quad address[/netmask]>
|
||||||
|
# gateway <dotted quad address>
|
||||||
|
# pointopoint <Address of other end point (dotted quad). Note the spelling of "point-to">
|
||||||
|
# hwaddress <mac-address>
|
||||||
|
# mtu <size>
|
||||||
|
# scope <Address validity scope. Possible values: global, link, host>
|
||||||
|
#
|
||||||
|
# The manual Method
|
||||||
|
# Options
|
||||||
|
# hwaddress <mac-address>
|
||||||
|
# mtu <size>
|
||||||
|
#
|
||||||
|
# The dhcp Method
|
||||||
|
# Options
|
||||||
|
# hwaddress <mac-address>
|
||||||
|
# hostname <Hostname to be requested (pump, dhcpcd, udhcpc)>
|
||||||
|
# metric <metric>
|
||||||
|
# leasehours <Preferred lease time in hours (pump)>
|
||||||
|
# leasetime <Preferred lease time in seconds (dhcpcd)>
|
||||||
|
# vendor <Vendor class identifier (dhcpcd)>
|
||||||
|
# client <Client identifier (dhcpcd), or "no" (dhclient)>
|
||||||
|
#
|
||||||
|
# The bootp Method
|
||||||
|
# Options
|
||||||
|
# bootfile: <file: Tell the server to use 'file' as the bootfile.>
|
||||||
|
# server: <address: Use the IP address 'address' to communicate with the server.>
|
||||||
|
# hwaddr <mac-address: Use addr as the hardware address instead of whatever it really is.>
|
||||||
|
#
|
||||||
|
method: <manual|static|dhcp|bootp|tunnel|ppp|wvdial|ipv4ll|none|loopback)
|
||||||
|
|
||||||
|
hwaddress ether: ac:1f:6b:d1:20:f2
|
||||||
|
description: Bridge Interface IPv4 for LXC
|
||||||
|
address: <ipv4/ipv6-address>
|
||||||
|
# dotted quad or number of bits
|
||||||
|
#
|
||||||
|
# the entry will be: address/netmask
|
||||||
|
netmask:
|
||||||
|
gateway:
|
||||||
|
metric:
|
||||||
|
pointopoint:
|
||||||
|
mtu:
|
||||||
|
scope:
|
||||||
|
|
||||||
|
# additional user by dhcp method
|
||||||
|
#
|
||||||
|
hostname:
|
||||||
|
leasehours:
|
||||||
|
leasetime:
|
||||||
|
vendor:
|
||||||
|
client:
|
||||||
|
|
||||||
|
# additional used by bootp method
|
||||||
|
#
|
||||||
|
bootfile:
|
||||||
|
server:
|
||||||
|
hwaddr:
|
||||||
|
|
||||||
|
|
||||||
|
# optional dns settings nameservers: []
|
||||||
|
# nameservers:
|
||||||
|
# - "194.150.168.168" # dns.as250.net
|
||||||
|
# - "91.239.100.100" # anycast.censurfridns.dk
|
||||||
|
|
||||||
|
# optional additional subnets/ips subnets: []
|
||||||
|
# subnets:
|
||||||
|
# - '192.168.123.0/24'
|
||||||
|
# - '192.168.124.11/32'
|
||||||
|
|
||||||
|
# optional bridge parameters bridge: {}
|
||||||
|
# bridge:
|
||||||
|
# ports:
|
||||||
|
# stp:
|
||||||
|
# fd:
|
||||||
|
# maxwait:
|
||||||
|
# waitport:
|
||||||
|
bridge:
|
||||||
|
ports: <blank-seperated-list-of-devicenames-to-bind> # for mor devices support a blank separated list
|
||||||
|
stp: !!str off
|
||||||
|
fd: 1
|
||||||
|
hello: 2
|
||||||
|
maxage: 12
|
||||||
|
|
||||||
|
# optional bonding parameters bond: {}
|
||||||
|
# bond:
|
||||||
|
# master
|
||||||
|
# primary
|
||||||
|
# slave
|
||||||
|
# mode:
|
||||||
|
# miimon:
|
||||||
|
# lacp-rate:
|
||||||
|
# ad-select-rate:
|
||||||
|
# master:
|
||||||
|
# slaves:
|
||||||
|
bond: {}
|
||||||
|
|
||||||
|
# optional vlan settings | vlan: {}
|
||||||
|
# vlan: {}
|
||||||
|
# raw-device: 'eth0'
|
||||||
|
vlan: {}
|
||||||
|
|
||||||
|
# inline hook scripts
|
||||||
|
pre-up: [] # pre-up script lines
|
||||||
|
up: [] # up script lines
|
||||||
|
post-up: [] # post-up script lines (alias for up)
|
||||||
|
pre-down: [] # pre-down script lines (alias for down)
|
||||||
|
down: [] # down script lines
|
||||||
|
post-down: [] # post-down script lines
|
||||||
|
|
||||||
|
- device: eno2
|
||||||
|
# use only once per device (for the first device entry)
|
||||||
|
headline: eno2 - LAN Interface VLAN definition
|
||||||
|
|
||||||
|
# auto & allow are only used for the first device entry
|
||||||
|
allow: [] # array of allow-[stanzas] eg. allow-hotplug
|
||||||
|
auto: true
|
||||||
|
|
||||||
|
family: inet
|
||||||
|
mode: manual
|
||||||
|
description: LAN Interface only VLAN definition
|
||||||
|
|
||||||
|
# optional dns settings nameservers: []
|
||||||
|
# nameservers:
|
||||||
|
# - "194.150.168.168" # dns.as250.net
|
||||||
|
# - "91.239.100.100" # anycast.censurfridns.dk
|
||||||
|
|
||||||
|
# optional additional subnets/ips subnets: []
|
||||||
|
# subnets:
|
||||||
|
# - '192.168.123.0/24'
|
||||||
|
# - '192.168.124.11/32'
|
||||||
|
|
||||||
|
# optional bridge parameters bridge: {}
|
||||||
|
# bridge:
|
||||||
|
# ports:
|
||||||
|
# stp:
|
||||||
|
# fd:
|
||||||
|
# maxwait:
|
||||||
|
# waitport:
|
||||||
|
bridge: {}
|
||||||
|
|
||||||
|
# optional bonding parameters bond: {}
|
||||||
|
# bond:
|
||||||
|
# mode:
|
||||||
|
# miimon:
|
||||||
|
# master:
|
||||||
|
# slaves:
|
||||||
|
# lacp-rate:
|
||||||
|
bond: {}
|
||||||
|
|
||||||
|
# optional vlan settings | vlan: {}
|
||||||
|
# vlan: {}
|
||||||
|
# raw-device: 'eth0'
|
||||||
|
vlan: {}
|
||||||
|
|
||||||
|
# inline hook scripts
|
||||||
|
pre-up: # pre-up script lines
|
||||||
|
- ip link set $IFACE up
|
||||||
|
- ip link add link eno2 name eno2.11 type vlan id 11
|
||||||
|
up: [] # up script lines
|
||||||
|
post-up: [] # post-up script lines (alias for up)
|
||||||
|
pre-down: # pre-down script lines (alias for down)
|
||||||
|
- ip link set $IFACE down
|
||||||
|
down: [] # down script lines
|
||||||
|
post-down: [] # post-down script lines
|
||||||
|
|
||||||
|
- device: eno2.11
|
||||||
|
# use only once per device (for the first device entry)
|
||||||
|
headline: eno2.11 - LAN Interface IPv4 for LXC host
|
||||||
|
|
||||||
|
# auto & allow are only used for the first device entry
|
||||||
|
allow: [] # array of allow-[stanzas] eg. allow-hotplug
|
||||||
|
auto: true
|
||||||
|
|
||||||
|
family: inet
|
||||||
|
mode: auto
|
||||||
|
description: Bridge Interface IPv4 for LXC
|
||||||
|
address: '10.10.11.4'
|
||||||
|
netmask: '255.255.255.0'
|
||||||
|
gateway: '10.10.11.254'
|
||||||
|
|
||||||
|
# optional dns settings nameservers: []
|
||||||
|
# nameservers:
|
||||||
|
# - "194.150.168.168" # dns.as250.net
|
||||||
|
# - "91.239.100.100" # anycast.censurfridns.dk
|
||||||
|
|
||||||
|
# optional additional subnets/ips subnets: []
|
||||||
|
# subnets:
|
||||||
|
# - '192.168.123.0/24'
|
||||||
|
# - '192.168.124.11/32'
|
||||||
|
|
||||||
|
# optional bridge parameters bridge: {}
|
||||||
|
# bridge:
|
||||||
|
# ports:
|
||||||
|
# stp:
|
||||||
|
# fd:
|
||||||
|
# maxwait:
|
||||||
|
# waitport:
|
||||||
|
|
||||||
|
# optional bonding parameters bond: {}
|
||||||
|
# bond:
|
||||||
|
# master
|
||||||
|
# primary
|
||||||
|
# slave
|
||||||
|
# mode:
|
||||||
|
# miimon:
|
||||||
|
# lacp-rate:
|
||||||
|
# ad-select-rate:
|
||||||
|
# master:
|
||||||
|
# slaves:
|
||||||
|
bond: {}
|
||||||
|
|
||||||
|
# optional vlan settings | vlan: {}
|
||||||
|
# vlan: {}
|
||||||
|
# raw-device: 'eth0'
|
||||||
|
vlan: {}
|
||||||
|
|
||||||
|
# inline hook scripts
|
||||||
|
pre-up: [] # pre-up script lines
|
||||||
|
up: [] # up script lines
|
||||||
|
post-up: [] # post-up script lines (alias for up)
|
||||||
|
pre-down: [] # pre-down script lines (alias for down)
|
||||||
|
down: [] # down script lines
|
||||||
|
post-down: [] # post-down script lines
|
@ -30,7 +30,8 @@ network_interfaces:
|
|||||||
auto: true
|
auto: true
|
||||||
|
|
||||||
family: inet
|
family: inet
|
||||||
mode: manual
|
method: manual
|
||||||
|
hwaddress: ac:1f:6b:d1:20:f2
|
||||||
description: Bridge Interface IPv4 for LXC
|
description: Bridge Interface IPv4 for LXC
|
||||||
#address:
|
#address:
|
||||||
#netmask:
|
#netmask:
|
||||||
@ -58,12 +59,13 @@ network_interfaces:
|
|||||||
bridge:
|
bridge:
|
||||||
ports: eno1 # for mor devices support a blan separated list
|
ports: eno1 # for mor devices support a blan separated list
|
||||||
stp: !!str off
|
stp: !!str off
|
||||||
fd: 5
|
fd: 1
|
||||||
hello: 2
|
hello: 2
|
||||||
|
maxage: 12
|
||||||
|
|
||||||
# optional bonding parameters bond: {}
|
# optional bonding parameters bond: {}
|
||||||
# bond:
|
# bond:
|
||||||
# mode:
|
# method:
|
||||||
# miimon:
|
# miimon:
|
||||||
# master:
|
# master:
|
||||||
# slaves:
|
# slaves:
|
||||||
@ -92,7 +94,7 @@ network_interfaces:
|
|||||||
auto: true
|
auto: true
|
||||||
|
|
||||||
family: inet
|
family: inet
|
||||||
mode: manual
|
method: manual
|
||||||
description: LAN Interface only VLAN definition
|
description: LAN Interface only VLAN definition
|
||||||
|
|
||||||
# optional dns settings nameservers: []
|
# optional dns settings nameservers: []
|
||||||
@ -116,7 +118,7 @@ network_interfaces:
|
|||||||
|
|
||||||
# optional bonding parameters bond: {}
|
# optional bonding parameters bond: {}
|
||||||
# bond:
|
# bond:
|
||||||
# mode:
|
# method:
|
||||||
# miimon:
|
# miimon:
|
||||||
# master:
|
# master:
|
||||||
# slaves:
|
# slaves:
|
||||||
@ -148,12 +150,10 @@ network_interfaces:
|
|||||||
auto: true
|
auto: true
|
||||||
|
|
||||||
family: inet
|
family: inet
|
||||||
mode: auto
|
method: static
|
||||||
description: Bridge Interface IPv4 for LXC
|
description: Bridge Interface IPv4 for LXC
|
||||||
address: '10.10.11.4'
|
address: '10.10.11.4'
|
||||||
netmask: '255.255.255.0'
|
netmask: '255.255.255.0'
|
||||||
network: '10.10.11.0'
|
|
||||||
broadcast: '10.10.11.255'
|
|
||||||
gateway: '10.10.11.254'
|
gateway: '10.10.11.254'
|
||||||
|
|
||||||
# optional dns settings nameservers: []
|
# optional dns settings nameservers: []
|
||||||
@ -176,11 +176,15 @@ network_interfaces:
|
|||||||
|
|
||||||
# optional bonding parameters bond: {}
|
# optional bonding parameters bond: {}
|
||||||
# bond:
|
# bond:
|
||||||
# mode:
|
# master
|
||||||
|
# primary
|
||||||
|
# slave
|
||||||
|
# method:
|
||||||
# miimon:
|
# miimon:
|
||||||
|
# lacp-rate:
|
||||||
|
# ad-select-rate:
|
||||||
# master:
|
# master:
|
||||||
# slaves:
|
# slaves:
|
||||||
# lacp-rate:
|
|
||||||
bond: {}
|
bond: {}
|
||||||
|
|
||||||
# optional vlan settings | vlan: {}
|
# optional vlan settings | vlan: {}
|
||||||
|
@ -17,6 +17,7 @@ network_interface_required_packages:
|
|||||||
- bridge-utils
|
- bridge-utils
|
||||||
- ifmetric
|
- ifmetric
|
||||||
- ifupdown2
|
- ifupdown2
|
||||||
|
- ifenslave
|
||||||
|
|
||||||
|
|
||||||
network_interfaces:
|
network_interfaces:
|
||||||
@ -30,8 +31,8 @@ network_interfaces:
|
|||||||
auto: true
|
auto: true
|
||||||
|
|
||||||
family: inet
|
family: inet
|
||||||
mode: static
|
method: static
|
||||||
hwaddress ether: 90:1b:0e:fc:ef:06
|
hwaddress: 90:1b:0e:fc:ef:06
|
||||||
description: Bridge Interface IPv4 for LXC
|
description: Bridge Interface IPv4 for LXC
|
||||||
address: 46.4.25.231
|
address: 46.4.25.231
|
||||||
netmask: 255.255.255.192
|
netmask: 255.255.255.192
|
||||||
@ -55,7 +56,7 @@ network_interfaces:
|
|||||||
# maxwait:
|
# maxwait:
|
||||||
# waitport:
|
# waitport:
|
||||||
bridge:
|
bridge:
|
||||||
ports: enp0s31f6 # for mor devices support a blan separated list
|
ports: enp0s31f6 # for mor devices support a blank separated list
|
||||||
stp: !!str off
|
stp: !!str off
|
||||||
fd: 5
|
fd: 5
|
||||||
hello: 2
|
hello: 2
|
||||||
@ -63,11 +64,15 @@ network_interfaces:
|
|||||||
|
|
||||||
# optional bonding parameters bond: {}
|
# optional bonding parameters bond: {}
|
||||||
# bond:
|
# bond:
|
||||||
# mode:
|
# master
|
||||||
|
# primary
|
||||||
|
# slave
|
||||||
|
# method:
|
||||||
# miimon:
|
# miimon:
|
||||||
|
# lacp-rate:
|
||||||
|
# ad-select-rate:
|
||||||
# master:
|
# master:
|
||||||
# slaves:
|
# slaves:
|
||||||
# lacp-rate:
|
|
||||||
bond: {}
|
bond: {}
|
||||||
|
|
||||||
# optional vlan settings | vlan: {}
|
# optional vlan settings | vlan: {}
|
||||||
@ -88,7 +93,7 @@ network_interfaces:
|
|||||||
|
|
||||||
- device: br0
|
- device: br0
|
||||||
family: inet6
|
family: inet6
|
||||||
mode: static
|
method: static
|
||||||
description: Bridge Interface IPv6 for LXC
|
description: Bridge Interface IPv6 for LXC
|
||||||
address: 2a01:4f8:221:3b4e::2
|
address: 2a01:4f8:221:3b4e::2
|
||||||
netmask: 64
|
netmask: 64
|
||||||
|
@ -17,6 +17,7 @@ network_interface_required_packages:
|
|||||||
- bridge-utils
|
- bridge-utils
|
||||||
- ifmetric
|
- ifmetric
|
||||||
- ifupdown2
|
- ifupdown2
|
||||||
|
- ifenslave
|
||||||
|
|
||||||
|
|
||||||
network_interfaces:
|
network_interfaces:
|
||||||
@ -30,8 +31,8 @@ network_interfaces:
|
|||||||
auto: true
|
auto: true
|
||||||
|
|
||||||
family: inet
|
family: inet
|
||||||
mode: static
|
method: static
|
||||||
hwaddress ether: 88:d7:f6:7d:e6:ef
|
hwaddress: 88:d7:f6:7d:e6:ef
|
||||||
description: Bridge Interface IPv4 for LXC
|
description: Bridge Interface IPv4 for LXC
|
||||||
address: 159.69.74.150
|
address: 159.69.74.150
|
||||||
netmask: 255.255.255.192
|
netmask: 255.255.255.192
|
||||||
@ -55,7 +56,7 @@ network_interfaces:
|
|||||||
# maxwait:
|
# maxwait:
|
||||||
# waitport:
|
# waitport:
|
||||||
bridge:
|
bridge:
|
||||||
ports: enp6s0 # for mor devices support a blan separated list
|
ports: enp6s0 # for mor devices support a blank separated list
|
||||||
stp: !!str off
|
stp: !!str off
|
||||||
fd: 5
|
fd: 5
|
||||||
hello: 2
|
hello: 2
|
||||||
@ -63,11 +64,15 @@ network_interfaces:
|
|||||||
|
|
||||||
# optional bonding parameters bond: {}
|
# optional bonding parameters bond: {}
|
||||||
# bond:
|
# bond:
|
||||||
# mode:
|
# master
|
||||||
|
# primary
|
||||||
|
# slave
|
||||||
|
# method:
|
||||||
# miimon:
|
# miimon:
|
||||||
|
# lacp-rate:
|
||||||
|
# ad-select-rate:
|
||||||
# master:
|
# master:
|
||||||
# slaves:
|
# slaves:
|
||||||
# lacp-rate:
|
|
||||||
bond: {}
|
bond: {}
|
||||||
|
|
||||||
# optional vlan settings | vlan: {}
|
# optional vlan settings | vlan: {}
|
||||||
@ -88,7 +93,7 @@ network_interfaces:
|
|||||||
|
|
||||||
- device: br0
|
- device: br0
|
||||||
family: inet6
|
family: inet6
|
||||||
mode: static
|
method: static
|
||||||
description: Bridge Interface IPv6 for LXC
|
description: Bridge Interface IPv6 for LXC
|
||||||
address: 2a01:4f8:231:19a7::2
|
address: 2a01:4f8:231:19a7::2
|
||||||
netmask: 64
|
netmask: 64
|
||||||
|
@ -17,6 +17,7 @@ network_interface_required_packages:
|
|||||||
- bridge-utils
|
- bridge-utils
|
||||||
- ifmetric
|
- ifmetric
|
||||||
- ifupdown2
|
- ifupdown2
|
||||||
|
- ifenslave
|
||||||
|
|
||||||
|
|
||||||
network_interfaces:
|
network_interfaces:
|
||||||
@ -30,8 +31,8 @@ network_interfaces:
|
|||||||
auto: true
|
auto: true
|
||||||
|
|
||||||
family: inet
|
family: inet
|
||||||
mode: static
|
method: static
|
||||||
hwaddress ether: 7c:10:c9:9e:bd:51
|
hwaddress: 7c:10:c9:9e:bd:51
|
||||||
description: Bridge Interface IPv4 for LXC
|
description: Bridge Interface IPv4 for LXC
|
||||||
address: 168.119.70.7
|
address: 168.119.70.7
|
||||||
netmask: 255.255.255.192
|
netmask: 255.255.255.192
|
||||||
@ -55,7 +56,7 @@ network_interfaces:
|
|||||||
# maxwait:
|
# maxwait:
|
||||||
# waitport:
|
# waitport:
|
||||||
bridge:
|
bridge:
|
||||||
ports: enp7s0 # for mor devices support a blan separated list
|
ports: enp7s0 # for mor devices support a blank separated list
|
||||||
stp: !!str off
|
stp: !!str off
|
||||||
fd: 1
|
fd: 1
|
||||||
hello: 2
|
hello: 2
|
||||||
@ -63,11 +64,15 @@ network_interfaces:
|
|||||||
|
|
||||||
# optional bonding parameters bond: {}
|
# optional bonding parameters bond: {}
|
||||||
# bond:
|
# bond:
|
||||||
# mode:
|
# master
|
||||||
|
# primary
|
||||||
|
# slave
|
||||||
|
# method:
|
||||||
# miimon:
|
# miimon:
|
||||||
|
# lacp-rate:
|
||||||
|
# ad-select-rate:
|
||||||
# master:
|
# master:
|
||||||
# slaves:
|
# slaves:
|
||||||
# lacp-rate:
|
|
||||||
bond: {}
|
bond: {}
|
||||||
|
|
||||||
# optional vlan settings | vlan: {}
|
# optional vlan settings | vlan: {}
|
||||||
@ -88,7 +93,7 @@ network_interfaces:
|
|||||||
|
|
||||||
- device: br0
|
- device: br0
|
||||||
family: inet6
|
family: inet6
|
||||||
mode: static
|
method: static
|
||||||
description: Bridge Interface IPv6 for LXC
|
description: Bridge Interface IPv6 for LXC
|
||||||
address: 2a01:4f8:242:1822::2
|
address: 2a01:4f8:242:1822::2
|
||||||
netmask: 64
|
netmask: 64
|
||||||
|
@ -30,8 +30,8 @@ network_interfaces:
|
|||||||
auto: true
|
auto: true
|
||||||
|
|
||||||
family: inet
|
family: inet
|
||||||
mode: static
|
method: static
|
||||||
hwaddress ether: 00:d8:61:0e:b9:1c
|
hwaddress: 00:d8:61:0e:b9:1c
|
||||||
description: Bridge Interface IPv4 for LXC
|
description: Bridge Interface IPv4 for LXC
|
||||||
address: 144.76.24.11
|
address: 144.76.24.11
|
||||||
netmask: 255.255.255.224
|
netmask: 255.255.255.224
|
||||||
@ -55,7 +55,7 @@ network_interfaces:
|
|||||||
# maxwait:
|
# maxwait:
|
||||||
# waitport:
|
# waitport:
|
||||||
bridge:
|
bridge:
|
||||||
ports: enp8s0 # for mor devices support a blan separated list
|
ports: enp8s0 # for mor devices support a blank separated list
|
||||||
stp: !!str off
|
stp: !!str off
|
||||||
fd: 5
|
fd: 5
|
||||||
hello: 2
|
hello: 2
|
||||||
@ -63,11 +63,15 @@ network_interfaces:
|
|||||||
|
|
||||||
# optional bonding parameters bond: {}
|
# optional bonding parameters bond: {}
|
||||||
# bond:
|
# bond:
|
||||||
# mode:
|
# master
|
||||||
|
# primary
|
||||||
|
# slave
|
||||||
|
# method:
|
||||||
# miimon:
|
# miimon:
|
||||||
|
# lacp-rate:
|
||||||
|
# ad-select-rate:
|
||||||
# master:
|
# master:
|
||||||
# slaves:
|
# slaves:
|
||||||
# lacp-rate:
|
|
||||||
bond: {}
|
bond: {}
|
||||||
|
|
||||||
# optional vlan settings | vlan: {}
|
# optional vlan settings | vlan: {}
|
||||||
@ -87,7 +91,7 @@ network_interfaces:
|
|||||||
|
|
||||||
- device: br0
|
- device: br0
|
||||||
family: inet6
|
family: inet6
|
||||||
mode: static
|
method: static
|
||||||
description: Bridge Interface IPv6 for LXC
|
description: Bridge Interface IPv6 for LXC
|
||||||
address: 2a01:4f8:191:b::2
|
address: 2a01:4f8:191:b::2
|
||||||
netmask: 64
|
netmask: 64
|
||||||
|
@ -17,6 +17,7 @@ network_interface_required_packages:
|
|||||||
- bridge-utils
|
- bridge-utils
|
||||||
- ifmetric
|
- ifmetric
|
||||||
- ifupdown2
|
- ifupdown2
|
||||||
|
- ifenslave
|
||||||
|
|
||||||
|
|
||||||
network_interfaces:
|
network_interfaces:
|
||||||
@ -30,8 +31,8 @@ network_interfaces:
|
|||||||
auto: true
|
auto: true
|
||||||
|
|
||||||
family: inet
|
family: inet
|
||||||
mode: static
|
method: static
|
||||||
hwaddress ether: d0:50:99:f9:1a:da
|
hwaddress: d0:50:99:f9:1a:da
|
||||||
description: Bridge Interface IPv4 for LXC
|
description: Bridge Interface IPv4 for LXC
|
||||||
address: 148.251.14.157
|
address: 148.251.14.157
|
||||||
netmask: 255.255.255.224
|
netmask: 255.255.255.224
|
||||||
@ -55,7 +56,7 @@ network_interfaces:
|
|||||||
# maxwait:
|
# maxwait:
|
||||||
# waitport:
|
# waitport:
|
||||||
bridge:
|
bridge:
|
||||||
ports: enp41s0 # for mor devices support a blan separated list
|
ports: enp41s0 # for mor devices support a blank separated list
|
||||||
stp: !!str off
|
stp: !!str off
|
||||||
fd: 5
|
fd: 5
|
||||||
hello: 2
|
hello: 2
|
||||||
@ -63,11 +64,15 @@ network_interfaces:
|
|||||||
|
|
||||||
# optional bonding parameters bond: {}
|
# optional bonding parameters bond: {}
|
||||||
# bond:
|
# bond:
|
||||||
# mode:
|
# master
|
||||||
|
# primary
|
||||||
|
# slave
|
||||||
|
# method:
|
||||||
# miimon:
|
# miimon:
|
||||||
|
# lacp-rate:
|
||||||
|
# ad-select-rate:
|
||||||
# master:
|
# master:
|
||||||
# slaves:
|
# slaves:
|
||||||
# lacp-rate:
|
|
||||||
bond: {}
|
bond: {}
|
||||||
|
|
||||||
# optional vlan settings | vlan: {}
|
# optional vlan settings | vlan: {}
|
||||||
@ -88,7 +93,7 @@ network_interfaces:
|
|||||||
|
|
||||||
- device: br0
|
- device: br0
|
||||||
family: inet6
|
family: inet6
|
||||||
mode: static
|
method: static
|
||||||
description: Bridge Interface IPv6 for LXC
|
description: Bridge Interface IPv6 for LXC
|
||||||
address: 2a01:4f8:201:7389::2
|
address: 2a01:4f8:201:7389::2
|
||||||
netmask: 64
|
netmask: 64
|
||||||
|
@ -17,6 +17,7 @@ network_interface_required_packages:
|
|||||||
- bridge-utils
|
- bridge-utils
|
||||||
- ifmetric
|
- ifmetric
|
||||||
- ifupdown2
|
- ifupdown2
|
||||||
|
- ifenslave
|
||||||
|
|
||||||
|
|
||||||
network_interfaces:
|
network_interfaces:
|
||||||
@ -30,8 +31,8 @@ network_interfaces:
|
|||||||
auto: true
|
auto: true
|
||||||
|
|
||||||
family: inet
|
family: inet
|
||||||
mode: static
|
method: static
|
||||||
hwaddress ether: a8:a1:59:0f:29:d9
|
hwaddress: a8:a1:59:0f:29:d9
|
||||||
description: Bridge Interface IPv4 for LXC
|
description: Bridge Interface IPv4 for LXC
|
||||||
address: 95.217.204.218
|
address: 95.217.204.218
|
||||||
netmask: 255.255.255.192
|
netmask: 255.255.255.192
|
||||||
@ -55,7 +56,7 @@ network_interfaces:
|
|||||||
# maxwait:
|
# maxwait:
|
||||||
# waitport:
|
# waitport:
|
||||||
bridge:
|
bridge:
|
||||||
ports: enp35s0 # for mor devices support a blan separated list
|
ports: enp35s0 # for mor devices support a blank separated list
|
||||||
stp: !!str off
|
stp: !!str off
|
||||||
fd: 5
|
fd: 5
|
||||||
hello: 2
|
hello: 2
|
||||||
@ -63,11 +64,15 @@ network_interfaces:
|
|||||||
|
|
||||||
# optional bonding parameters bond: {}
|
# optional bonding parameters bond: {}
|
||||||
# bond:
|
# bond:
|
||||||
# mode:
|
# master
|
||||||
|
# primary
|
||||||
|
# slave
|
||||||
|
# method:
|
||||||
# miimon:
|
# miimon:
|
||||||
|
# lacp-rate:
|
||||||
|
# ad-select-rate:
|
||||||
# master:
|
# master:
|
||||||
# slaves:
|
# slaves:
|
||||||
# lacp-rate:
|
|
||||||
bond: {}
|
bond: {}
|
||||||
|
|
||||||
# optional vlan settings | vlan: {}
|
# optional vlan settings | vlan: {}
|
||||||
@ -88,7 +93,7 @@ network_interfaces:
|
|||||||
|
|
||||||
- device: br0
|
- device: br0
|
||||||
family: inet6
|
family: inet6
|
||||||
mode: static
|
method: static
|
||||||
description: Bridge Interface IPv6 for LXC
|
description: Bridge Interface IPv6 for LXC
|
||||||
address: 2a01:4f9:4a:47e5::2
|
address: 2a01:4f9:4a:47e5::2
|
||||||
netmask: 64
|
netmask: 64
|
||||||
|
@ -17,6 +17,7 @@ network_interface_required_packages:
|
|||||||
- bridge-utils
|
- bridge-utils
|
||||||
- ifmetric
|
- ifmetric
|
||||||
- ifupdown2
|
- ifupdown2
|
||||||
|
- ifenslave
|
||||||
|
|
||||||
|
|
||||||
network_interfaces:
|
network_interfaces:
|
||||||
@ -30,8 +31,8 @@ network_interfaces:
|
|||||||
auto: true
|
auto: true
|
||||||
|
|
||||||
family: inet
|
family: inet
|
||||||
mode: static
|
method: static
|
||||||
hwaddress ether: a8:a1:59:82:34:70
|
hwaddress: a8:a1:59:82:34:70
|
||||||
description: Bridge Interface IPv4 for LXC
|
description: Bridge Interface IPv4 for LXC
|
||||||
address: 162.55.82.89
|
address: 162.55.82.89
|
||||||
netmask: 255.255.255.192
|
netmask: 255.255.255.192
|
||||||
@ -55,7 +56,7 @@ network_interfaces:
|
|||||||
# maxwait:
|
# maxwait:
|
||||||
# waitport:
|
# waitport:
|
||||||
bridge:
|
bridge:
|
||||||
ports: enp41s0 # for mor devices support a blan separated list
|
ports: enp41s0 # for mor devices support a blank separated list
|
||||||
stp: !!str off
|
stp: !!str off
|
||||||
fd: 5
|
fd: 5
|
||||||
hello: 2
|
hello: 2
|
||||||
@ -63,11 +64,15 @@ network_interfaces:
|
|||||||
|
|
||||||
# optional bonding parameters bond: {}
|
# optional bonding parameters bond: {}
|
||||||
# bond:
|
# bond:
|
||||||
# mode:
|
# master
|
||||||
|
# primary
|
||||||
|
# slave
|
||||||
|
# method:
|
||||||
# miimon:
|
# miimon:
|
||||||
|
# lacp-rate:
|
||||||
|
# ad-select-rate:
|
||||||
# master:
|
# master:
|
||||||
# slaves:
|
# slaves:
|
||||||
# lacp-rate:
|
|
||||||
bond: {}
|
bond: {}
|
||||||
|
|
||||||
# optional vlan settings | vlan: {}
|
# optional vlan settings | vlan: {}
|
||||||
@ -88,7 +93,7 @@ network_interfaces:
|
|||||||
|
|
||||||
- device: br0
|
- device: br0
|
||||||
family: inet6
|
family: inet6
|
||||||
mode: static
|
method: static
|
||||||
description: Bridge Interface IPv6 for LXC
|
description: Bridge Interface IPv6 for LXC
|
||||||
address: '2a01:4f8:271:1266::2'
|
address: '2a01:4f8:271:1266::2'
|
||||||
netmask: 64
|
netmask: 64
|
||||||
|
24
hosts
24
hosts
@ -17,6 +17,7 @@ dns1.warenform.de
|
|||||||
|
|
||||||
|
|
||||||
[extra_hosts]
|
[extra_hosts]
|
||||||
|
backup.oopen.de
|
||||||
|
|
||||||
gitea.so36.net
|
gitea.so36.net
|
||||||
|
|
||||||
@ -52,6 +53,11 @@ ga-st-gw-ersatz.ga.netz
|
|||||||
ga-st-gw.oopen.de
|
ga-st-gw.oopen.de
|
||||||
ga-al-gw.ga.netz
|
ga-al-gw.ga.netz
|
||||||
ga-nh-gw.ga.netz
|
ga-nh-gw.ga.netz
|
||||||
|
ga-st-lxc1.ga.netz
|
||||||
|
ga-st-mail.ga.netz
|
||||||
|
ga-st-kvm1.ga.netz
|
||||||
|
ga-al-kvm2.ga.netz
|
||||||
|
ga-al-kvm3.ga.netz
|
||||||
|
|
||||||
server16.warenform.de
|
server16.warenform.de
|
||||||
helden.warenform.de
|
helden.warenform.de
|
||||||
@ -395,6 +401,9 @@ gw-ebs.oopen.de
|
|||||||
ga-st-lxc1.ga.netz
|
ga-st-lxc1.ga.netz
|
||||||
ga-st-mail.ga.netz
|
ga-st-mail.ga.netz
|
||||||
ga-al-ws1.ga.netz
|
ga-al-ws1.ga.netz
|
||||||
|
ga-st-kvm1.ga.netz
|
||||||
|
ga-al-kvm2.ga.netz
|
||||||
|
ga-al-kvm3.ga.netz
|
||||||
|
|
||||||
|
|
||||||
# ---
|
# ---
|
||||||
@ -652,9 +661,6 @@ oolm-web.oopen.de
|
|||||||
# Hetzner Cloud CX31 - AK
|
# Hetzner Cloud CX31 - AK
|
||||||
o26.oopen.de
|
o26.oopen.de
|
||||||
|
|
||||||
# Jibri - Faire Mobilitaet
|
|
||||||
o31.oopen.de
|
|
||||||
|
|
||||||
# etventure
|
# etventure
|
||||||
o32.oopen.de
|
o32.oopen.de
|
||||||
|
|
||||||
@ -976,6 +982,9 @@ ga-st-mail.ga.netz
|
|||||||
# Warenform
|
# Warenform
|
||||||
# ---
|
# ---
|
||||||
|
|
||||||
|
# server22.warenform.de
|
||||||
|
nd-live.warenform.de
|
||||||
|
|
||||||
# server24.warenform.de
|
# server24.warenform.de
|
||||||
mx.warenform.de
|
mx.warenform.de
|
||||||
lists.mx.warenform.de
|
lists.mx.warenform.de
|
||||||
@ -1080,6 +1089,9 @@ lxc-host-kb.anw-kb.netz
|
|||||||
|
|
||||||
# - GA - Gemeinschaft Altensclirf
|
# - GA - Gemeinschaft Altensclirf
|
||||||
ga-st-lxc1.ga.netz
|
ga-st-lxc1.ga.netz
|
||||||
|
ga-st-kvm1.ga.netz
|
||||||
|
ga-al-kvm2.ga.netz
|
||||||
|
ga-al-kvm3.ga.netz
|
||||||
|
|
||||||
# ---
|
# ---
|
||||||
# Warenform
|
# Warenform
|
||||||
@ -1171,9 +1183,6 @@ nc-gw.oopen.de
|
|||||||
meet.akweb.de
|
meet.akweb.de
|
||||||
cloud.akweb.de
|
cloud.akweb.de
|
||||||
|
|
||||||
# Jibri - Faire Mobilitaet
|
|
||||||
o31.oopen.de
|
|
||||||
|
|
||||||
# etventure
|
# etventure
|
||||||
o32.oopen.de
|
o32.oopen.de
|
||||||
|
|
||||||
@ -1548,6 +1557,9 @@ devel-wiki.wf.netz
|
|||||||
# - GA - Gemeinschaft Altensclirf
|
# - GA - Gemeinschaft Altensclirf
|
||||||
ga-st-lxc1.ga.netz
|
ga-st-lxc1.ga.netz
|
||||||
ga-st-mail.ga.netz
|
ga-st-mail.ga.netz
|
||||||
|
ga-st-kvm1.ga.netz
|
||||||
|
ga-al-kvm2.ga.netz
|
||||||
|
ga-al-kvm3.ga.netz
|
||||||
|
|
||||||
|
|
||||||
[o13_server]
|
[o13_server]
|
||||||
|
55
roles/common/files/etc/vim/vimrc
Normal file
55
roles/common/files/etc/vim/vimrc
Normal file
@ -0,0 +1,55 @@
|
|||||||
|
" All system-wide defaults are set in $VIMRUNTIME/debian.vim and sourced by
|
||||||
|
" the call to :runtime you can find below. If you wish to change any of those
|
||||||
|
" settings, you should do it in this file (/etc/vim/vimrc), since debian.vim
|
||||||
|
" will be overwritten everytime an upgrade of the vim packages is performed.
|
||||||
|
" It is recommended to make changes after sourcing debian.vim since it alters
|
||||||
|
" the value of the 'compatible' option.
|
||||||
|
|
||||||
|
" This line should not be removed as it ensures that various options are
|
||||||
|
" properly set to work with the Vim-related packages available in Debian.
|
||||||
|
runtime! debian.vim
|
||||||
|
|
||||||
|
" Vim will load $VIMRUNTIME/defaults.vim if the user does not have a vimrc.
|
||||||
|
" This happens after /etc/vim/vimrc(.local) are loaded, so it will override
|
||||||
|
" any settings in these files.
|
||||||
|
" If you don't want that to happen, uncomment the below line to prevent
|
||||||
|
" defaults.vim from being loaded.
|
||||||
|
" let g:skip_defaults_vim = 1
|
||||||
|
|
||||||
|
" Uncomment the next line to make Vim more Vi-compatible
|
||||||
|
" NOTE: debian.vim sets 'nocompatible'. Setting 'compatible' changes numerous
|
||||||
|
" options, so any other options should be set AFTER setting 'compatible'.
|
||||||
|
"set compatible
|
||||||
|
|
||||||
|
" Vim5 and later versions support syntax highlighting. Uncommenting the next
|
||||||
|
" line enables syntax highlighting by default.
|
||||||
|
"syntax on
|
||||||
|
|
||||||
|
" If using a dark background within the editing area and syntax highlighting
|
||||||
|
" turn on this option as well
|
||||||
|
"set background=dark
|
||||||
|
|
||||||
|
" Uncomment the following to have Vim jump to the last position when
|
||||||
|
" reopening a file
|
||||||
|
"au BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g'\"" | endif
|
||||||
|
|
||||||
|
" Uncomment the following to have Vim load indentation rules and plugins
|
||||||
|
" according to the detected filetype.
|
||||||
|
"filetype plugin indent on
|
||||||
|
|
||||||
|
" The following are commented out as they cause vim to behave a lot
|
||||||
|
" differently from regular Vi. They are highly recommended though.
|
||||||
|
"set showcmd " Show (partial) command in status line.
|
||||||
|
"set showmatch " Show matching brackets.
|
||||||
|
"set ignorecase " Do case insensitive matching
|
||||||
|
"set smartcase " Do smart case matching
|
||||||
|
"set incsearch " Incremental search
|
||||||
|
"set autowrite " Automatically save before commands like :next and :make
|
||||||
|
"set hidden " Hide buffers when they are abandoned
|
||||||
|
"set mouse=a " Enable mouse usage (all modes)
|
||||||
|
|
||||||
|
" Source a global configuration file if available
|
||||||
|
if filereadable("/etc/vim/vimrc.local")
|
||||||
|
source /etc/vim/vimrc.local
|
||||||
|
endif
|
||||||
|
|
182
roles/common/files/etc/vim/vimrc.local
Normal file
182
roles/common/files/etc/vim/vimrc.local
Normal file
@ -0,0 +1,182 @@
|
|||||||
|
" An example for a vimrc file.
|
||||||
|
"
|
||||||
|
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||||
|
" Last change: 1999 Sep 09
|
||||||
|
"
|
||||||
|
" To use it, copy it to
|
||||||
|
" for Unix and OS/2: ~/.vimrc
|
||||||
|
" for Amiga: s:.vimrc
|
||||||
|
" for MS-DOS and Win32: $VIM\_vimrc
|
||||||
|
|
||||||
|
" This line should not be removed as it ensures that various options are
|
||||||
|
" properly set to work with the Vim-related packages available in Debian.
|
||||||
|
runtime! debian.vim
|
||||||
|
|
||||||
|
" Vim will load $VIMRUNTIME/defaults.vim if the user does not have a vimrc.
|
||||||
|
" This happens after /etc/vim/vimrc(.local) are loaded, so it will override
|
||||||
|
" any settings in these files.
|
||||||
|
" If you don't want that to happen, uncomment the below line to prevent
|
||||||
|
" defaults.vim from being loaded.
|
||||||
|
let g:skip_defaults_vim = 1
|
||||||
|
|
||||||
|
set nocompatible " Use Vim defaults (much better!)
|
||||||
|
set bs=2 " allow backspacing over everything in insert mode
|
||||||
|
set ai " always set autoindenting on
|
||||||
|
" set backup " keep a backup file
|
||||||
|
"set viminfo='20,\"50 " read/write a .viminfo file, don't store more
|
||||||
|
" than 50 lines of registers
|
||||||
|
set viminfo='20,\"50,:20,%,n~/.viminfo
|
||||||
|
set history=50 " keep 50 lines of command line history
|
||||||
|
set ruler " show the cursor position all the time
|
||||||
|
set ignorecase " suchen case-insenitiv
|
||||||
|
set showmatch " zeige passende klammern
|
||||||
|
set shell=/bin/bash " shell to start with !
|
||||||
|
set expandtab " tabs --> blanks
|
||||||
|
set showmode " anzeige INSERT/REPLACE/...
|
||||||
|
|
||||||
|
" set smartcase " Do smart case matching
|
||||||
|
|
||||||
|
set incsearch " Incremental search
|
||||||
|
" Start searching when you type the first character of
|
||||||
|
" the search string. As you type in more characters, the
|
||||||
|
" search is refined.
|
||||||
|
|
||||||
|
set t_Co=256 " To enable 256 colors in vim, put this your .vimrc before setting the colorscheme
|
||||||
|
|
||||||
|
" einrueckung
|
||||||
|
set shiftwidth=3
|
||||||
|
set tabstop=3
|
||||||
|
" Round indent to multiple of 'shiftwidth' for > and < commands
|
||||||
|
set shiftround
|
||||||
|
|
||||||
|
" For Win32 GUI: remove 't' flag from 'guioptions': no tearoff menu entries
|
||||||
|
" let &guioptions = substitute(&guioptions, "t", "", "g")
|
||||||
|
|
||||||
|
" Don't use Ex mode, use Q for formatting
|
||||||
|
map Q gq
|
||||||
|
|
||||||
|
" Make p in isual Visual mode replace the selected text with the "" register.
|
||||||
|
vnoremap p <Esc>:let current_reg = @"<CR>gvdi<C-R>=current_reg<CR><Esc>
|
||||||
|
|
||||||
|
" Switch syntax highlighting on, when the terminal has colors
|
||||||
|
" Also switch on highlighting the last used search pattern.
|
||||||
|
if &t_Co > 2 || has("gui_running")
|
||||||
|
syntax on
|
||||||
|
set hlsearch
|
||||||
|
endif
|
||||||
|
|
||||||
|
" Only do this part when compiled with support for autocommands.
|
||||||
|
if has("autocmd")
|
||||||
|
|
||||||
|
" In text files, always limit the width of text to 78 characters
|
||||||
|
autocmd BufRead *.txt set tw=78
|
||||||
|
|
||||||
|
augroup cprog
|
||||||
|
" Remove all cprog autocommands
|
||||||
|
au!
|
||||||
|
|
||||||
|
" When starting to edit a file:
|
||||||
|
" For C and C++ files set formatting of comments and set C-indenting on.
|
||||||
|
" For other files switch it off.
|
||||||
|
" Don't change the order, it's important that the line with * comes first.
|
||||||
|
autocmd FileType * set formatoptions=tcql nocindent comments&
|
||||||
|
autocmd FileType c,cpp set formatoptions=croql cindent comments=sr:/*,mb:*,el:*/,://
|
||||||
|
augroup END
|
||||||
|
|
||||||
|
augroup gzip
|
||||||
|
" Remove all gzip autocommands
|
||||||
|
au!
|
||||||
|
|
||||||
|
" Enable editing of gzipped files
|
||||||
|
" set binary mode before reading the file
|
||||||
|
autocmd BufReadPre,FileReadPre *.gz,*.bz2 set bin
|
||||||
|
autocmd BufReadPost,FileReadPost *.gz call GZIP_read("gunzip")
|
||||||
|
autocmd BufReadPost,FileReadPost *.bz2 call GZIP_read("bunzip2")
|
||||||
|
autocmd BufWritePost,FileWritePost *.gz call GZIP_write("gzip")
|
||||||
|
autocmd BufWritePost,FileWritePost *.bz2 call GZIP_write("bzip2")
|
||||||
|
autocmd FileAppendPre *.gz call GZIP_appre("gunzip")
|
||||||
|
autocmd FileAppendPre *.bz2 call GZIP_appre("bunzip2")
|
||||||
|
autocmd FileAppendPost *.gz call GZIP_write("gzip")
|
||||||
|
autocmd FileAppendPost *.bz2 call GZIP_write("bzip2")
|
||||||
|
|
||||||
|
" After reading compressed file: Uncompress text in buffer with "cmd"
|
||||||
|
fun! GZIP_read(cmd)
|
||||||
|
let ch_save = &ch
|
||||||
|
set ch=2
|
||||||
|
execute "'[,']!" . a:cmd
|
||||||
|
set nobin
|
||||||
|
let &ch = ch_save
|
||||||
|
execute ":doautocmd BufReadPost " . expand("%:r")
|
||||||
|
endfun
|
||||||
|
|
||||||
|
" After writing compressed file: Compress written file with "cmd"
|
||||||
|
fun! GZIP_write(cmd)
|
||||||
|
if rename(expand("<afile>"), expand("<afile>:r")) == 0
|
||||||
|
execute "!" . a:cmd . " <afile>:r"
|
||||||
|
endif
|
||||||
|
endfun
|
||||||
|
|
||||||
|
" Before appending to compressed file: Uncompress file with "cmd"
|
||||||
|
fun! GZIP_appre(cmd)
|
||||||
|
execute "!" . a:cmd . " <afile>"
|
||||||
|
call rename(expand("<afile>:r"), expand("<afile>"))
|
||||||
|
endfun
|
||||||
|
|
||||||
|
augroup END
|
||||||
|
|
||||||
|
" This is disabled, because it changes the jumplist. Can't use CTRL-O to go
|
||||||
|
" back to positions in previous files more than once.
|
||||||
|
if 0
|
||||||
|
" When editing a file, always jump to the last cursor position.
|
||||||
|
" This must be after the uncompress commands.
|
||||||
|
autocmd BufReadPost * if line("'\"") && line("'\"") <= line("$") | exe "normal `\"" | endif
|
||||||
|
endif
|
||||||
|
|
||||||
|
endif " has("autocmd")
|
||||||
|
|
||||||
|
" toggle syntax highlighting
|
||||||
|
map <F12> :if exists("syntax_on") <Bar> syntax off <Bar> else <Bar> syntax on <Bar> endif <CR><ESC>
|
||||||
|
map <F11> :nohls <CR>
|
||||||
|
|
||||||
|
" use <F6> to toggle line numbers
|
||||||
|
nmap <silent> <F6> :set number!<CR>
|
||||||
|
|
||||||
|
|
||||||
|
" If using a dark background within the editing area and syntax highlighting
|
||||||
|
" turn on this option as well
|
||||||
|
set background=dark
|
||||||
|
|
||||||
|
|
||||||
|
" set color for search
|
||||||
|
hi clear search
|
||||||
|
hi search term=bold,reverse cterm=bold,reverse gui=bold,reverse
|
||||||
|
|
||||||
|
" set color for Comment
|
||||||
|
hi clear Comment
|
||||||
|
"highlight Comment term=bold cterm=bold ctermfg=LightBlue guifg=#80a0ff gui=bold
|
||||||
|
"highlight Comment term=none cterm=none ctermfg=LightBlue guifg=#80a0ff gui=bold
|
||||||
|
"highlight Comment term=bold cterm=bold ctermfg=grey guifg=#80a0ff gui=bold
|
||||||
|
highlight Comment term=none cterm=none ctermfg=grey guifg=#80a0ff gui=bold
|
||||||
|
"highlight Comment term=none cterm=none ctermfg=177 guifg=#80a0ff gui=bold
|
||||||
|
"highlight Comment term=none cterm=none ctermfg=215 guifg=#80a0ff gui=bold
|
||||||
|
|
||||||
|
" Go back to the position the cursor was on the last time this file was edited
|
||||||
|
au BufReadPost * if line("'\"") > 0 && line("'\"") <= line("$")|execute("normal `\"")|endif
|
||||||
|
|
||||||
|
" visual shifting (does not exit Visual mode)
|
||||||
|
vnoremap < <gv
|
||||||
|
vnoremap > >gv
|
||||||
|
|
||||||
|
" Scroll when cursor gets within 3 characters of top/bottom edge
|
||||||
|
set scrolloff=3
|
||||||
|
|
||||||
|
" Show line, column number, and relative position within a file in the status line
|
||||||
|
" set statusline=%F%m%r%h%w\ [FORMAT=%{&ff}]\ [TYPE=%Y]\ [ASCII=\%03.3b]\ [HEX=\%02.2B]\ [POS=%04l,%04v][%p%%]\ [LEN=%L]
|
||||||
|
"set statusline=\ %F\ %(\|\ flags:\ %R%M%H%W\ %)%(\|\ type:\ %Y\ %)%(\|\ format:\ %{&ff}\ %)%(\|\ syntax:\ %{synIDattr(synID(line('.'),col('.'),0),'name')}%)\ \ %=line:\ %l/%L\ \|\ column:\ %c%V\ \|\ relative\:\ %p%%\
|
||||||
|
set statusline=\ %F\ %(\|\ flags:\ %R%M%H%W\ %)%(\|\ type:\ %Y\ %)%(\|\ format:\ %{&ff}\ %)\ \ %=line:\ %l/%L\ \|\ col:\ %c%V\ \|\ %p%%
|
||||||
|
" Always show status line, even for one window
|
||||||
|
set laststatus=2
|
||||||
|
highlight StatusLine cterm=none ctermfg=white ctermbg=blue
|
||||||
|
|
||||||
|
|
||||||
|
nnoremap <silent> <C-6> <C-^>
|
86
roles/common/files/etc/zsh/zshrc
Normal file
86
roles/common/files/etc/zsh/zshrc
Normal file
@ -0,0 +1,86 @@
|
|||||||
|
#-----------------------------
|
||||||
|
# settings
|
||||||
|
#-----------------------------
|
||||||
|
|
||||||
|
# parameters
|
||||||
|
export SAVEHIST="1000"
|
||||||
|
|
||||||
|
# colors
|
||||||
|
autoload -U colors && colors
|
||||||
|
|
||||||
|
# zshoptions
|
||||||
|
unsetopt EXTENDED_HISTORY # history: disable timestamp
|
||||||
|
setopt HIST_IGNORE_DUPS # history: no duplicates
|
||||||
|
setopt HIST_IGNORE_ALL_DUPS # history: no duplicates in entire history
|
||||||
|
setopt HIST_REDUCE_BLANKS # history: remove superfluous blanks
|
||||||
|
setopt SHARE_HISTORY # history: read and write on each command
|
||||||
|
setopt PRINT_EIGHT_BIT # print eight bit characters literally
|
||||||
|
unsetopt MAIL_WARNING # mail: disable notification
|
||||||
|
|
||||||
|
#-----------------------------
|
||||||
|
# keybindings
|
||||||
|
#-----------------------------
|
||||||
|
|
||||||
|
# http://zshwiki.org/home/zle/bindkeys#why_isn_t_control-r_working_anymore
|
||||||
|
bindkey -e
|
||||||
|
|
||||||
|
bindkey -M emacs "$terminfo[kdch1]" delete-char
|
||||||
|
bindkey -M emacs "$terminfo[khome]" beginning-of-line
|
||||||
|
bindkey -M emacs "$terminfo[kend]" end-of-line
|
||||||
|
|
||||||
|
# move between words with alt+arrow
|
||||||
|
bindkey "[1;3C" forward-word
|
||||||
|
bindkey "[1;3D" backward-word
|
||||||
|
|
||||||
|
# fix "del" key: https://git.suckless.org/st/plain/FAQ
|
||||||
|
if [ $TERM = "st-256color" ]
|
||||||
|
then
|
||||||
|
function zle-line-init () { echoti smkx }
|
||||||
|
function zle-line-finish () { echoti rmkx }
|
||||||
|
zle -N zle-line-init
|
||||||
|
zle -N zle-line-finish
|
||||||
|
fi
|
||||||
|
|
||||||
|
#-----------------------------
|
||||||
|
# prompt
|
||||||
|
#-----------------------------
|
||||||
|
|
||||||
|
EXITCODE="%(?..%?%1v )"
|
||||||
|
if [ $EXITCODE = 0 ]
|
||||||
|
then
|
||||||
|
unset COLORED_EXITCODE
|
||||||
|
else
|
||||||
|
COLORED_EXITCODE="%{$fg_bold[red]%}${EXITCODE}"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ $UID = 0 ]
|
||||||
|
then
|
||||||
|
UID_COLOR="%{$fg_bold[red]%}"
|
||||||
|
else
|
||||||
|
UID_COLOR="%{$fg_bold[cyan]%}"
|
||||||
|
fi
|
||||||
|
|
||||||
|
PROMPT="${COLORED_EXITCODE}${UID_COLOR}%n%{$reset_color%}@%m %B%~%b %{$fg_bold[green]%}%#%{$reset_color%} "
|
||||||
|
|
||||||
|
#-----------------------------
|
||||||
|
# window title
|
||||||
|
#-----------------------------
|
||||||
|
|
||||||
|
case $TERM in
|
||||||
|
xterm*|rxvt*)
|
||||||
|
precmd () { print -Pn "\e]0;%n@%M %~ - $TERM\a" }
|
||||||
|
preexec () { print -Pn "\e]0;%n@%M %~ %# $1 - $TERM\a" }
|
||||||
|
;;
|
||||||
|
screen*)
|
||||||
|
precmd () { print -Pn "\e]0;%n@%M %~ \a" }
|
||||||
|
preexec () { print -Pn "\e]0;%n@%M %~ %# $1\a" }
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
#-----------------------------
|
||||||
|
# global shell settings
|
||||||
|
#-----------------------------
|
||||||
|
|
||||||
|
source ~alex/.shrc
|
||||||
|
|
||||||
|
ZLS_COLORS=$ZLS_COLORS
|
@ -61,7 +61,8 @@
|
|||||||
#validate: visudo -cf %s
|
#validate: visudo -cf %s
|
||||||
notify: Reload bind9
|
notify: Reload bind9
|
||||||
tags:
|
tags:
|
||||||
- sudoers-global-configuration
|
- apt-caching-nameserver
|
||||||
|
- caching-nameserver
|
||||||
|
|
||||||
|
|
||||||
- name: (caching-nameserver.yml) Add 127.0.0.1 as first nameserver entry to /etc/resolv.conf
|
- name: (caching-nameserver.yml) Add 127.0.0.1 as first nameserver entry to /etc/resolv.conf
|
||||||
@ -74,4 +75,6 @@
|
|||||||
owner: root
|
owner: root
|
||||||
group: root
|
group: root
|
||||||
mode: '0644'
|
mode: '0644'
|
||||||
|
tags:
|
||||||
|
- apt-caching-nameserver
|
||||||
|
|
||||||
|
@ -29,6 +29,18 @@
|
|||||||
tags: apt
|
tags: apt
|
||||||
|
|
||||||
|
|
||||||
|
# tags supported inside shell.yml
|
||||||
|
#
|
||||||
|
# vim-config
|
||||||
|
# zsh-config
|
||||||
|
#
|
||||||
|
- import_tasks: shell.yml
|
||||||
|
tags:
|
||||||
|
- shell-config
|
||||||
|
- vim-config
|
||||||
|
- zsh-config
|
||||||
|
|
||||||
|
|
||||||
# tags supported inside users.yml:
|
# tags supported inside users.yml:
|
||||||
#
|
#
|
||||||
# users-exists
|
# users-exists
|
||||||
|
38
roles/common/tasks/shell.yml
Normal file
38
roles/common/tasks/shell.yml
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
---
|
||||||
|
|
||||||
|
- name: (shell.yml) Set default VIM configuration - file /etc/vim/vimrc exists
|
||||||
|
copy:
|
||||||
|
src: "{{ item }}"
|
||||||
|
dest: /etc/vim/vimrc
|
||||||
|
owner: root
|
||||||
|
group: root
|
||||||
|
mode: '0644'
|
||||||
|
with_fileglob: "etc/vim/vimrc"
|
||||||
|
tags:
|
||||||
|
- shell-config
|
||||||
|
- vim-config
|
||||||
|
|
||||||
|
- name: (shell.yml) Set default VIM configuration - file /etc/vim/vimrc.local exists
|
||||||
|
copy:
|
||||||
|
src: "{{ item }}"
|
||||||
|
dest: /etc/vim/vimrc.local
|
||||||
|
owner: root
|
||||||
|
group: root
|
||||||
|
mode: '0644'
|
||||||
|
with_fileglob: "etc/vim/vimrc.local"
|
||||||
|
tags:
|
||||||
|
- shell-config
|
||||||
|
- vim-config
|
||||||
|
|
||||||
|
|
||||||
|
#- name: (shell.yml) Set default ZSH configuration - file /etc/zsh/zshrc
|
||||||
|
# copy:
|
||||||
|
# src: "{{ item }}"
|
||||||
|
# dest: /etc/zsh/zshrc
|
||||||
|
# owner: root
|
||||||
|
# group: root
|
||||||
|
# mode: '0644'
|
||||||
|
# with_fileglob: "etc/zsh/zshrc"
|
||||||
|
# tags:
|
||||||
|
# - shell-config
|
||||||
|
# - zsh-config
|
@ -8,80 +8,119 @@
|
|||||||
# {{ config.headline }}
|
# {{ config.headline }}
|
||||||
#-----------------------------
|
#-----------------------------
|
||||||
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{# {% if config.auto is defined and config.auto is sameas true %} #}
|
{# {% if config.auto is defined and config.auto is sameas true %} #}
|
||||||
{% if config.auto | default(loop.first) %}
|
{% if config.auto | default(loop.first) %}
|
||||||
auto {{ config.device }}
|
auto {{ config.device }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% for stanza in config.allow | default([]) %}
|
{% for stanza in config.allow | default([]) %}
|
||||||
allow-{{ stanza }}
|
allow-{{ stanza }}
|
||||||
{% endfor -%}
|
{% endfor -%}
|
||||||
|
|
||||||
iface {{ config.device }} {{ config.family | default('inet', true) }} {{ config.method | default('static', true) }}
|
iface {{ config.device }} {{ config.family | default('inet', true) }} {{ config.method | default('static', true) }}
|
||||||
{% set iface_keys = ['hwaddress ether', 'description', 'address', 'netmask', 'network', 'broadcast', 'gateway'] %}
|
{% if config.method == "static" %}
|
||||||
{% for key in iface_keys %}
|
{% if config.description is defined %}
|
||||||
{% if key in config %}
|
description {{ config.description }}
|
||||||
{{ key }} {{ config[key] }}
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endfor -%}
|
{% if config.hwaddress is defined %}
|
||||||
|
hwaddress {{ config.hwaddress }}
|
||||||
|
{% endif %}
|
||||||
|
{% if (config.address is defined) and (0 < config.address | length) %}
|
||||||
|
{% if config.netmask is defined %}
|
||||||
|
address {{ config.address }}/{{ config.netmask }}
|
||||||
|
{% else %}
|
||||||
|
address {{ config.address }}
|
||||||
|
{% endif -%}
|
||||||
|
{% endif -%}
|
||||||
|
{% set iface_keys = ['gateway', 'metric', 'pointopoint', 'mtu', 'scope'] %}
|
||||||
|
{% for key in iface_keys %}
|
||||||
|
{% if key in config %}
|
||||||
|
{{ key }} {{ config[key] }}
|
||||||
|
{% endif %}
|
||||||
|
{% endfor -%}
|
||||||
|
{% elif config.method == "manual" %}
|
||||||
|
{% set iface_keys = ['hwaddress', 'mtu'] %}
|
||||||
|
{% for key in iface_keys %}
|
||||||
|
{% if key in config %}
|
||||||
|
{{ key }} {{ config[key] }}
|
||||||
|
{% endif %}
|
||||||
|
{% endfor -%}
|
||||||
|
{% elif config.method == "dhcp" %}
|
||||||
|
{% set iface_keys = ['hwaddress', 'hostname', 'metric', 'leasehours', 'vendor', 'client' ] %}
|
||||||
|
{% for key in iface_keys %}
|
||||||
|
{% if key in config %}
|
||||||
|
{{ key }} {{ config[key] }}
|
||||||
|
{% endif %}
|
||||||
|
{% endfor -%}
|
||||||
|
{% elif config.method == "bootp" %}
|
||||||
|
{% set iface_keys = ['hwaddr', 'bootfile', 'server'] %}
|
||||||
|
{% for key in iface_keys %}
|
||||||
|
{% if key in config %}
|
||||||
|
{{ key }} {{ config[key] }}
|
||||||
|
{% endif %}
|
||||||
|
{% endfor -%}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{# #}
|
||||||
{# nameservers #}
|
{# nameservers #}
|
||||||
{%- if (config.nameservers is defined) and (0 < config.nameservers | length) %}
|
{%- if (config.nameservers is defined) and (0 < config.nameservers | length) %}
|
||||||
|
# dns-* options are implemented by the resolvconf package, if installed
|
||||||
# nameserver settings
|
# sets entries in /etc/resolv.conf
|
||||||
|
#
|
||||||
dns-nameservers {{ config.nameservers | join(' ') }}
|
dns-nameservers {{ config.nameservers | join(' ') }}
|
||||||
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if config.dns_search is defined %}
|
{% if config.dns_search is defined %}
|
||||||
dns-search {{ config.dns_search }}
|
dns-search {{ config.dns_search }}
|
||||||
{% endif -%}
|
|
||||||
|
|
||||||
|
{% endif -%}
|
||||||
|
{# #}
|
||||||
{# subnets #}
|
{# subnets #}
|
||||||
{%- if (config.subnets is defined) and (0 < config.subnets | length) %}
|
{%- if (config.subnets is defined) and (0 < config.subnets | length) %}
|
||||||
|
|
||||||
# additional subnets
|
# additional subnets
|
||||||
{% for subnet in config.subnets %}
|
{% for subnet in config.subnets %}
|
||||||
up /sbin/ip addr add {{ subnet }} dev {{ config.device }}
|
up /sbin/ip addr add {{ subnet }} dev {{ config.device }}
|
||||||
down /sbin/ip addr del {{ subnet }} dev {{ config.device }}
|
down /sbin/ip addr del {{ subnet }} dev {{ config.device }}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% endif -%}
|
|
||||||
|
|
||||||
|
{% endif -%}
|
||||||
|
{# #}
|
||||||
{# bridge settings #}
|
{# bridge settings #}
|
||||||
{%- if config['bridge'] is defined %}
|
{%- if config['bridge'] is defined %}
|
||||||
|
|
||||||
# bridge settings
|
# bridge settings
|
||||||
{% for key in config.bridge %}
|
{% for key in config.bridge %}
|
||||||
bridge_{{ key }} {{ config.bridge[key] }}
|
bridge_{{ key }} {{ config.bridge[key] }}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
||||||
{% endif -%}
|
{% endif -%}
|
||||||
|
{# #}
|
||||||
{# bond parameters #}
|
{# bond parameters #}
|
||||||
{% set bond_keys = ['mode', 'miimon', 'downdelay', 'updelay', 'master', 'slaves', 'lacp-rate'] %}
|
{% set bond_keys = ['master', 'primary', 'slaves', 'mode', 'miimon', 'lacp-rate', 'ad-select', 'downdelay', 'updelay'] %}
|
||||||
{%- if (config.bond is defined) and (bond_keys | intersect(config.bond.keys())) -%}
|
{%- if (config.bond is defined) and (bond_keys | intersect(config.bond.keys())) -%}
|
||||||
|
|
||||||
# bond parameters
|
# bond parameters
|
||||||
{% for key in bond_keys %}
|
{% for key in bond_keys %}
|
||||||
{% if key in config.bond -%}
|
{% if key in config.bond -%}
|
||||||
bond-{{ key }} {{ config.bond[key] }}
|
bond-{{ key }} {{ config.bond[key] }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% endif -%}
|
|
||||||
|
|
||||||
|
{# #}
|
||||||
|
{% endif -%}
|
||||||
{# vlan #}
|
{# vlan #}
|
||||||
{% set vlan_keys = ['raw-device'] %}
|
{% set vlan_keys = ['raw-device'] %}
|
||||||
{%- if (config.vlan is defined) and (vlan_keys | intersect(config.vlan.keys())) -%}
|
{%- if (config.vlan is defined) and (vlan_keys | intersect(config.vlan.keys())) -%}
|
||||||
|
|
||||||
# vlan
|
# vlan
|
||||||
{% for key in vlan_keys %}
|
{% for key in vlan_keys %}
|
||||||
{% if key in config.vlan -%}
|
{% if key in config.vlan -%}
|
||||||
vlan-{{ key }} {{ config.vlan[key] }}
|
vlan-{{ key }} {{ config.vlan[key] }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endfor %}
|
|
||||||
{% endif -%}
|
|
||||||
|
|
||||||
|
{% endfor %}
|
||||||
|
{# #}
|
||||||
|
{% endif -%}
|
||||||
|
{# #}
|
||||||
{# hook scripts #}
|
{# hook scripts #}
|
||||||
{% set hook_keys = ['pre-up', 'up', 'post-up', 'pre-down', 'down', 'post-down'] %}
|
{% set hook_keys = ['pre-up', 'up', 'post-up', 'pre-down', 'down', 'post-down'] %}
|
||||||
{%- if hook_keys | intersect(config.keys()) %}
|
{%- if hook_keys | intersect(config.keys()) %}
|
||||||
|
|
||||||
# hook scripts
|
# hook scripts
|
||||||
{% for key in hook_keys %}
|
{% for key in hook_keys %}
|
||||||
{% if key in config %}
|
{% if key in config %}
|
||||||
|
Loading…
Reference in New Issue
Block a user