summaryrefslogtreecommitdiff
path: root/roles
diff options
context:
space:
mode:
authorChristian Pointner <equinox@spreadspace.org>2019-05-25 02:41:17 +0200
committerChristian Pointner <equinox@spreadspace.org>2019-05-25 02:41:17 +0200
commitf78431887542cd8c2184d47e0eb1fa89f5b340e9 (patch)
tree2806204a05c97a040a5da91497dfea732828cdfc /roles
parentmake output of some loops nicer (diff)
fix cloud-install role
Diffstat (limited to 'roles')
-rw-r--r--roles/cloud-install/tasks/install_hcloud.yml2
-rw-r--r--roles/cloud-install/tasks/install_hroot.yml2
-rw-r--r--roles/cloud-install/tasks/main.yml4
-rw-r--r--roles/cloud-install/templates/hetzner_postinst.sh.j22
4 files changed, 4 insertions, 6 deletions
diff --git a/roles/cloud-install/tasks/install_hcloud.yml b/roles/cloud-install/tasks/install_hcloud.yml
index a4c61c0f..455d832e 100644
--- a/roles/cloud-install/tasks/install_hcloud.yml
+++ b/roles/cloud-install/tasks/install_hcloud.yml
@@ -22,7 +22,7 @@
- name: do not continue in check mode
fail:
msg: "can not bootstrap new servers in check mode"
- when: ansible_check_mode
+ when: ansible_check_mode | bool
check_mode: no
### TODO: for now we add all ssh keys that are installed for this project - this might not be a good idea!
diff --git a/roles/cloud-install/tasks/install_hroot.yml b/roles/cloud-install/tasks/install_hroot.yml
index 6d4d6017..1a8aeeaf 100644
--- a/roles/cloud-install/tasks/install_hroot.yml
+++ b/roles/cloud-install/tasks/install_hroot.yml
@@ -14,7 +14,7 @@
- name: do not continue in check mode
fail:
msg: "can not bootstrap new servers in check mode"
- when: ansible_check_mode
+ when: ansible_check_mode | bool
check_mode: no
- block:
diff --git a/roles/cloud-install/tasks/main.yml b/roles/cloud-install/tasks/main.yml
index ef6d42ae..94265382 100644
--- a/roles/cloud-install/tasks/main.yml
+++ b/roles/cloud-install/tasks/main.yml
@@ -1,6 +1,5 @@
---
- include_tasks: "{{ item }}"
- static: no
with_first_found:
- files:
- "install_{{ cloud_provider }}.yml"
@@ -9,8 +8,7 @@
setup:
- include_tasks: "{{ item }}"
- static: no
with_first_found:
- files:
- "post_{{ cloud_provider }}.yml"
- skip: True
+ skip: true
diff --git a/roles/cloud-install/templates/hetzner_postinst.sh.j2 b/roles/cloud-install/templates/hetzner_postinst.sh.j2
index 2835b477..0061677d 100644
--- a/roles/cloud-install/templates/hetzner_postinst.sh.j2
+++ b/roles/cloud-install/templates/hetzner_postinst.sh.j2
@@ -4,7 +4,7 @@ set -euf -o pipefail
export DEBIAN_FRONTEND=noninteractive
apt-get update -q
apt-get full-upgrade -y -q
-apt-get install -y -q --no-install-recommends openssh-server python
+apt-get install -y -q --no-install-recommends openssh-server python python-apt
passwd -d root && passwd -l root
{% if install_distro == "debian" %}