summaryrefslogtreecommitdiffstats
path: root/ansible/roles
diff options
context:
space:
mode:
Diffstat (limited to 'ansible/roles')
-rw-r--r--ansible/roles/application/defaults/main.yml2
-rw-r--r--ansible/roles/application/molecule/default/tests/test_default.py3
-rw-r--r--ansible/roles/application/tasks/install.yml1
-rw-r--r--ansible/roles/docker/handlers/main.yml3
-rw-r--r--ansible/roles/nexus/defaults/main.yml1
-rw-r--r--ansible/roles/nexus/tasks/install.yml2
-rw-r--r--ansible/roles/package-repository/tasks/main.yml1
-rw-r--r--ansible/roles/rancher/molecule/default/cleanup.yml14
-rw-r--r--ansible/roles/rancher/molecule/default/molecule.yml9
-rw-r--r--ansible/roles/rancher/molecule/default/playbook.yml2
-rw-r--r--ansible/roles/rancher/molecule/default/prepare.yml6
-rw-r--r--ansible/roles/rancher/tasks/rancher_agent.yml1
12 files changed, 17 insertions, 28 deletions
diff --git a/ansible/roles/application/defaults/main.yml b/ansible/roles/application/defaults/main.yml
index dec17601..84fffeca 100644
--- a/ansible/roles/application/defaults/main.yml
+++ b/ansible/roles/application/defaults/main.yml
@@ -1,6 +1,8 @@
---
helm_repository_name: local
helm_repository_url: http://127.0.0.1:8879
+helm_extra_install_options:
+ - { opt: '--timeout 1800'}
# Override file generation for Helm application can be customized by any role
# given by user and found by ansible from roles_path.
# By default override file is generated by 'application-override' role that is
diff --git a/ansible/roles/application/molecule/default/tests/test_default.py b/ansible/roles/application/molecule/default/tests/test_default.py
index 3e0cbb42..5edceff3 100644
--- a/ansible/roles/application/molecule/default/tests/test_default.py
+++ b/ansible/roles/application/molecule/default/tests/test_default.py
@@ -16,7 +16,8 @@ serve
repo list
repo add local http://127.0.0.1:8879
install --name moleculetestapp local/moleculetestapp --namespace \
-moleculetestapp -f /opt/moleculetestapp/override.yaml"""
+moleculetestapp -f /opt/moleculetestapp/override.yaml \
+--timeout 1800"""
assert fc == expected_content
diff --git a/ansible/roles/application/tasks/install.yml b/ansible/roles/application/tasks/install.yml
index cdc7ced0..bdf6e511 100644
--- a/ansible/roles/application/tasks/install.yml
+++ b/ansible/roles/application/tasks/install.yml
@@ -72,6 +72,7 @@
{{ helm_repository_name }}/{{ app_helm_chart_name }}
--namespace {{ app_kubernetes_namespace }}
{{ '' if app_skip_helm_override else '-f ' + app_helm_override_file }}
+ {% for arg in helm_extra_install_options %} {{ arg.opt }} {% endfor %}
changed_when: true # when executed its a changed type of action
register: helm_install
failed_when: helm_install.stderr
diff --git a/ansible/roles/docker/handlers/main.yml b/ansible/roles/docker/handlers/main.yml
index 9916a81b..de4a52ac 100644
--- a/ansible/roles/docker/handlers/main.yml
+++ b/ansible/roles/docker/handlers/main.yml
@@ -1,6 +1,3 @@
---
- name: Restart Docker
import_tasks: docker_restart.yml
- when:
- - ansible_env.container is defined
- - ansible_env.container != 'docker'
diff --git a/ansible/roles/nexus/defaults/main.yml b/ansible/roles/nexus/defaults/main.yml
index 92089e9a..8f636979 100644
--- a/ansible/roles/nexus/defaults/main.yml
+++ b/ansible/roles/nexus/defaults/main.yml
@@ -1,4 +1,5 @@
---
+nexus_come_up_wait_retries: 30
# By default prepopulated nexus binary blob used.
populate_nexus: false
# By dafault no additional docker images pushed to nexus at runtime
diff --git a/ansible/roles/nexus/tasks/install.yml b/ansible/roles/nexus/tasks/install.yml
index f8de5e95..c88e5855 100644
--- a/ansible/roles/nexus/tasks/install.yml
+++ b/ansible/roles/nexus/tasks/install.yml
@@ -36,7 +36,7 @@
password: admin123
force_basic_auth: true
method: GET
- retries: 30
+ retries: "{{ nexus_come_up_wait_retries }}"
delay: 10
register: nexus_wait
until: not nexus_wait.failed
diff --git a/ansible/roles/package-repository/tasks/main.yml b/ansible/roles/package-repository/tasks/main.yml
index 599e1052..7dc2e76f 100644
--- a/ansible/roles/package-repository/tasks/main.yml
+++ b/ansible/roles/package-repository/tasks/main.yml
@@ -5,6 +5,7 @@
path: /etc/resolv.conf
state: present
insertbefore: BOF
+ unsafe_writes: true
- name: Disable all OS default repositories
block:
diff --git a/ansible/roles/rancher/molecule/default/cleanup.yml b/ansible/roles/rancher/molecule/default/cleanup.yml
deleted file mode 100644
index d4bf4495..00000000
--- a/ansible/roles/rancher/molecule/default/cleanup.yml
+++ /dev/null
@@ -1,14 +0,0 @@
----
-- name: Cleanup host
- hosts: localhost
- roles:
- - role: cleanup-containers
- vars:
- container_list:
- - rancher-agent
- - rancher-server
- - role: cleanup-rancher
- vars:
- container_list_by_label:
- - { 'label':'io.rancher.project.name', 'value':'healthcheck'}
- - { 'label':'io.rancher.project.name', 'value':'kubernetes'}
diff --git a/ansible/roles/rancher/molecule/default/molecule.yml b/ansible/roles/rancher/molecule/default/molecule.yml
index b21325d4..eb7f8c19 100644
--- a/ansible/roles/rancher/molecule/default/molecule.yml
+++ b/ansible/roles/rancher/molecule/default/molecule.yml
@@ -13,8 +13,7 @@ platforms:
override_command: false
restart_policy: unless-stopped
volumes:
- - /var/run/docker.sock:/var/run/docker.sock
- - /var/lib/rancher:/var/lib/rancher:ro
+ - /var/lib/docker
groups:
- infrastructure
networks:
@@ -27,12 +26,14 @@ platforms:
override_command: false
restart_policy: unless-stopped
volumes:
- - /var/run/docker.sock:/var/run/docker.sock
- - /var/lib/rancher:/var/lib/rancher:ro
+ - /var/lib/docker
+ - /var/lib/rancher
+ - /var/lib/kubelet
groups:
- kubernetes
networks:
- name: rancher
+ purge_networks: true
provisioner:
name: ansible
diff --git a/ansible/roles/rancher/molecule/default/playbook.yml b/ansible/roles/rancher/molecule/default/playbook.yml
index e0ef086c..e4a7151e 100644
--- a/ansible/roles/rancher/molecule/default/playbook.yml
+++ b/ansible/roles/rancher/molecule/default/playbook.yml
@@ -2,7 +2,7 @@
- name: Converge rancher master
hosts: infrastructure
roles:
- - prepare-common # molecule specific role needed here to populate cluster_ip
+ - prepare-common
- role: rancher
vars:
mode: server
diff --git a/ansible/roles/rancher/molecule/default/prepare.yml b/ansible/roles/rancher/molecule/default/prepare.yml
index 90159c6c..d70cda43 100644
--- a/ansible/roles/rancher/molecule/default/prepare.yml
+++ b/ansible/roles/rancher/molecule/default/prepare.yml
@@ -1,5 +1,5 @@
---
-- name: Prepare kube nodes
- hosts: kubernetes
+- name: Prepare hosts
+ hosts: all
roles:
- - prepare-docker
+ - prepare-docker-dind
diff --git a/ansible/roles/rancher/tasks/rancher_agent.yml b/ansible/roles/rancher/tasks/rancher_agent.yml
index 091503c7..73d9a642 100644
--- a/ansible/roles/rancher/tasks/rancher_agent.yml
+++ b/ansible/roles/rancher/tasks/rancher_agent.yml
@@ -7,7 +7,6 @@
volumes:
- "/var/run/docker.sock:/var/run/docker.sock"
- "/var/lib/rancher:/var/lib/rancher"
- auto_remove: true
privileged: true
vars:
server_hostvars: "{{ hostvars[groups.infrastructure.0] }}"