~tanuki/charms/trusty/logstash/trunk

« back to all changes in this revision

Viewing changes to hooks/config-changed

  • Committer: Tanuki Bot
  • Author(s): Guillermo Gonzalez
  • Date: 2015-09-08 17:08:17 UTC
  • mfrom: (54.1.2 fix-the-thing)
  • Revision ID: tanuki_bot-20150908170817-bhm61o1nz13qn8ve
Fix config-changed to not overwrite ES config. Also make cache_hosts (in hooks/client-relation-changed) iterate over all client relations instead of just the current one. [r=Celso Providelo]

Show diffs side-by-side

added added

removed removed

Lines of Context:
59
59
    key_file = os.path.join(cert_dir, 'logstash.key')
60
60
 
61
61
    for f in files:
 
62
        # skip output-elasticsearch.conf, is managed by
 
63
        # hooks/client-relation-changed
 
64
        if os.path.basename(f) == "output-elasticsearch.conf":
 
65
            continue
62
66
        if os.path.basename(f) != lumberjack_template:
63
67
            with open(os.path.join(BASEPATH, 'conf.d', f), 'w') as p:
64
68
                p.write(render(os.path.basename(f), opts))