Portal roles

This commit is contained in:
cfinlay authored and abrown38 committed 2024-08-05 11:39:36 +01:00
1 parent 68a34d516e
commit 5329efdffa
8 files changed
+91

No files matched your search

+2
View File
@@ -0,0 +1,2 @@
- name: Running reboot roles
include_tasks: reboot.yml
+29
View File
@@ -0,0 +1,29 @@
---
- name: Rebooting hosts
ansible.windows.win_reboot:
msg: "rebooting VM, initiated by ansible"
reboot_timeout: 3600
register: status
- name: Delay WinRM
ansible.windows.win_service:
name: WinRM
start_mode: delayed
#- name: Force Openstack Reboot
# openstack.cloud.server_action:
# action: "reboot_hard"
#name: "{{ ansible_hostname }}"
# when: not status | bool
#- name: Delay WinRM
# ansible.windows.win_service:
# name: WinRM
# start_mode: delayed
- name: Logging action
vars:
ansible_connection: local
ansible.builtin.shell:
cmd: echo "Reboot {{ os_project }}-{{ ansible_hostname }} $(date '+%Y-%m-%d %H:%M:%S')" >> /deployments/{{ os_project }}-{{ win_project }}/action.log
delegate_to: localhost