--- - hosts: cisco-catalyst-2960s.n39.eu tasks: - name: configure login banner cisco.ios.ios_banner: banner: login text: welcome to cisco-catalyst-2960s state: present - name: set hostname cisco.ios.ios_hostname: config: hostname: cisco-catalyst-2960s state: override - name: configure vlans cisco.ios.ios_vlans: config: - name: {{ item.name }} vlan_id: {{ item.id }} state: active shutdown: disabled remote_span: true state: merged loop: "{{ vlans | dict2items }}"