From 999fbfe388cc4eee2f3ba7c5aa4d390da7a727ca Mon Sep 17 00:00:00 2001 From: Antonio Terceiro Date: Thu, 12 Mar 2015 14:45:28 -0300 Subject: [PATCH] Extract config data from nodes.yaml --- Rakefile | 2 ++ config/development/config.yaml | 13 +++++++++++++ nodes.yaml | 21 --------------------- 3 files changed, 15 insertions(+), 21 deletions(-) create mode 100644 config/development/config.yaml diff --git a/Rakefile b/Rakefile index 3592db9..be26d8a 100644 --- a/Rakefile +++ b/Rakefile @@ -3,8 +3,10 @@ require 'chake' $SPB_ENV = ENV.fetch('SPB_ENV', 'development') $SPB_IPS = "ips.#{$SPB_ENV}.yaml" +config = YAML.load_file("config/#{$SPB_ENV}/config.yaml") ips = YAML.load_file($SPB_IPS) $nodes.each do |node| + node.data['config'] = config node.data['peers'] = ips end diff --git a/config/development/config.yaml b/config/development/config.yaml new file mode 100644 index 0000000..088fd61 --- /dev/null +++ b/config/development/config.yaml @@ -0,0 +1,13 @@ +admins: + - + - Paulo Meirelles + - paulo@softwarelivre.org +external_hostname: softwarepublico.dev +site_url: https://softwarepublico.dev +colab_from_address: '"Portal do Software Publico" ' +server_email: '"Portal do Software Publico" ' +email_subject_prefix: '[spb]' +lists_hostname: listas.softwarepublico.dev +lists_admin: paulo@softwarelivre.org +relay_hostname: relay.softwarepublico.dev + diff --git a/nodes.yaml b/nodes.yaml index edf6254..c399176 100644 --- a/nodes.yaml +++ b/nodes.yaml @@ -2,40 +2,19 @@ vagrant@integration: run_list: - role[server] - role[integration_server] - config: &CONFIG - admins: - - - - Paulo Meirelles - - paulo@softwarelivre.org - external_hostname: softwarepublico.dev - site_url: https://softwarepublico.dev - colab_from_address: '"Portal do Software Publico" ' - server_email: '"Portal do Software Publico" ' - email_subject_prefix: '[spb]' - lists_hostname: listas.softwarepublico.dev - lists_admin: paulo@softwarelivre.org - relay_hostname: relay.softwarepublico.dev vagrant@email: run_list: - role[server] - role[email_server] - config: - <<: *CONFIG vagrant@social: run_list: - role[server] - role[social_server] - config: - <<: *CONFIG vagrant@database: run_list: - role[server] - role[database_server] - config: - <<: *CONFIG vagrant@reverseproxy: run_list: - role[server] - role[reverse_proxy_server] - config: - <<: *CONFIG -- libgit2 0.21.2