Last active
April 24, 2019 19:49
-
-
Save samdoran/dc015a9757641bffa81d37cf07118b67 to your computer and use it in GitHub Desktop.
Soft reboot, then hard reboot
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- hosts: lab-centos7 | |
become: yes | |
gather_facts: yes | |
module_defaults: | |
group/cpm: | |
cpm_url: oob.r1.acme.com | |
cpm_username: "{{ vault_cpm_username }}" | |
cpm_password: "{{ vault_cpm_password }}" | |
use_https: yes | |
tasks: | |
- block: | |
- name: Soft reboot a system | |
reboot: | |
rescue: | |
- name: Hard reboot a server | |
cpm_plugcontrol: | |
cpm_action: setplugcontrol | |
plug_id: A7 | |
plug_state: boot | |
delegate_to: localhost | |
become: no | |
- name: Wait for server to come back up | |
wait_for_connection: | |
delay: 60 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment