Tidy-up + added new dev-k8s environment to inventory

This commit is contained in:
Vlad R 2023-06-18 19:32:36 +00:00
parent e319b004c9
commit 029e30e828
7 changed files with 12 additions and 93 deletions

View File

@ -1,19 +0,0 @@
$ANSIBLE_VAULT;1.1;AES256
32353864313261346632336363373830643332303964323331346636333034663531646636313737
3161656564643166346138643232326431323335323834340a336634323365376633323938613865
66663464313534633339303231353636333661363266336131383463613261373563633162303065
3862326433316265320a393466356266633464313165383330666237323737633865643763383665
63613932353263626531306431373833333666396361633039633363383864653637353161323230
33643234323864373434306131376235393363306334303036366232633436643663656139323562
65316261383939343363363962623434636239376139336366636166313931393461623863633230
38373232303666323661343934313732323865626464383965316562656436666265363939366265
64363734663532643636363231373432336435343334633233633236383937363561343334346166
30663039353034653066663434633036623563663931333063663337343531626633316263383630
39373163303764366533666538393438643764643936636430366334316232323734353561376436
31613136363631636662376339393034613831663530373939656236313264373465623930323431
36303532616466323031623937333234373938333266393862356639363338316563316462633662
61333436323431613266623235343637666435613661636465666538326437333461633664643137
66643636313538633165326137383064303331353336636265616265656164623439306562626366
35613135393564636562373863653762613130613365653837306539386431383831623133623961
62356664333731386336323831346236343466346665613264636630646130346366653237313363
3437303231326335646361383131313339643763303130626439

View File

@ -1,26 +0,0 @@
---
- name: DNAC test playbook - retrieves hostname, MGMT IP and SN for devices in the inventory and displays them
hosts: all
vars_files:
- credentials.yml
gather_facts: no
tasks:
- name: Get network device list
cisco.dnac.network_device_info:
dnac_host: "{{ dnac_host }}"
dnac_username: "{{ dnac_username }}"
dnac_password: "{{ dnac_password }}"
dnac_verify: "{{ dnac_verify }}"
dnac_port: "{{ dnac_port }}"
dnac_version: "{{ dnac_version }}"
dnac_debug: "{{ dnac_debug }}"
register: result
- name: Print device info
ansible.builtin.debug:
msg: "Device {{ item['hostname'] }} is reachable on {{ item['managementIpAddress'] }} and has SN {{ item['serialNumber'] }}"
loop: "{{ result['dnac_response']['response'] }}"
loop_control:
label: result

View File

@ -1,4 +0,0 @@
---
all:
hosts:
dnac.dnaclab.net:

View File

@ -1,41 +0,0 @@
---
- name: DNAC test playbook - retrieves hostname, MGMT IP and SN for devices in the inventory and displays them
hosts: all
vars_files:
- credentials.yml
gather_facts: no
tasks:
- name: Get all Site
cisco.dnac.site_info:
dnac_host: "{{dnac_host}}"
dnac_username: "{{dnac_username}}"
dnac_password: "{{dnac_password}}"
dnac_verify: "{{dnac_verify}}"
dnac_port: "{{dnac_port}}"
dnac_version: "{{dnac_version}}"
dnac_debug: "{{dnac_debug}}"
register: sda_sites
- name: Print 1
ansible.builtin.debug:
msg: "{{ sda_sites['dnac_response']['response'][1]['siteNameHierarchy'] }}"
- name: Get network device list
cisco.dnac.sda_virtual_network_info:
dnac_host: "{{ dnac_host }}"
dnac_username: "{{ dnac_username }}"
dnac_password: "{{ dnac_password }}"
dnac_verify: "{{ dnac_verify }}"
dnac_port: "{{ dnac_port }}"
dnac_version: "{{ dnac_version }}"
dnac_debug: "{{ dnac_debug }}"
virtualNetworkName: CORP_VN
# siteNameHierarchy: "{{ sda_sites['dnac_response']['response'][1]['siteNameHierarchy'] }}"
register: result
- name: Print 2
ansible.builtin.debug:
msg: "{{ result }}"

View File

@ -18,3 +18,12 @@ all:
staging:
hosts:
10.221.0.105:
developer2:
hosts:
10.221.0.125:
kubernetes-dev:
hosts:
172.16.1.130:
172.16.1.131:
172.16.1.132:
172.16.1.133:

View File

@ -1,6 +1,6 @@
---
- name: Prestage server(s) with the NCA Automation team users
hosts: staging
hosts: kubernetes-dev
roles:
- ncafsa-users
become: yes
@ -17,4 +17,4 @@
shell: "/bin/bash"
group: "sudo"
password: "{{ item.value }}"
loop: "{{ lookup('dict', users) }}"
loop: "{{ lookup('dict', users) }}"

View File

@ -1,6 +1,6 @@
---
- name: Update and upgrade packages on Ubuntu VMs
hosts: all_servers
hosts: kubernetes-dev
become: yes
vars_files:
- global_vars/main.yml