~wesmason/charms/trusty/conn-check/add-tests

« back to all changes in this revision

Viewing changes to playbook.yaml

  • Committer: Wes Mason
  • Date: 2015-05-14 21:28:21 UTC
  • mfrom: (35.1.1 fix-perms)
  • Revision ID: wesley.mason@canonical.com-20150514212821-7v4f03lsr1nvdtpb
Merge fix-perms branch

Show diffs side-by-side

added added

removed removed

Lines of Context:
11
11
    wheels_url: http://bazaar.launchpad.net/~ubuntuone-hackers/conn-check/wheels
12
12
    current_dir: "{{ env_dir }}/{{ revision }}"
13
13
    bin_path: "{{ current_dir }}/bin/conn-check"
 
14
    user: conn-check
 
15
    group: nagios
14
16
 
15
17
  tasks:
16
18
 
65
67
      copy:
66
68
        content: "{{ relations['conn-check'][0]['config'] }}"
67
69
        dest: "{{ config_path }}"
 
70
        owner: "{{ user }}"
 
71
        group: "{{ group }}"
68
72
        mode: 0600
69
73
      when: not (path_provided | bool) and (config_provided | bool)
70
74
 
99
103
      tags:
100
104
        - install
101
105
        - upgrade-charm
102
 
      group: name=conn-check system=yes
 
106
      group: "name={{ group }} system=yes"
103
107
 
104
108
    - name: create user
105
109
      tags:
106
110
        - install
107
111
        - upgrade-charm
108
 
      user: name=conn-check group=conn-check createhome=no system=yes
 
112
      user: "name={{ user }} group={{ group }} createhome=no system=yes"
109
113
 
110
114
    - name: run check
111
115
      tags: run-check
112
 
      shell: "sudo -u conn-check {{ bin_path }} {{ args }} {{ config_path }}"
 
116
      shell: "sudo -u {{ user }} {{ bin_path }} {{ args }} {{ config_path }}"
113
117
 
114
118
    - name: run nagios checks
115
119
      tags: run-nagios-check
116
 
      shell: "sudo -u conn-check {{ bin_path }} --exclude-tags=no-nagios {{ args }} {{ config_path }}"
 
120
      shell: "sudo -u {{ user }} {{ bin_path }} --exclude-tags=no-nagios {{ args }} {{ config_path }}"