From 08d24fb107655b47e4a390092b753d8048b17d6d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Ole=C5=9B?= Date: Tue, 29 Sep 2015 12:47:53 +0200 Subject: [PATCH] Merge riak_nodes.yaml and nodes.yaml --- templates/nodes.yaml | 35 ++++++++++++++++++++++++----------- templates/riak_nodes.yaml | 23 ----------------------- 2 files changed, 24 insertions(+), 34 deletions(-) delete mode 100644 templates/riak_nodes.yaml diff --git a/templates/nodes.yaml b/templates/nodes.yaml index fc0261d..3c2e75a 100644 --- a/templates/nodes.yaml +++ b/templates/nodes.yaml @@ -1,14 +1,27 @@ -id: simple_multinode +id: simple_riak_with_transports resources: - - id: node1 +{% for i in range(count|int) %} + {% set j = i +1 %} + - id: ssh_transport{{j}} + from: resources/transport_ssh + values: + ssh_user: 'vagrant' + ssh_key: '/vagrant/.vagrant/machines/solar-dev{{j}}/virtualbox/private_key' + - id: transports{{j}} + from: resources/transports + values: + transports:key: ssh_transport{{j}}::ssh_key + transports:user: ssh_transport{{j}}::ssh_user + transports:port: ssh_transport{{j}}::ssh_port + transports:name: ssh_transport{{j}}::name + - id: node{{j}} from: resources/ro_node values: - ip: '10.0.0.3' - ssh_key: '/vagrant/.vagrant/machines/solar-dev1/virtualbox/private_key' - ssh_user: 'vagrant' - - id: node2 - from: resources/ro_node - values: - ip: '10.0.0.4' - ssh_key: '/vagrant/.vagrant/machines/solar-dev2/virtualbox/private_key' - ssh_user: 'vagrant' + name: node{{j}} + ip: '10.0.0.{{i + 3}}' + transports_id: transports{{j}}::transports_id + - id: hosts_file{{j}} + from: resources/hosts_file + location: node{{j}} + tags: ['location=node{{j}}'] +{% endfor %} diff --git a/templates/riak_nodes.yaml b/templates/riak_nodes.yaml deleted file mode 100644 index 6d93c1e..0000000 --- a/templates/riak_nodes.yaml +++ /dev/null @@ -1,23 +0,0 @@ -id: simple_riak_with_transports -resources: -{% for i in range(count|int) %} - {% set j = i +1 %} - - id: ssh_transport{{j}} - from: resources/transport_ssh - values: - ssh_user: 'vagrant' - ssh_key: '/vagrant/.vagrant/machines/solar-dev{{j}}/virtualbox/private_key' - - id: transports{{j}} - from: resources/transports - values: - transports:key: ssh_transport{{j}}::ssh_key - transports:user: ssh_transport{{j}}::ssh_user - transports:port: ssh_transport{{j}}::ssh_port - transports:name: ssh_transport{{j}}::name - - id: node{{j}} - from: resources/ro_node - values: - name: node{{j}} - ip: '10.0.0.{{i + 3}}' - transports_id: transports{{j}}::transports_id -{% endfor %}