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

Proposed by Guillermo Gonzalez on 2016-12-20
Status: Merged
Approved by: Guillermo Gonzalez on 2016-12-20
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 2016-12-20 Approve on 2016-12-20
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.
Simon Davy (bloodearnest) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'playbook.yaml'
--- playbook.yaml 2016-04-26 10:26:04 +0000
+++ playbook.yaml 2016-12-20 13:58:40 +0000
@@ -3,11 +3,11 @@
3 vars:3 vars:
4 env_dir: /srv/conn-check/virtualenvs4 env_dir: /srv/conn-check/virtualenvs
5 wheels_dir: /srv/conn-check/wheels-exports5 wheels_dir: /srv/conn-check/wheels-exports
6 config_path: "{{ relations['conn-check'][0]['config_path'] | default('/srv/conn-check/config.yaml') }}"6 config_path: "{{ relations['conn-check'][0]['config_path'] if relations['conn-check'] else None | default('/srv/conn-check/config.yaml') }}"
7 config_provided: "{{ 'config' in relations['conn-check'][0] | default(dict()) }}"7 config_provided: "{{ 'config' in relations['conn-check'][0] if relations['conn-check'] else None | default(dict()) }}"
8 path_provided: "{{ 'config_path' in relations['conn-check'][0] | default(dict()) }}"8 path_provided: "{{ 'config_path' in relations['conn-check'][0] if relations['conn-check'] else None | default(dict()) }}"
9 config_or_path_provided: "{{ relations['conn-check'][0] | default([]) | intersect(['config', 'config_path']) | length > 0 }}"9 config_or_path_provided: "{{ relations['conn-check'][0] if relations['conn-check'] else [] | default([]) | intersect(['config', 'config_path']) | length > 0 }}"
10 nagios_enabled: "{{ 'nagios_host_context' in relations['nrpe-external-master'][0] | default({}) }}"10 nagios_enabled: "{{ 'nrpe-external-master' in relations and 'nagios_host_context' in relations['nrpe-external-master'][0] | default({}) }}"
11 wheels_url: http://bazaar.launchpad.net/~ubuntuone-hackers/conn-check/wheels11 wheels_url: http://bazaar.launchpad.net/~ubuntuone-hackers/conn-check/wheels
12 current_dir: "{{ env_dir }}/{{ revision }}"12 current_dir: "{{ env_dir }}/{{ revision }}"
13 bin_path: "{{ current_dir }}/bin/conn-check"13 bin_path: "{{ current_dir }}/bin/conn-check"
@@ -34,6 +34,15 @@
34 - python-pip34 - python-pip
35 - python-virtualenv35 - python-virtualenv
3636
37 - name: install packages (only xenial)
38 tags:
39 - install
40 - upgrade-charm
41 apt: pkg={{ item }}
42 with_items:
43 - virtualenv
44 when: ansible_distribution_release == "xenial"
45
37 - name: create dirs46 - name: create dirs
38 tags:47 tags:
39 - install48 - install

Subscribers

People subscribed via source and target branches