Merge lp:~verterok/charms/trusty/conn-check/xenial-support into lp:~ubuntuone-hackers/charms/trusty/conn-check/trunk

Proposed by Guillermo Gonzalez
Status: Merged
Approved by: Guillermo Gonzalez
Approved revision: 53
Merged at revision: 52
Proposed branch: lp:~verterok/charms/trusty/conn-check/xenial-support
Merge into: lp:~ubuntuone-hackers/charms/trusty/conn-check/trunk
Diff against target: 36 lines (+14/-5)
1 file modified
playbook.yaml (+14/-5)
To merge this branch: bzr merge lp:~verterok/charms/trusty/conn-check/xenial-support
Reviewer Review Type Date Requested Status
Simon Davy (community) Approve
Review via email: mp+313613@code.launchpad.net

Commit message

Install virtualenv package, only if release == xenial and fix inline checks @ variable definitions to work in xenial

Description of the change

- install virtualenv package, only if release == xenial
- fix inline checks @ variable definitions to work in xenial:
   something changed between trusty -> xenial and now it fails with errors like:
TASK [nrpe-external-master : Call charmhelpers nrpe support] *******************
fatal: [localhost]: FAILED! => {"failed": true, "msg": "ERROR! ERROR! ERROR! list object has no element 0"}

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

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'playbook.yaml'
2--- playbook.yaml 2016-04-26 10:26:04 +0000
3+++ playbook.yaml 2016-12-20 13:58:40 +0000
4@@ -3,11 +3,11 @@
5 vars:
6 env_dir: /srv/conn-check/virtualenvs
7 wheels_dir: /srv/conn-check/wheels-exports
8- config_path: "{{ relations['conn-check'][0]['config_path'] | default('/srv/conn-check/config.yaml') }}"
9- config_provided: "{{ 'config' in relations['conn-check'][0] | default(dict()) }}"
10- path_provided: "{{ 'config_path' in relations['conn-check'][0] | default(dict()) }}"
11- config_or_path_provided: "{{ relations['conn-check'][0] | default([]) | intersect(['config', 'config_path']) | length > 0 }}"
12- nagios_enabled: "{{ 'nagios_host_context' in relations['nrpe-external-master'][0] | default({}) }}"
13+ config_path: "{{ relations['conn-check'][0]['config_path'] if relations['conn-check'] else None | default('/srv/conn-check/config.yaml') }}"
14+ config_provided: "{{ 'config' in relations['conn-check'][0] if relations['conn-check'] else None | default(dict()) }}"
15+ path_provided: "{{ 'config_path' in relations['conn-check'][0] if relations['conn-check'] else None | default(dict()) }}"
16+ config_or_path_provided: "{{ relations['conn-check'][0] if relations['conn-check'] else [] | default([]) | intersect(['config', 'config_path']) | length > 0 }}"
17+ nagios_enabled: "{{ 'nrpe-external-master' in relations and 'nagios_host_context' in relations['nrpe-external-master'][0] | default({}) }}"
18 wheels_url: http://bazaar.launchpad.net/~ubuntuone-hackers/conn-check/wheels
19 current_dir: "{{ env_dir }}/{{ revision }}"
20 bin_path: "{{ current_dir }}/bin/conn-check"
21@@ -34,6 +34,15 @@
22 - python-pip
23 - python-virtualenv
24
25+ - name: install packages (only xenial)
26+ tags:
27+ - install
28+ - upgrade-charm
29+ apt: pkg={{ item }}
30+ with_items:
31+ - virtualenv
32+ when: ansible_distribution_release == "xenial"
33+
34 - name: create dirs
35 tags:
36 - install

Subscribers

People subscribed via source and target branches