Add container_networks, ssh_key and vxlan_mesh resources

This commit is contained in:
Dmitry Shulyak
2015-08-03 18:04:54 +03:00
parent 88f2ba4725
commit 418066b827
6 changed files with 113 additions and 0 deletions

View 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

View 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: