CHanged some ansible modules due to them going obsolete in 2024

This commit is contained in:
Vlad Raducanu 2022-06-24 11:17:41 +01:00
parent 16be188fff
commit 0cfa584471
3 changed files with 28 additions and 19 deletions

View File

@ -15,6 +15,9 @@
gather_subset: all gather_subset: all
register: current_config register: current_config
- debug:
msg: "ANSIBLE-{{ current_config.ansible_facts.ansible_net_model }}"
- name: Print device identity info - name: Print device identity info
debug: debug:
msg: "{{ current_config.ansible_facts.ansible_net_hostname }} is reachable and the OS is {{ current_config.ansible_facts.ansible_net_version }}. SN is {{ current_config.ansible_facts.ansible_net_serialnum }}. Model is {{current_config.ansible_facts.ansible_net_model }}" msg: "{{ current_config.ansible_facts.ansible_net_hostname }} is reachable and the OS is {{ current_config.ansible_facts.ansible_net_version }}. SN is {{ current_config.ansible_facts.ansible_net_serialnum }}. Model is {{current_config.ansible_facts.ansible_net_model }}"

View File

@ -3,7 +3,7 @@
## The only requirement is a working SSH connection to the device ## The only requirement is a working SSH connection to the device
- name: Configure essential features on IOS-XE device - name: Configure essential features on IOS-XE device
hosts: homekit hosts: baguleykit
gather_facts: false gather_facts: false
connection: network_cli connection: network_cli
roles: roles:
@ -38,7 +38,7 @@
text: | text: |
|--------------------------------------------------------------------------| |--------------------------------------------------------------------------|
|This device is managed, supported and it's configuration owned by the | |This device is managed, supported and it's configuration owned by the |
|Virgin Media Business Data Services team in England | |Virgin Media Business Near Core Activations team in England |
|--------------------------------------------------------------------------| |--------------------------------------------------------------------------|
state: present state: present
@ -47,30 +47,36 @@
banner: motd banner: motd
text: | text: |
Welcome! Welcome to the Near Core Activations network infrastructure!
state: present state: present
- name: Configuring NTP servers - name: Configuring NTP servers
ios_ntp: cisco.ios.ios_ntp_global:
server: 1.uk.pool.ntp.org config:
logging: yes logging: true
state: present servers:
- server: uk.pool.ntp.org
version: 2
state: merged
- name: Configuring logging levels - name: Configuring logging levels
ios_logging: cisco.ios.ios_logging_global:
aggregate: config:
- {dest: buffered, level: notifications, size: 10000} buffered:
- {dest: console, level: debugging} severity: notifications
state: present size: 8096
console:
severity: errors
state: merged
- name: Configuring hostname and domain settings - name: Configuring hostname and domain settings
ios_system: ios_system:
hostname: ThinkPad-CSRv hostname: "ANSIBLE-{{ current_config.ansible_facts.ansible_net_model }}"
domain_name: ThinkPad-CSRv.vladlab.local domain_name: siplab.net
lookup_enabled: no lookup_enabled: yes
name_servers: name_servers:
- 192.168.1.1 - 10.30.10.250
- 8.8.8.8 - 8.8.8.8
- name: Configuring user account for automation jobs - name: Configuring user account for automation jobs

View File

@ -1,6 +1,6 @@
baguleykit: baguleykit:
hosts: hosts:
172.16.1.175: 10.11.245.1:
homekit: homekit:
hosts: hosts: