diff options
| author | Patrick Uiterwijk <puiterwijk@redhat.com> | 2017-07-14 02:53:27 +0000 |
|---|---|---|
| committer | Patrick Uiterwijk <puiterwijk@redhat.com> | 2017-07-14 02:53:27 +0000 |
| commit | 1bf3eacc7cb2629314f2517533b1147472105ab3 (patch) | |
| tree | 2ddfe3ebf17a968b743e40b9d62ddad268db2a31 /roles/base | |
| parent | 0aed9bd0052099ec17c513ddf5b716aa9852c202 (diff) | |
| download | ansible-1bf3eacc7cb2629314f2517533b1147472105ab3.tar.gz ansible-1bf3eacc7cb2629314f2517533b1147472105ab3.tar.xz ansible-1bf3eacc7cb2629314f2517533b1147472105ab3.zip | |
Teach ansible about the enc900 interface on s390
Signed-off-by: Patrick Uiterwijk <puiterwijk@redhat.com>
Diffstat (limited to 'roles/base')
| -rw-r--r-- | roles/base/tasks/main.yml | 2 | ||||
| -rw-r--r-- | roles/base/templates/ifcfg.j2 | 7 |
2 files changed, 7 insertions, 2 deletions
diff --git a/roles/base/tasks/main.yml b/roles/base/tasks/main.yml index 4e5832743..2b21e1663 100644 --- a/roles/base/tasks/main.yml +++ b/roles/base/tasks/main.yml @@ -80,7 +80,7 @@ # - restart NetworkManager - reload NetworkManager-connections - apply interface-changes - when: (virthost is not defined) and (item.startswith(('eth','br'))) and (hostvars[inventory_hostname]['ansible_' + item.replace('-','_')]['type'] == 'ether') and (ansible_distribution_major_version|int >=7) and hostvars[inventory_hostname]['ansible_' + item.replace('-','_')]['active'] and nmclitest|success and ( not ansible_ifcfg_blacklist ) and ( ansible_ifcfg_whitelist is not defined or item in ansible_ifcfg_whitelist ) + hen: (virthost is not defined) and (item.startswith(('eth','br','enc'))) and (hostvars[inventory_hostname]['ansible_' + item.replace('-','_')]['type'] == 'ether') and (ansible_distribution_major_version|int >=7) and hostvars[inventory_hostname]['ansible_' + item.replace('-','_')]['active'] and nmclitest|success and ( not ansible_ifcfg_blacklist ) and ( ansible_ifcfg_whitelist is not defined or item in ansible_ifcfg_whitelist ) tags: - config - ifcfg diff --git a/roles/base/templates/ifcfg.j2 b/roles/base/templates/ifcfg.j2 index 0c4cffa7d..1a1ae4b70 100644 --- a/roles/base/templates/ifcfg.j2 +++ b/roles/base/templates/ifcfg.j2 @@ -1,7 +1,12 @@ NAME="{{item}}" BOOTPROTO="none" NM_CONTROLLED=yes -{% if item == "eth0" %} +{% if item == "enc900" %} +SUBCHANNELS="0.0.0900,0.0.0901,0.0.0902" +NETTYPE="qeth" +OPTIONS="layer2=1 portno=0" +{% endif %} +{% if item == "eth0" or item == "enc900" %} GATEWAY="{{gw}}" {% endif %} HWADDR="{{ hostvars[inventory_hostname]['ansible_' + item]['macaddress']|upper }}" |
