diff options
-rw-r--r-- | inventory/group_vars/chaos_at_home_switches/main.yml | 12 | ||||
-rw-r--r-- | inventory/group_vars/dellos6/main.yml | 26 | ||||
-rw-r--r-- | roles/dellos6/bootstrap/templates/init.j2 | 3 | ||||
-rw-r--r-- | roles/dellos6/layer2/tasks/main.yml | 14 |
4 files changed, 21 insertions, 34 deletions
diff --git a/inventory/group_vars/chaos_at_home_switches/main.yml b/inventory/group_vars/chaos_at_home_switches/main.yml index df166186..fb72c9b1 100644 --- a/inventory/group_vars/chaos_at_home_switches/main.yml +++ b/inventory/group_vars/chaos_at_home_switches/main.yml @@ -2,4 +2,14 @@ switch_mgmt_zone: "{{ network_zones.mgmt }}" switch_mgmt_interface: "Gi1/0/28" -switch_network_zones: "{{ network_zones }}" +switch_vlans: "{{ switch_vlans_yaml | from_yaml }}" +switch_vlans_yaml: | + {% for zone_name in network_zones.keys() %} + - name: "{{ zone_name }}" + id: "{{ network_zones[zone_name].vlan }}" + {% endfor %} + +switch_interfaces: "{{ switch_interfaces_yaml | from_yaml }}" +switch_interfaces_yaml: | + - spec: range Gi1/0/1-27 + vlan: {{ network_zones['lan'].vlan }} diff --git a/inventory/group_vars/dellos6/main.yml b/inventory/group_vars/dellos6/main.yml index 0cb2bcda..29c4c0db 100644 --- a/inventory/group_vars/dellos6/main.yml +++ b/inventory/group_vars/dellos6/main.yml @@ -11,27 +11,5 @@ dellos6_mgmt_ipaddr: "{{ switch_mgmt_zone.prefix | ipaddr(switch_mgmt_zone.offse dellos6_mgmt_netmask: "{{ switch_mgmt_zone.prefix | ipaddr('netmask') }}" dellos6_mgmt_interface: "{{ switch_mgmt_interface | default('') }}" - -dellos6_vlans: "{{ dellos6_vlans_yaml | from_yaml }}" -dellos6_vlans_yaml: | - {% for zone_name in switch_network_zones.keys() %} - - name: "{{ zone_name }}" - id: "{{ switch_network_zones[zone_name].vlan }}" - {% endfor %} - -dellos6_interfaces: "{{ dellos6_interfaces_yaml | from_yaml }}" -dellos6_interfaces_yaml: | - - spec: range Gi1/0/5-27 - vlan: 28 - - spec: Te1/0/1 - description: "to sw1" - switchport_mode: trunk - # - spec: range Te1/0/3-4 - # channel_group: 1 - - spec: Po1 - description: "fileserver" - switchport_mode: general - allowed_vlans: - - 28 - - 32 - - 30 +dellos6_vlans: "{{ switch_vlans }}" +dellos6_interfaces: "{{ switch_interfaces }}" diff --git a/roles/dellos6/bootstrap/templates/init.j2 b/roles/dellos6/bootstrap/templates/init.j2 index fa453018..08e4310a 100644 --- a/roles/dellos6/bootstrap/templates/init.j2 +++ b/roles/dellos6/bootstrap/templates/init.j2 @@ -29,6 +29,9 @@ key-string row "{{ ssh_key }}" exit {% endfor %} +no application install hiveagent +no application install SupportAssist + enable password {{ ansible_become_password }} end diff --git a/roles/dellos6/layer2/tasks/main.yml b/roles/dellos6/layer2/tasks/main.yml index a9383e5f..b8bfa968 100644 --- a/roles/dellos6/layer2/tasks/main.yml +++ b/roles/dellos6/layer2/tasks/main.yml @@ -1,13 +1,9 @@ --- -# - name: configure vlans -# dellos6_config: -# src: vlans.j2 -# replace: block -# notify: save configuration - -- pause: - prompt: "\n\n{{ lookup('template', 'interfaces.j2') }}\n\n" - delegate_to: localhost +- name: configure vlans + dellos6_config: + src: vlans.j2 + replace: block + notify: save configuration - name: configure interfaces dellos6_config: |