Skip to content

Commit

Permalink
cleaned up testing files and formatted README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Chris Long committed May 11, 2015
1 parent f7db48d commit ca50174
Show file tree
Hide file tree
Showing 14 changed files with 449 additions and 1,551 deletions.
642 changes: 389 additions & 253 deletions README.md

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion args

This file was deleted.

603 changes: 0 additions & 603 deletions library/nmcli-nopre-testcode.py

This file was deleted.

603 changes: 0 additions & 603 deletions library/nmcli.py.working

This file was deleted.

99 changes: 40 additions & 59 deletions playbook-add.yml
Original file line number Diff line number Diff line change
@@ -1,51 +1,39 @@
---
- hosts: controller-01.infra.openstack.eng.rdu2.redhat.com
#- hosts: controller-01.infra.openstack.eng.rdu2.redhat.com
#- hosts: localhost
#- hosts: devops-os-controller
#- hosts: devops-os-storage
#- hosts: devops-os-compute
- hosts: devops-openstack-prod
remote_user: root
tasks:

# - name: try nmcli add team - cname and ifname
# nmcli: name=add cname={{item.cname}} ifname={{item.ifname}} type=team enabled=yes state=present
# - name: install needed network manager libs
# yum: name={{ item }} state=installed
# with_items:
# - { cname: 'cname-test', ifname: 'ifname-test' }
# - { cname: 'cname-pest', ifname: 'ifname-pest' }
## - libnm-qt-devel.x86_64
# - nm-connection-editor.x86_64
# - libsemanage-python
# - policycoreutils-python
# - rsync

# - name: try nmcli add team - cname only
# nmcli: name=add type=team cname={{item.cname}} state=present
# with_items:
# - { cname: 'cname-test'}
# - { cname: 'cname-pest'}

# - name: try nmcli add team - ifname only
# nmcli: name=add type=team ifname=testingifname state=present

# - name: try nmcli add team - no cname or ifname
# nmcli: name=add type=team state=present

# - name: try nmcli add team - cname only & ip
# nmcli: name=add type=team cname={{item.cname}} ip4={{item.ip4}} state=present
# with_items:
# - { cname: 'cname-test', ip4: '192.168.100.1/24'}
# - { cname: 'cname-pest', ip4: '192.168.100.2/24'}

# - name: try nmcli add team - cname only & multiple IP's (doesn't work at this time)
# nmcli: name=add type=team cname={{item.cname}} ip4="{{item.ip4[0]}}" state=present
# with_items:
# - { cname: 'cname-test', ip4: ['192.168.100.1/24', '192.168.100.3']}
# - { cname: 'cname-pest', ip4: ['192.168.100.2/24', '192.168.100.4']}

# tasks:
# - name: try nmcli add team - cname only & ip
# nmcli: name=add type=team cname={{item.cname}} ip4={{item.ip4}} state=present
# with_items:
# - { cname: 'cname-test', ip4: '192.168.100.1/24'}
# - { cname: 'cname-pest', ip4: '192.168.100.2/24'}
##### Working with all cloud nodes - Teaming

###### Working with mods 1
# - name: try nmcli add ethernet - cname only & multiple IP's (doesn't work at this time)
# nmcli: name=add type=ethernet cname={{item.cname}} ip4="{{item.ip4[0]}}" state=present
# with_items:
# - { cname: 'cname-test', ip4: ['192.168.100.1/24', '192.168.100.3']}
# - { cname: 'cname-pest', ip4: ['192.168.100.2/24', '192.168.100.4']}
- name: try nmcli add team - cname only & ip4 gw4
nmcli: type=team cname={{item.cname}} ip4={{item.ip4}} gw4={{item.gw4}} state=present
with_items:
- "{{nmcli_team}}"
##
## - name: try nmcli mod team - quoted dns array state=modify enabled=no
## nmcli: cname={{item.cname}} dns4={{item.dns4}} type=team
## with_items:
## - {cname: 'cname-test', dns4: '"8.8.8.8 8.8.4.4"'}
## - {cname: 'cname-pest', dns4: '"8.8.8.8 8.8.4.4"'}
#
- name: try nmcli add teams-slave
nmcli: type=team-slave cname={{item.cname}} ifname={{item.ifname}} master={{item.master}} state=present
with_items:
- "{{nmcli_team_slave}}"

###### Working with all cloud nodes - Bonding
#
Expand All @@ -54,6 +42,12 @@
# with_items:
# - "{{nmcli_bond}}"
#
## - name: try nmcli mod team - quoted dns array state=modify enabled=no
## nmcli: cname={{item.cname}} dns4={{item.dns4}} type=team
## with_items:
## - {cname: 'cname-test', dns4: '"8.8.8.8 8.8.4.4"'}
## - {cname: 'cname-pest', dns4: '"8.8.8.8 8.8.4.4"'}
#
# - name: try nmcli add bond-slave
# nmcli: type=bond-slave cname={{item.cname}} ifname={{item.ifname}} master={{item.master}} state=present
# with_items:
Expand All @@ -66,21 +60,8 @@
# with_items:
# - "{{nmcli_ethernet}}"


##### Working with all cloud nodes - Teaming

- name: try nmcli add team - cname only & ip4 gw4
nmcli: type=team cname={{item.cname}} ip4={{item.ip4}} gw4={{item.gw4}} state=present
with_items:
- "{{nmcli_team}}"
##
## - name: try nmcli mod team - quoted dns array state=modify enabled=no
## nmcli: cname={{item.cname}} dns4={{item.dns4}} type=team
## with_items:
## - {cname: 'cname-test', dns4: '"8.8.8.8 8.8.4.4"'}
## - {cname: 'cname-pest', dns4: '"8.8.8.8 8.8.4.4"'}
#
- name: try nmcli add teams-slave
nmcli: type=team-slave cname={{item.cname}} ifname={{item.ifname}} master={{item.master}} state=present
with_items:
- "{{nmcli_team_slave}}"
# - name: try nmcli mod Ethernet - quoted dns array state=modify enabled=no
# nmcli: cname={{item.cname}} dns4={{item.dns4}} type=team
# with_items:
# - {cname: 'cname-test', dns4: '"8.8.8.8 8.8.4.4"'}
# - {cname: 'cname-pest', dns4: '"8.8.8.8 8.8.4.4"'}
19 changes: 0 additions & 19 deletions playbook-add.yml.working

This file was deleted.

10 changes: 0 additions & 10 deletions playbook-all.yml

This file was deleted.

23 changes: 20 additions & 3 deletions playbook-del.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
---
- hosts: localhost
#- hosts: controller-01.infra.openstack.eng.rdu2.redhat.com
#- hosts: devops-os-controller
#- hosts: devops-os-storage
#- hosts: devops-os-compute
- hosts: devops-openstack-prod
remote_user: root

tasks:
Expand All @@ -10,5 +14,18 @@
- name: try nmcli del team - multiple
nmcli: cname={{item.cname}} state=absent
with_items:
- { cname: 'cname-test'}
- { cname: 'cname-pest'}
- { cname: 'em1'}
- { cname: 'em2'}
- { cname: 'p1p1'}
- { cname: 'p1p2'}
- { cname: 'p2p1'}
- { cname: 'p2p2'}
- { cname: 'tenant'}
- { cname: 'storage'}
- { cname: 'external'}
- { cname: 'team-em1'}
- { cname: 'team-em2'}
- { cname: 'team-p1p1'}
- { cname: 'team-p1p2'}
- { cname: 'team-p2p1'}
- { cname: 'team-p2p2'}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit ca50174

Please sign in to comment.