]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
site-docker: fix undefined variable error
authorGuillaume Abrioux <gabrioux@redhat.com>
Fri, 14 Sep 2018 05:51:03 +0000 (07:51 +0200)
committermergify[bot] <mergify[bot]@users.noreply.github.com>
Tue, 18 Sep 2018 07:27:41 +0000 (07:27 +0000)
`mon_group_name` isn't defined here, we must hardcode it.

Typical error:

```
The task includes an option with an undefined variable. The error was: 'mon_group_name' is undefined
```

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
site-docker.yml.sample

index cedd8cbaf8fdaa45a45d3fe7a2be37f531b57ca5..bb5c145d684d0c5e2c8672f726439326c188d9a0 100644 (file)
   become: True
   tasks:
     - name: get ceph status from the first monitor
-      command: docker exec ceph-mon-{{ hostvars[groups[mon_group_name][0]]['ansible_hostname'] }} ceph --cluster {{ cluster }} -s
+      command: docker exec ceph-mon-{{ hostvars[groups['mons'][0]]['ansible_hostname'] }} ceph --cluster {{ cluster }} -s
       register: ceph_status
       changed_when: false
       delegate_to: "{{ groups['mons'][0] }}"