-
Notifications
You must be signed in to change notification settings - Fork 15
Added IPv4 and other related playbooks #34
base: master
Are you sure you want to change the base?
Conversation
Test commit, more to come later!
ShyamsundarR
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Attention @bennyturns
| @@ -0,0 +1,12 @@ | |||
| # Standards: 1.7 | |||
| --- | |||
| - hosts: servers | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These are independent plays, not a role yet, can you change that!
ShyamsundarR
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bennyturns updated my review comments, take a look and we can discuss further.
| --- | ||
| - hosts: servers | ||
| tasks: | ||
| - name: Configures the first 10G nic with an active link |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This comment talks about plumbing this into the playbook:
- So, currently this is run as an independent play, which would need to be integrated to the global playbook and roles (site.yml and possibly the common role)
- This configuration is setup specific, which means a setup-profile declares intent that it needs an IPv4 address configured with said parameters
- The above part of the plumbing is achieved, by adding a variable to each host in the setup-profile (for such a setup), lets use the same naming convention as the IPoIB and call this, "confipv4addr" (so this will be of the form confipv4addr:
- The presence of this variable should trigger the configuration play setup_10g_nic.yaml, which can be achieved using a similar pattern to the check, https://github.com/gluster/gbench/blob/master/ansible-playbook-base/roles/common/tasks/main.yml#L16
The above would complete the required plumbing to run this play as part of the playbook, when a setup deals with only IPv4 addresses, and needs one setup for it.
| echo "ONBOOT=yes" >> /etc/sysconfig/network-scripts/ifcfg-${MY_NIC} | ||
| echo "TYPE=Ethernet" >> /etc/sysconfig/network-scripts/ifcfg-${MY_NIC} | ||
| echo "PREFIX=24" >> /etc/sysconfig/network-scripts/ifcfg-${MY_NIC} | ||
| echo "IPADDR=${MY_IP}" >> /etc/sysconfig/network-scripts/ifcfg-${MY_NIC} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
MY_IP here would be replaced with the variable confipv4addr when defined in the setup-profile, like,
https://github.com/gluster/gbench/blob/master/ansible-playbook-base/roles/common/tasks/ipv4oib.yml#L8
| - name: Ping test new IP | ||
| shell: | | ||
| vgremove -f `vgs --noheadings -o vg_name | egrep -v "vg_rhsauto|vg_storageqe|TestVolume001" | tr '\n' ' '` | ||
| pvremove -ff -y `pvs --noheadings -o pv_name | egrep -v "vda|sda" | tr '\n' ' '` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Assume above 2 lines will be removed, as they are not a part of this play.
| @@ -0,0 +1,12 @@ | |||
| --- | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not clear what this play does. I assume each server should have its hosts file updated with the others. I would suggest we use ansible templates and copy them over to the servers, than running a script.
Also if you can let me know what the variables are, and where they come from, we can talk about how to plumb them as well through ansible variables.
Test commit, more to come later!