Add container_networks, ssh_key and vxlan_mesh resources
This commit is contained in:
22
resources/container_networks/actions/run.yml
Normal file
22
resources/container_networks/actions/run.yml
Normal file
@@ -0,0 +1,22 @@
|
||||
- hosts: '*'
|
||||
sudo: yes
|
||||
gather_facts: false
|
||||
# this is default variables, they will be overwritten by resource one
|
||||
vars:
|
||||
networks:
|
||||
mgmt:
|
||||
address: 172.18.10.6
|
||||
bridge: br-test0
|
||||
bridge_address: 172.18.10.252/24
|
||||
interface: eth1
|
||||
netmask: 255.255.255.0
|
||||
type: veth
|
||||
tasks:
|
||||
- shell: ip l add {{item.value.bridge}} type bridge
|
||||
with_dict: networks
|
||||
ignore_errors: true
|
||||
- shell: ip l set {{item.value.bridge}} up
|
||||
with_dict: networks
|
||||
- shell: ip a add dev {{item.value.bridge}} {{item.value.bridge_address}}
|
||||
with_dict: networks
|
||||
ignore_errors: true
|
||||
17
resources/container_networks/meta.yaml
Normal file
17
resources/container_networks/meta.yaml
Normal file
@@ -0,0 +1,17 @@
|
||||
id: container_networks
|
||||
handler: ansible_playbook
|
||||
version: 1.0.0
|
||||
actions:
|
||||
input:
|
||||
ip:
|
||||
schema: str!
|
||||
value:
|
||||
ssh_key:
|
||||
schema: str!
|
||||
value:
|
||||
ssh_user:
|
||||
schema: str!
|
||||
value:
|
||||
networks:
|
||||
schema: {}
|
||||
value:
|
||||
Reference in New Issue
Block a user