network/roles/access/tasks/main.yml

8 lines
379 B
YAML
Raw Normal View History

2023-12-18 10:22:14 +00:00
- name: Set configuration
ansible.netcommon.cli_config:
config: "{{ lookup('template', 'config.j2') }}"
register: result
# These lines are not displayed by 'sho ru' and always reported as different, so ignore them.
changed_when: result.commands | reject('match', '^(no shutdown|no switchport access vlan|switchport mode hybrid|interface .*)$')
notify: write config