From fd5ad39a760a62a4f9ccae1ed71e5cec5a7ac396 Mon Sep 17 00:00:00 2001 From: Kris Lamoureux Date: Tue, 30 Jun 2020 01:16:46 -0400 Subject: [PATCH] Allow toggle of host reboots and add defaults --- dev/host_vars/dockerbox.yml | 1 + roles/base/defaults/main.yml | 3 ++- roles/base/handlers/main.yml | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/dev/host_vars/dockerbox.yml b/dev/host_vars/dockerbox.yml index d439b5e..1b609f2 100644 --- a/dev/host_vars/dockerbox.yml +++ b/dev/host_vars/dockerbox.yml @@ -1,4 +1,5 @@ # base +allow_reboot: false manage_network: false network_type: static ip_inter: eth1 diff --git a/roles/base/defaults/main.yml b/roles/base/defaults/main.yml index 265c90c..bcb8261 100644 --- a/roles/base/defaults/main.yml +++ b/roles/base/defaults/main.yml @@ -1 +1,2 @@ -network_type: static +manage_network: false +allow_reboot: true diff --git a/roles/base/handlers/main.yml b/roles/base/handlers/main.yml index 1b3ed92..9d9c0c9 100644 --- a/roles/base/handlers/main.yml +++ b/roles/base/handlers/main.yml @@ -3,3 +3,4 @@ msg: "Reboot initiated by Ansible" connect_timeout: 5 listen: reboot_host + when: allow_reboot