Build Windows Templates in RHV
This commit is contained in:
36
roles/linux-system-roles.network/examples/bond_simple.yml
Normal file
36
roles/linux-system-roles.network/examples/bond_simple.yml
Normal file
@@ -0,0 +1,36 @@
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
---
|
||||
- hosts: network-test
|
||||
vars:
|
||||
network_connections:
|
||||
# Specify the bond profile
|
||||
- name: bond0
|
||||
state: up
|
||||
type: bond
|
||||
interface_name: bond0
|
||||
# ip configuration (optional)
|
||||
ip:
|
||||
address:
|
||||
- "192.0.2.24/24"
|
||||
- "2001:db8::23/64"
|
||||
# bond configuration settings: (optional)
|
||||
bond:
|
||||
mode: active-backup
|
||||
miimon: 110
|
||||
|
||||
# add an ethernet profile to the bond
|
||||
- name: member1
|
||||
state: up
|
||||
type: ethernet
|
||||
interface_name: eth1
|
||||
controller: bond0
|
||||
|
||||
# add a second ethernet profile to the bond
|
||||
- name: member2
|
||||
state: up
|
||||
type: ethernet
|
||||
interface_name: eth2
|
||||
controller: bond0
|
||||
roles:
|
||||
- linux-system-roles.network
|
||||
...
|
||||
38
roles/linux-system-roles.network/examples/bond_with_vlan.yml
Normal file
38
roles/linux-system-roles.network/examples/bond_with_vlan.yml
Normal file
@@ -0,0 +1,38 @@
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
---
|
||||
- hosts: network-test
|
||||
vars:
|
||||
network_connections:
|
||||
|
||||
# Create a bond profile, which is the parent of VLAN.
|
||||
- name: prod2
|
||||
state: up
|
||||
type: bond
|
||||
interface_name: bond2
|
||||
ip:
|
||||
dhcp4: no
|
||||
auto6: no
|
||||
bond:
|
||||
mode: active-backup
|
||||
miimon: 110
|
||||
|
||||
# set an ethernet as port to the bond
|
||||
- name: prod2-port1
|
||||
state: up
|
||||
type: ethernet
|
||||
interface_name: "{{ network_interface_name2 }}"
|
||||
controller: prod2
|
||||
|
||||
# on top of it, create a VLAN with ID 100 and static
|
||||
# addressing
|
||||
- name: prod2.100
|
||||
state: up
|
||||
type: vlan
|
||||
parent: prod2
|
||||
vlan_id: 100
|
||||
ip:
|
||||
address:
|
||||
- "192.0.2.{{ network_iphost }}/24"
|
||||
|
||||
roles:
|
||||
- linux-system-roles.network
|
||||
@@ -0,0 +1,36 @@
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
---
|
||||
- hosts: network-test
|
||||
vars:
|
||||
network_connections:
|
||||
|
||||
# Create a bridge profile, which is the parent of VLAN.
|
||||
- name: prod2
|
||||
state: up
|
||||
type: bridge
|
||||
interface_name: bridge2
|
||||
ip:
|
||||
dhcp4: no
|
||||
auto6: no
|
||||
|
||||
# set an ethernet port to the bridge
|
||||
- name: prod2-port1
|
||||
state: up
|
||||
type: ethernet
|
||||
interface_name: "{{ network_interface_name2 }}"
|
||||
controller: prod2
|
||||
port_type: bridge
|
||||
|
||||
# on top of it, create a VLAN with ID 100 and static
|
||||
# addressing
|
||||
- name: prod2.100
|
||||
state: up
|
||||
type: vlan
|
||||
parent: prod2
|
||||
vlan_id: 100
|
||||
ip:
|
||||
address:
|
||||
- "192.0.2.{{ network_iphost }}/24"
|
||||
|
||||
roles:
|
||||
- linux-system-roles.network
|
||||
1
roles/linux-system-roles.network/examples/down_profile.yml
Symbolic link
1
roles/linux-system-roles.network/examples/down_profile.yml
Symbolic link
@@ -0,0 +1 @@
|
||||
../tests/playbooks/down_profile.yml
|
||||
17
roles/linux-system-roles.network/examples/dummy_simple.yml
Normal file
17
roles/linux-system-roles.network/examples/dummy_simple.yml
Normal file
@@ -0,0 +1,17 @@
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
---
|
||||
- hosts: all
|
||||
vars:
|
||||
network_connections:
|
||||
# Specify the dummy profile
|
||||
- name: dummy0
|
||||
state: up
|
||||
type: dummy
|
||||
interface_name: dummy0
|
||||
ip:
|
||||
address:
|
||||
- "192.0.2.42/30"
|
||||
|
||||
roles:
|
||||
- linux-system-roles.network
|
||||
...
|
||||
@@ -0,0 +1,44 @@
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
---
|
||||
- hosts: all
|
||||
vars:
|
||||
network_connections:
|
||||
- name: eth0
|
||||
type: ethernet
|
||||
ip:
|
||||
route_metric4: 100
|
||||
dhcp4: no
|
||||
gateway4: 192.0.2.1
|
||||
dns:
|
||||
- 192.0.2.2
|
||||
- 198.51.100.5
|
||||
dns_search:
|
||||
- example.com
|
||||
- subdomain.example.com
|
||||
dns_options:
|
||||
- rotate
|
||||
- timeout:1
|
||||
|
||||
route_metric6: -1
|
||||
auto6: no
|
||||
gateway6: 2001:db8::1
|
||||
|
||||
address:
|
||||
- 192.0.2.3/24
|
||||
- 198.51.100.3/26
|
||||
- 2001:db8::80/7
|
||||
|
||||
route:
|
||||
- network: 198.51.100.128
|
||||
prefix: 26
|
||||
gateway: 198.51.100.1
|
||||
metric: 2
|
||||
- network: 198.51.100.64
|
||||
prefix: 26
|
||||
gateway: 198.51.100.6
|
||||
metric: 4
|
||||
route_append_only: no
|
||||
rule_append_only: yes
|
||||
roles:
|
||||
- linux-system-roles.network
|
||||
...
|
||||
@@ -0,0 +1,18 @@
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
---
|
||||
- hosts: network-test
|
||||
vars:
|
||||
network_connections:
|
||||
|
||||
# Create one ethernet profile and activate it.
|
||||
# The profile uses automatic IP addressing
|
||||
# and is tied to the interface by MAC address.
|
||||
- name: prod1
|
||||
state: up
|
||||
type: ethernet
|
||||
autoconnect: yes
|
||||
mac: "{{ network_mac1 }}"
|
||||
mtu: 1450
|
||||
|
||||
roles:
|
||||
- linux-system-roles.network
|
||||
@@ -0,0 +1,30 @@
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
---
|
||||
- hosts: network-test
|
||||
vars:
|
||||
network_connections:
|
||||
- name: eth0
|
||||
type: ethernet
|
||||
ieee802_1x:
|
||||
identity: myhost
|
||||
eap: tls
|
||||
private_key: /etc/pki/tls/client.key
|
||||
# recommend vault encrypting the private key password
|
||||
# see https://docs.ansible.com/ansible/latest/user_guide/vault.html
|
||||
private_key_password: "p@55w0rD"
|
||||
client_cert: /etc/pki/tls/client.pem
|
||||
ca_cert: /etc/pki/tls/cacert.pem
|
||||
domain_suffix_match: example.com
|
||||
|
||||
# certs have to be deployed first
|
||||
pre_tasks:
|
||||
- name: copy certs/keys for 802.1x auth
|
||||
copy:
|
||||
src: "{{ item }}"
|
||||
dest: "/etc/pki/tls/{{ item }}"
|
||||
with_items:
|
||||
- client.key
|
||||
- client.pem
|
||||
- cacert.pem
|
||||
roles:
|
||||
- linux-system-roles.network
|
||||
29
roles/linux-system-roles.network/examples/eth_with_vlan.yml
Normal file
29
roles/linux-system-roles.network/examples/eth_with_vlan.yml
Normal file
@@ -0,0 +1,29 @@
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
---
|
||||
- hosts: network-test
|
||||
vars:
|
||||
network_connections:
|
||||
|
||||
# Create a profile for the underlying device of the VLAN.
|
||||
- name: prod2
|
||||
type: ethernet
|
||||
autoconnect: no
|
||||
state: up
|
||||
interface_name: "{{ network_interface_name2 }}"
|
||||
ip:
|
||||
dhcp4: no
|
||||
auto6: no
|
||||
|
||||
# on top of it, create a VLAN with ID 100 and static
|
||||
# addressing
|
||||
- name: prod2.100
|
||||
state: up
|
||||
type: vlan
|
||||
parent: prod2
|
||||
vlan_id: 100
|
||||
ip:
|
||||
address:
|
||||
- "192.0.2.{{ network_iphost }}/24"
|
||||
|
||||
roles:
|
||||
- linux-system-roles.network
|
||||
@@ -0,0 +1,38 @@
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
---
|
||||
- hosts: all
|
||||
tasks:
|
||||
- include_role:
|
||||
name: linux-system-roles.network
|
||||
vars:
|
||||
network_connections:
|
||||
- name: "{{ network_interface_name1 }}"
|
||||
state: up
|
||||
type: ethernet
|
||||
ip:
|
||||
dhcp4: no
|
||||
auto6: no
|
||||
ethtool:
|
||||
coalesce:
|
||||
adaptive_rx: yes
|
||||
adaptive_tx: no
|
||||
pkt_rate_high: 128
|
||||
pkt_rate_low: 128
|
||||
rx_frames: 128
|
||||
rx_frames_high: 128
|
||||
rx_frames_irq: 128
|
||||
rx_frames_low: 128
|
||||
rx_usecs: 128
|
||||
rx_usecs_high: 128
|
||||
rx_usecs_irq: 128
|
||||
rx_usecs_low: 128
|
||||
sample_interval: 128
|
||||
stats_block_usecs: 128
|
||||
tx_frames: 128
|
||||
tx_frames_high: 128
|
||||
tx_frames_irq: 128
|
||||
tx_frames_low: 128
|
||||
tx_usecs: 128
|
||||
tx_usecs_high: 128
|
||||
tx_usecs_irq: 128
|
||||
tx_usecs_low: 128
|
||||
@@ -0,0 +1,19 @@
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
---
|
||||
- hosts: all
|
||||
tasks:
|
||||
- include_role:
|
||||
name: linux-system-roles.network
|
||||
vars:
|
||||
network_connections:
|
||||
- name: "{{ network_interface_name1 }}"
|
||||
state: up
|
||||
type: ethernet
|
||||
ip:
|
||||
dhcp4: "no"
|
||||
auto6: "no"
|
||||
ethtool:
|
||||
features:
|
||||
gro: "no"
|
||||
gso: "yes"
|
||||
tx_sctp_segmentation: "no"
|
||||
@@ -0,0 +1,14 @@
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
---
|
||||
- hosts: all
|
||||
tasks:
|
||||
- include_role:
|
||||
name: linux-system-roles.network
|
||||
vars:
|
||||
network_connections:
|
||||
- name: "{{ network_interface_name1 }}"
|
||||
state: up
|
||||
type: ethernet
|
||||
ip:
|
||||
dhcp4: "no"
|
||||
auto6: "no"
|
||||
12
roles/linux-system-roles.network/examples/ipv6_disabled.yml
Normal file
12
roles/linux-system-roles.network/examples/ipv6_disabled.yml
Normal file
@@ -0,0 +1,12 @@
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
---
|
||||
- hosts: all
|
||||
vars:
|
||||
network_connections:
|
||||
- name: eth0
|
||||
type: ethernet
|
||||
ip:
|
||||
ipv6_disabled: true
|
||||
roles:
|
||||
- linux-system-roles.network
|
||||
...
|
||||
@@ -0,0 +1,12 @@
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
---
|
||||
- name: Set {{ profile }} down
|
||||
hosts: all
|
||||
vars:
|
||||
network_connections:
|
||||
- name: "{{ profile }}"
|
||||
persistent_state: absent
|
||||
state: down
|
||||
roles:
|
||||
- linux-system-roles.network
|
||||
...
|
||||
1
roles/linux-system-roles.network/examples/remove_profile.yml
Symbolic link
1
roles/linux-system-roles.network/examples/remove_profile.yml
Symbolic link
@@ -0,0 +1 @@
|
||||
../tests/playbooks/remove_profile.yml
|
||||
33
roles/linux-system-roles.network/examples/team_simple.yml
Normal file
33
roles/linux-system-roles.network/examples/team_simple.yml
Normal file
@@ -0,0 +1,33 @@
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
---
|
||||
- hosts: network-test
|
||||
vars:
|
||||
network_connections:
|
||||
# Specify the team profile
|
||||
- name: team0
|
||||
state: up
|
||||
type: team
|
||||
interface_name: team0
|
||||
# ip configuration (optional)
|
||||
ip:
|
||||
address:
|
||||
- "192.0.2.24/24"
|
||||
- "2001:db8::23/64"
|
||||
|
||||
# add an team profile to the team
|
||||
- name: member1
|
||||
state: up
|
||||
type: ethernet
|
||||
interface_name: eth1
|
||||
controller: team0
|
||||
|
||||
# add a second team profile to the team
|
||||
- name: member2
|
||||
state: up
|
||||
type: ethernet
|
||||
interface_name: eth2
|
||||
controller: team0
|
||||
|
||||
roles:
|
||||
- linux-system-roles.network
|
||||
...
|
||||
@@ -0,0 +1,15 @@
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
---
|
||||
- hosts: network-test
|
||||
vars:
|
||||
network_connections:
|
||||
- name: wlan0
|
||||
type: wireless
|
||||
wireless:
|
||||
ssid: "My WPA2-PSK Network"
|
||||
key_mgmt: "wpa-psk"
|
||||
# recommend vault encrypting the wireless password
|
||||
# see https://docs.ansible.com/ansible/latest/user_guide/vault.html
|
||||
password: "p@55w0rD"
|
||||
roles:
|
||||
- linux-system-roles.network
|
||||
Reference in New Issue
Block a user