From 57a7e5fea87235e6ec51188cb9014abdd2b1db73 Mon Sep 17 00:00:00 2001 From: Robert de Bock Date: Aug 05 2018 06:13:05 +0000 Subject: Adding a "wait for host" variable. --- diff --git a/README.md b/README.md index 8d3b7f2..fb3d187 100644 --- a/README.md +++ b/README.md @@ -38,6 +38,7 @@ Role Variables - bootstrap_preview: Should extra software be installed to support all modules in the "preview" state? This can be set to either "yes", "no" or unset. The default (set in defaults/main.yml) is set to "yes". +- boostrap_wait_for_host: Should the bootstrap role wait for the host to be available. Default is "yes", but for debugging with for example Vagrant, toruning it off can help. Dependencies ------------ diff --git a/defaults/main.yml b/defaults/main.yml index 8e1bddc..4cedd43 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -7,3 +7,6 @@ bootstrap_user: root # Installed software to support modules flagged as "preview" (i.e. mysql_db). # "yes", "no" or unset are valid. bootstrap_preview: yes + +# Do you want to wait for the host to be available? +boostrap_wait_for_host: yes diff --git a/tasks/.main.yml.swp b/tasks/.main.yml.swp deleted file mode 100644 index 03c0ee8..0000000 Binary files a/tasks/.main.yml.swp and /dev/null differ diff --git a/tasks/main.yml b/tasks/main.yml index ea587a0..163ecfb 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -9,6 +9,7 @@ - inventory_hostname is defined - ansible_connection is defined - ansible_connection != "docker" + - boostrap_wait_for_host == true - name: register apk raw: apk --version