summaryrefslogtreecommitdiff
path: root/roles/cloud
diff options
context:
space:
mode:
authorChristian Pointner <equinox@spreadspace.org>2020-03-19 01:45:44 +0100
committerChristian Pointner <equinox@spreadspace.org>2020-03-19 01:45:44 +0100
commit4e471508825a90b8dbf42086232ad855bc5ceda0 (patch)
tree7bcb8761db4d63275ae552241798ce3dd7c0bb5d /roles/cloud
parentkubernetes: some more harmonization (diff)
cleanup cloud install a little
Diffstat (limited to 'roles/cloud')
-rw-r--r--roles/cloud/install/tasks/hetzner_installimage.yml6
-rw-r--r--roles/cloud/install/tasks/hroot.yml5
2 files changed, 5 insertions, 6 deletions
diff --git a/roles/cloud/install/tasks/hetzner_installimage.yml b/roles/cloud/install/tasks/hetzner_installimage.yml
index c2b8f89d..19f3a16f 100644
--- a/roles/cloud/install/tasks/hetzner_installimage.yml
+++ b/roles/cloud/install/tasks/hetzner_installimage.yml
@@ -27,11 +27,11 @@
args:
chdir: /root
-- name: "print installimage output"
+- name: print installimage output
debug:
msg: "{{ hetzner_installimage_cmd.stdout_lines + hetzner_installimage_cmd.stderr_lines }}"
-- name: "check if installimage succeeded"
+- name: check if installimage succeeded
fail:
- msg: "failed to run installimage"
+ msg: failed to run installimage
when: "hetzner_installimage_cmd.rc != 0 or 'postinst.sh finished successfully' not in hetzner_installimage_cmd.stdout_lines"
diff --git a/roles/cloud/install/tasks/hroot.yml b/roles/cloud/install/tasks/hroot.yml
index 3d7ba36b..9124f44a 100644
--- a/roles/cloud/install/tasks/hroot.yml
+++ b/roles/cloud/install/tasks/hroot.yml
@@ -17,7 +17,8 @@
when: ansible_check_mode | bool
check_mode: no
-- block:
+- when: hetzner_main_ip is not defined
+ block:
- name: retrieve server list from robot
uri:
url: "https://robot-ws.your-server.de/server"
@@ -34,8 +35,6 @@
set_fact:
hetzner_main_ip: "{{ servers.json | hroot_extract_serverip(install_cooked.cloud.server_name | default(inventory_hostname)) }}"
- when: hetzner_main_ip is not defined
-
- name: display warning message
pause:
prompt: |