diff --git a/ansible/physical-network.yml b/ansible/physical-network.yml index c4a5923a5..565ecbd71 100644 --- a/ansible/physical-network.yml +++ b/ansible/physical-network.yml @@ -26,7 +26,6 @@ - role: ssh-known-host - role: dell-switch - dell_switch_delegate_to: localhost dell_switch_type: "{{ switch_type }}" dell_switch_provider: "{{ switch_dellos_provider }}" dell_switch_config: "{{ switch_config }}" @@ -39,7 +38,6 @@ - role: ssh-known-host - role: junos-switch - junos_switch_delegate_to: localhost junos_switch_type: "{{ switch_type }}" junos_switch_provider: "{{ switch_junos_provider }}" junos_switch_config_format: "{{ switch_junos_config_format }}" diff --git a/ansible/roles/dell-switch/defaults/main.yml b/ansible/roles/dell-switch/defaults/main.yml index c36b4915f..07bec1a39 100644 --- a/ansible/roles/dell-switch/defaults/main.yml +++ b/ansible/roles/dell-switch/defaults/main.yml @@ -1,7 +1,4 @@ --- -# Host on which to execute DellOS Ansible modules. -dell_switch_delegate_to: - # Type of Dell switch. One of dellos6, dellos9. dell_switch_type: diff --git a/ansible/roles/dell-switch/tasks/main.yml b/ansible/roles/dell-switch/tasks/main.yml index c48450b94..45ee2a079 100644 --- a/ansible/roles/dell-switch/tasks/main.yml +++ b/ansible/roles/dell-switch/tasks/main.yml @@ -1,14 +1,14 @@ --- - name: Ensure DellOS6 switches are configured - dellos6_config: + local_action: + module: dellos6_config provider: "{{ dell_switch_provider }}" src: dellos6-config.j2 - delegate_to: "{{ dell_switch_delegate_to }}" when: "{{ dell_switch_type == 'dellos6' }}" - name: Ensure DellOS9 switches are configured - dellos9_config: + local_action: + module: dellos9_config provider: "{{ dell_switch_provider }}" src: dellos9-config.j2 - delegate_to: "{{ dell_switch_delegate_to }}" when: "{{ dell_switch_type == 'dellos9' }}" diff --git a/ansible/roles/junos-switch/defaults/main.yml b/ansible/roles/junos-switch/defaults/main.yml index 33f0674ed..09da1a600 100644 --- a/ansible/roles/junos-switch/defaults/main.yml +++ b/ansible/roles/junos-switch/defaults/main.yml @@ -1,7 +1,4 @@ --- -# Host on which to execute Junos Ansible modules. -junos_switch_delegate_to: - # Authentication provider information. junos_switch_provider: diff --git a/ansible/roles/junos-switch/tasks/main.yml b/ansible/roles/junos-switch/tasks/main.yml index 8f5ce0153..63b4b7009 100644 --- a/ansible/roles/junos-switch/tasks/main.yml +++ b/ansible/roles/junos-switch/tasks/main.yml @@ -27,11 +27,11 @@ become: "{{ lookup('env', 'VIRTUAL_ENV') == None }}" - name: Ensure Juniper switches are configured - junos_config: + local_action: + module: junos_config provider: "{{ junos_switch_provider }}" src: "{{ junos_switch_src }}" src_format: "{{ junos_switch_config_format }}" - delegate_to: "{{ junos_switch_delegate_to }}" vars: junos_switch_config_format_to_src: set: junos-config-set.j2