From 9335abc2159541564461a27103dd418eaf56f962 Mon Sep 17 00:00:00 2001 From: Vlad R Date: Mon, 27 Jun 2022 20:28:01 +0100 Subject: [PATCH] Housekeeping - removed the 'ubuntu_linux' folder as it was redundant --- {linux_ubuntu => dnaclab_linux}/ansible.cfg | 0 {linux_ubuntu => dnaclab_linux}/prestage.yml | 0 dnaclab_linux/reboot.yml | 26 +++++++++++++------- linux_ubuntu/inventory.yml | 4 --- linux_ubuntu/reboot.yml | 22 ----------------- linux_ubuntu/roles/common/vars/main.yml | 25 ------------------- 6 files changed, 17 insertions(+), 60 deletions(-) rename {linux_ubuntu => dnaclab_linux}/ansible.cfg (100%) rename {linux_ubuntu => dnaclab_linux}/prestage.yml (100%) delete mode 100644 linux_ubuntu/inventory.yml delete mode 100644 linux_ubuntu/reboot.yml delete mode 100644 linux_ubuntu/roles/common/vars/main.yml diff --git a/linux_ubuntu/ansible.cfg b/dnaclab_linux/ansible.cfg similarity index 100% rename from linux_ubuntu/ansible.cfg rename to dnaclab_linux/ansible.cfg diff --git a/linux_ubuntu/prestage.yml b/dnaclab_linux/prestage.yml similarity index 100% rename from linux_ubuntu/prestage.yml rename to dnaclab_linux/prestage.yml diff --git a/dnaclab_linux/reboot.yml b/dnaclab_linux/reboot.yml index 3f0b477..dc283c1 100644 --- a/dnaclab_linux/reboot.yml +++ b/dnaclab_linux/reboot.yml @@ -1,14 +1,22 @@ --- -- name: Reboot the Ubuntu VMs +- name: Reboots linux host and checks status hosts: all - gather_facts: no - roles: + roles: - common become: yes - + tasks: - - - name: Rebooting... - reboot: - msg: "Reboot initiated by Ansible" - test_command: uptime + + - name: Rebooting... + reboot: + reboot_timeout: 60 + msg: Reboot issued by Ansible + test_command: whoami + + - name: Send Webex Teams message via BOT to confirm playbook completion + community.general.cisco_webex: + recipient_type: toPersonEmail + recipient_id: "{{ webex_id }}" + msg_type: markdown + personal_token: "{{ webex_token }}" + msg: "**Host {{ inventory_hostname }} has successfully rebooted.**" \ No newline at end of file diff --git a/linux_ubuntu/inventory.yml b/linux_ubuntu/inventory.yml deleted file mode 100644 index 5180ecd..0000000 --- a/linux_ubuntu/inventory.yml +++ /dev/null @@ -1,4 +0,0 @@ -all: - hosts: - 172.16.1.112: - 10.221.0.104: \ No newline at end of file diff --git a/linux_ubuntu/reboot.yml b/linux_ubuntu/reboot.yml deleted file mode 100644 index dc283c1..0000000 --- a/linux_ubuntu/reboot.yml +++ /dev/null @@ -1,22 +0,0 @@ ---- -- name: Reboots linux host and checks status - hosts: all - roles: - - common - become: yes - - tasks: - - - name: Rebooting... - reboot: - reboot_timeout: 60 - msg: Reboot issued by Ansible - test_command: whoami - - - name: Send Webex Teams message via BOT to confirm playbook completion - community.general.cisco_webex: - recipient_type: toPersonEmail - recipient_id: "{{ webex_id }}" - msg_type: markdown - personal_token: "{{ webex_token }}" - msg: "**Host {{ inventory_hostname }} has successfully rebooted.**" \ No newline at end of file diff --git a/linux_ubuntu/roles/common/vars/main.yml b/linux_ubuntu/roles/common/vars/main.yml deleted file mode 100644 index 3281d06..0000000 --- a/linux_ubuntu/roles/common/vars/main.yml +++ /dev/null @@ -1,25 +0,0 @@ -$ANSIBLE_VAULT;1.1;AES256 -64393466643139323164303532333865626432353430346466643432613664363962666137373861 -3138323435393937373239386136626436346462383965630a376366316130376631633339636531 -39643138323166313131313533643662363731316532633664326634373434356338343533653866 -6234346535343362390a393666626362313763346362663837376664663762656339393430353132 -64313164323630363637353230643834303164333665376437623235613264363965623530666236 -61643430333861376334373061643239386566316561373531333862626163386261643636313531 -39616637306466636462323337393239653135633962623965346134623262613236366438336264 -38326265666363643166363565636534633061643165646239663565363434323561633235353663 -65306636333664666361396638613634353166313430646462623633306239376331303066656536 -65623939306564613037613263343537623933653761303139323033633066393665393236366635 -36316462643231363832303233316461643330346435326263666337363435333833656632656231 -39636638313336613135653830396262366330636266653333336433316637626634306236393033 -65313061303066643566306133663830633136366633303665633332613432616237373161613338 -65643266336330393936663461386464386262323638343365313136326137373661363161633730 -30323630363038636462653737386232343562376433646435663335376562346466313863656330 -34363731636163396465653830303263393937633332333937633434343732343234386536653832 -31663535333732363736656138663163333861376365333632656266626161616166373537623166 -35626161383336333835336364653135356437353535373765383337326261303037373964356330 -33346264343736663866363639363766373435363137326638366636613464636637666432333331 -33383238323537656565393066373034346664396339366564343261643765343865353361393961 -34633538653333343234366332613739383738306462366139666537343965613465623236333733 -34656239393537656532383061383861623235323664663837356137333736316132383334363138 -37643363333636303935373461653436333436323439323662373731383536383662353637383664 -32366363333437323161