summaryrefslogtreecommitdiff
path: root/ansible/roles/trove-setup/tasks/lorry-controller-setup.yml
diff options
context:
space:
mode:
authorPedro Alvarez <pedro.alvarez@codethink.co.uk>2014-09-10 17:07:36 +0100
committerPedro Alvarez <pedro.alvarez@codethink.co.uk>2014-09-17 16:53:45 +0100
commit48a9bb48b428e08395179800359d264ef35b5c24 (patch)
tree3f91726ef415ebd7fed10e301287fe662e1ac7af /ansible/roles/trove-setup/tasks/lorry-controller-setup.yml
parentb2260b5fb45f4519bf7ea31ac278ffac7cddfbb7 (diff)
downloadtrove-setup-48a9bb48b428e08395179800359d264ef35b5c24.tar.gz
Allow the configuration of troves without UPSTREAM_TROVE
Now UPSTREAM_TROVE is not mandatory to configure a Trove, and if the value is not set, then the configuration of the lorry controller (lorry-controller.conf) won't include any configuration for an upstream Trove.
Diffstat (limited to 'ansible/roles/trove-setup/tasks/lorry-controller-setup.yml')
-rw-r--r--ansible/roles/trove-setup/tasks/lorry-controller-setup.yml18
1 files changed, 18 insertions, 0 deletions
diff --git a/ansible/roles/trove-setup/tasks/lorry-controller-setup.yml b/ansible/roles/trove-setup/tasks/lorry-controller-setup.yml
index fd00ea3..4486884 100644
--- a/ansible/roles/trove-setup/tasks/lorry-controller-setup.yml
+++ b/ansible/roles/trove-setup/tasks/lorry-controller-setup.yml
@@ -10,6 +10,24 @@
shell: su git -c 'mktemp -d'
register: lorry_controller_templates
+- set_fact:
+ UPSTREAM_TROVE_STANZA: {
+ type: "trove",
+ trovehost: "{{ UPSTREAM_TROVE }}",
+ protocol: "{{ UPSTREAM_TROVE_PROTOCOL }}",
+ ls-interval: "4H",
+ interval: "2H",
+ prefixmap: {
+ baserock: "baserock",
+ delta: "delta"
+ },
+ ignore: [
+ "baserock/lorries"
+ ],
+ tarball: "always"
+ }
+ when: UPSTREAM_TROVE is defined
+
- name: Create the configuration files of lorry-controller using templates
template: src=/usr/share/trove-setup/{{ item }} dest={{ lorry_controller_templates.stdout }}/{{ item }} owner=git group=git mode=0644
with_items: