summaryrefslogtreecommitdiffstats
path: root/ansible
diff options
context:
space:
mode:
Diffstat (limited to 'ansible')
-rw-r--r--ansible/roles/rancher/molecule/default/playbook.yml1
-rw-r--r--ansible/roles/rancher/tasks/rancher_agent.yml2
-rw-r--r--ansible/test/roles/prepare-docker-dind/defaults/main.yml2
-rw-r--r--ansible/test/roles/prepare-docker-dind/tasks/main.yml1
-rw-r--r--ansible/test/roles/prepare-docker-dind/vars/main.yml3
5 files changed, 6 insertions, 3 deletions
diff --git a/ansible/roles/rancher/molecule/default/playbook.yml b/ansible/roles/rancher/molecule/default/playbook.yml
index 436f2ff4..afdbb4af 100644
--- a/ansible/roles/rancher/molecule/default/playbook.yml
+++ b/ansible/roles/rancher/molecule/default/playbook.yml
@@ -10,6 +10,7 @@
- name: Converge rancher agent
hosts: kubernetes
roles:
+ - prepare-common
- role: rancher
vars:
mode: agent
diff --git a/ansible/roles/rancher/tasks/rancher_agent.yml b/ansible/roles/rancher/tasks/rancher_agent.yml
index 73d9a642..e54d760e 100644
--- a/ansible/roles/rancher/tasks/rancher_agent.yml
+++ b/ansible/roles/rancher/tasks/rancher_agent.yml
@@ -4,6 +4,8 @@
name: rancher_agent
image: "{{ server_hostvars.rancher_agent_image }}"
command: "{{ server_hostvars.rancher_agent_reg_url }}"
+ env:
+ CATTLE_AGENT_IP: "{{ cluster_ip }}"
volumes:
- "/var/run/docker.sock:/var/run/docker.sock"
- "/var/lib/rancher:/var/lib/rancher"
diff --git a/ansible/test/roles/prepare-docker-dind/defaults/main.yml b/ansible/test/roles/prepare-docker-dind/defaults/main.yml
index 2489014e..147a828a 100644
--- a/ansible/test/roles/prepare-docker-dind/defaults/main.yml
+++ b/ansible/test/roles/prepare-docker-dind/defaults/main.yml
@@ -1,3 +1,5 @@
---
# Variable specifying if we should install docker, or only prepare for it
start_docker: true
+#The version of docker to install
+docker_version: 18.09.5
diff --git a/ansible/test/roles/prepare-docker-dind/tasks/main.yml b/ansible/test/roles/prepare-docker-dind/tasks/main.yml
index 3e109e87..c0bf1543 100644
--- a/ansible/test/roles/prepare-docker-dind/tasks/main.yml
+++ b/ansible/test/roles/prepare-docker-dind/tasks/main.yml
@@ -20,4 +20,5 @@
package:
name: "docker-ce-{{ docker_version }}"
state: present
+ allow_downgrade: true
notify: Restart docker
diff --git a/ansible/test/roles/prepare-docker-dind/vars/main.yml b/ansible/test/roles/prepare-docker-dind/vars/main.yml
deleted file mode 100644
index 950fb921..00000000
--- a/ansible/test/roles/prepare-docker-dind/vars/main.yml
+++ /dev/null
@@ -1,3 +0,0 @@
----
-#The version of docker to install
-docker_version: 18.09.5