Merge lp://staging/~wesmason/charms/trusty/conn-check/add-config-path into lp://staging/~ubuntuone-hackers/charms/trusty/conn-check/trunk

Proposed by Wes Mason
Status: Merged
Approved by: Wes Mason
Approved revision: no longer in the source branch.
Merged at revision: 31
Proposed branch: lp://staging/~wesmason/charms/trusty/conn-check/add-config-path
Merge into: lp://staging/~ubuntuone-hackers/charms/trusty/conn-check/trunk
Diff against target: 128 lines (+20/-38)
2 files modified
README.md (+2/-2)
playbook.yaml (+18/-36)
To merge this branch: bzr merge lp://staging/~wesmason/charms/trusty/conn-check/add-config-path
Reviewer Review Type Date Requested Status
Wes Mason (community) Approve
Review via email: mp+257409@code.staging.launchpad.net

Commit message

Add ability to set config_path from relation, and don't write the config if set

Description of the change

This adds the ability to set config_path from the relation, and explicitly *doesn't* write the config file if the path is set.

I've also removed mention of config and just referenced config_path from the readme as this should be the preferred way (and we will eventually remove `config`).

Reference: https://bugs.launchpad.net/conn-check/+bug/1447935

To post a comment you must log in.
Revision history for this message
Simon Davy (bloodearnest) wrote :

What about a using defaults in the vars?

So

config_path = "{{ relations['conn-check'][0]['config_path']|default('/srv/conn-check/config.yaml') }}"
path_provided = "{{ 'config_path' in relations['conn-check'][0]|default('') }}

that should simplify the currently complex when: logic?

Revision history for this message
Simon Davy (bloodearnest) wrote :

nice, definitely better, some minor suggestions

Revision history for this message
Simon Davy (bloodearnest) wrote :

+1, one question, but much nicer

Revision history for this message
Wes Mason (wesmason) :
review: Approve
31. By Wes Mason

Merge add-config-path

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches

to all changes: