~cprov/charms/trusty/logstash/ls-restart-config-changes

« back to all changes in this revision

Viewing changes to hooks/client-relation-changed

  • Committer: Charles Butler
  • Date: 2014-09-23 13:04:21 UTC
  • Revision ID: chuck@dasroot.net-20140923130421-r4ylkg2qv71wvbsp
Converted array notation to an object for template context

Show diffs side-by-side

added added

removed removed

Lines of Context:
31
31
        hosts = f.readlines()
32
32
 
33
33
    cluster_name = hookenv.relation_get('cluster-name')
34
 
    opts = ['cluster_name={}'.format(cluster_name),
35
 
            'hosts={}'.format(hosts[0].rstrip())]
 
34
    opts = {'cluster_name': cluster_name.rstrip(),
 
35
            'hosts': hosts[0].rstrip()}
36
36
 
37
37
    out = os.path.join(BASEPATH, 'conf.d', 'output-elasticsearch.conf')
38
38
    with open(out, 'w') as p: