Fix ansible running issue on Debian

When deploying on debian, it reports error:
stat /usr/bin/ansible: no such file or directory

That's because on Debian and Ubuntu pip install ansible to
/usr/local/bin/ansible, whereas on CentOS the location is
/usr/bin/ansible.

Change to ansible to handle both cases.

Closes-Bug: #1729216
Depends-On: I2b57403128bc103148ae696c219df52590214adc

Change-Id: I025037cf48596450e6479ab7ff6425c48ac73aad
Signed-off-by: Xinliang Liu <xinliang.liu@linaro.org>
This commit is contained in:
Xinliang Liu 2017-11-01 15:48:09 +08:00 committed by Marcin Juszkiewicz
parent 214866350a
commit df60b76552
5 changed files with 6 additions and 6 deletions

View File

@ -1,6 +1,6 @@
---
- name: Looking up disks to bootstrap for Ceph OSDs
command: docker exec -t kolla_toolbox sudo -E /usr/bin/ansible localhost
command: docker exec -t kolla_toolbox sudo -E ansible localhost
-m find_disks
-a "partition_name='KOLLA_CEPH_OSD_BOOTSTRAP' match_mode='prefix' use_udev={{ kolla_ceph_use_udev }}"
register: osd_lookup
@ -12,7 +12,7 @@
osds_bootstrap: "{{ (osd_lookup.stdout.split('localhost | SUCCESS => ')[1]|from_json).disks|from_json }}"
- name: Looking up disks to bootstrap for Ceph Cache OSDs
command: docker exec -t kolla_toolbox sudo -E /usr/bin/ansible localhost
command: docker exec -t kolla_toolbox sudo -E ansible localhost
-m find_disks
-a "partition_name='KOLLA_CEPH_OSD_CACHE_BOOTSTRAP' match_mode='prefix' use_udev={{ kolla_ceph_use_udev }}"
register: osd_cache_lookup

View File

@ -10,7 +10,7 @@
- { name: ceph_mon, group: ceph-mon }
- name: Looking up OSDs for Ceph
command: docker exec -t kolla_toolbox sudo -E /usr/bin/ansible localhost
command: docker exec -t kolla_toolbox sudo -E ansible localhost
-m find_disks
-a "partition_name='KOLLA_CEPH_DATA' match_mode='prefix' use_udev={{ kolla_ceph_use_udev }}"
register: osd_lookup

View File

@ -1,6 +1,6 @@
---
- name: Looking up OSDs for Ceph
command: docker exec -t kolla_toolbox sudo -E /usr/bin/ansible localhost
command: docker exec -t kolla_toolbox sudo -E ansible localhost
-m find_disks
-a "partition_name='KOLLA_CEPH_DATA' match_mode='prefix' use_udev={{ kolla_ceph_use_udev }}"
register: osd_lookup

View File

@ -1,6 +1,6 @@
---
- name: Swift sanity checks
command: docker exec -t kolla_toolbox /usr/bin/ansible localhost
command: docker exec -t kolla_toolbox ansible localhost
-m kolla_sanity
-a "service=swift
project=service

View File

@ -1,6 +1,6 @@
---
- name: Looking up disks for Swift
command: docker exec -t kolla_toolbox sudo -E /usr/bin/ansible localhost
command: docker exec -t kolla_toolbox sudo -E ansible localhost
-m find_disks
-a "name={{ swift_devices_name }}
match_mode={{ swift_devices_match_mode }}"