summaryrefslogtreecommitdiffstats
path: root/ansible/test/roles
diff options
context:
space:
mode:
Diffstat (limited to 'ansible/test/roles')
-rw-r--r--ansible/test/roles/prepare-common/tasks/main.yml33
-rw-r--r--ansible/test/roles/prepare-docker-dind/defaults/main.yml3
-rw-r--r--ansible/test/roles/prepare-docker-dind/handlers/main.yml1
3 files changed, 7 insertions, 30 deletions
diff --git a/ansible/test/roles/prepare-common/tasks/main.yml b/ansible/test/roles/prepare-common/tasks/main.yml
index 11dcbe71..909d58c9 100644
--- a/ansible/test/roles/prepare-common/tasks/main.yml
+++ b/ansible/test/roles/prepare-common/tasks/main.yml
@@ -1,31 +1,4 @@
---
-- name: Fetch docker host ip
- block:
- - name: Get docker host ip to access host where container running (as dood)
- shell: |
- set -o pipefail
- ip route | awk '/default/ { print $3 }'
- args:
- executable: /bin/bash
- register: ip
- changed_when: false
-
- - name: "set docker host ip {{ ip.stdout }} for cluster_ip"
- set_fact:
- cluster_ip: "{{ ip.stdout }}"
- when: inventory_hostname != 'localhost'
-
-- name: Set fact for localhost OS
- block:
- - name: set localhost fact
- set_fact:
- localhost_ansible_os_family: "{{ hostvars['localhost'].ansible_os_family }}"
-
- - name: debug
- debug:
- var: localhost_ansible_os_family
- when: hostvars['localhost'].ansible_os_family is defined
-
-- name: debug
- debug:
- var: ansible_os_family \ No newline at end of file
+- name: "Set cluster_ip fact"
+ set_fact:
+ cluster_ip: "{{ ansible_default_ipv4.address }}"
diff --git a/ansible/test/roles/prepare-docker-dind/defaults/main.yml b/ansible/test/roles/prepare-docker-dind/defaults/main.yml
new file mode 100644
index 00000000..2489014e
--- /dev/null
+++ b/ansible/test/roles/prepare-docker-dind/defaults/main.yml
@@ -0,0 +1,3 @@
+---
+# Variable specifying if we should install docker, or only prepare for it
+start_docker: true
diff --git a/ansible/test/roles/prepare-docker-dind/handlers/main.yml b/ansible/test/roles/prepare-docker-dind/handlers/main.yml
index 698e3d3f..cfea7733 100644
--- a/ansible/test/roles/prepare-docker-dind/handlers/main.yml
+++ b/ansible/test/roles/prepare-docker-dind/handlers/main.yml
@@ -3,3 +3,4 @@
name: docker
enabled: true
state: restarted
+ when: start_docker == true