diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..4b8aa25 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +vault-pass \ No newline at end of file diff --git a/device-cisco-2960-1.yml b/device-cisco-2960-1.yml new file mode 100644 index 0000000..bebdfe5 --- /dev/null +++ b/device-cisco-2960-1.yml @@ -0,0 +1,10 @@ +--- +- hosts: cisco-2960-1.n39.eu + become: true + + tasks: + - name: configure login banner + cisco.ios.ios_banner: + banner: login + text: "Documentation here: https://wiki.netz39.de/internal:inventory:network:2960s-24td-l" + state: present diff --git a/host_vars/cisco-2960-1.n39.eu/vars.yml b/host_vars/cisco-2960-1.n39.eu/vars.yml index 4b61e5a..70c3870 100644 --- a/host_vars/cisco-2960-1.n39.eu/vars.yml +++ b/host_vars/cisco-2960-1.n39.eu/vars.yml @@ -1,7 +1,8 @@ --- ansible_host: 172.23.63.45 ansible_user: admin -ansible_password: {{ vault_ansible_password }} +ansible_password: "{{ vault_ansible_password }}" +ansible_become_password: "{{ vault_ansible_password }}" ansible_connection: network_cli ansible_network_os: ios vlans: diff --git a/switch-cisco-2960s.yml b/switch-cisco-2960s.yml deleted file mode 100644 index a78cee3..0000000 --- a/switch-cisco-2960s.yml +++ /dev/null @@ -1,26 +0,0 @@ ---- -- 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 }}" \ No newline at end of file