From: Sébastien Han Date: Thu, 4 Feb 2016 11:36:46 +0000 (+0100) Subject: ceph-common: replace 'sudo' by 'become' X-Git-Tag: v1.0.0~48^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=c0a3837d6e2c28ccdb447c9d41f76feef9648892;p=ceph-ansible.git ceph-common: replace 'sudo' by 'become' to avoid warning from ansible v2. works for both `1.9.4` and `2.0.0.2`. Signed-off-by: Sébastien Han --- diff --git a/roles/ceph-common/tasks/checks/check_system.yml b/roles/ceph-common/tasks/checks/check_system.yml index 3b692e296..a823fdc40 100644 --- a/roles/ceph-common/tasks/checks/check_system.yml +++ b/roles/ceph-common/tasks/checks/check_system.yml @@ -24,7 +24,7 @@ - name: check ansible version local_action: shell ansible --version | awk '/[0-9].[0-9].[0-9]/ {print $2}' changed_when: false - sudo: false + become: false register: ansible__version - name: fail on unsupported ansible version diff --git a/roles/ceph-common/tasks/main.yml b/roles/ceph-common/tasks/main.yml index f01a52f5a..a75b8fac9 100644 --- a/roles/ceph-common/tasks/main.yml +++ b/roles/ceph-common/tasks/main.yml @@ -74,21 +74,21 @@ - name: create a local fetch directory if it does not exist local_action: file path={{ fetch_directory }} state=directory changed_when: false - sudo: false + become: false run_once: true - name: generate cluster uuid local_action: shell python -c 'import uuid; print str(uuid.uuid4())' | tee {{ fetch_directory }}/ceph_cluster_uuid.conf creates="{{ fetch_directory }}/ceph_cluster_uuid.conf" register: cluster_uuid - sudo: false + become: false - name: read cluster uuid if it already exists local_action: command cat {{ fetch_directory }}/ceph_cluster_uuid.conf removes="{{ fetch_directory }}/ceph_cluster_uuid.conf" changed_when: false register: cluster_uuid - sudo: false + become: false - name: create ceph conf directory file: diff --git a/roles/ceph-mds/tasks/docker/fetch_configs.yml b/roles/ceph-mds/tasks/docker/fetch_configs.yml index 14a4638e4..1ab999b49 100644 --- a/roles/ceph-mds/tasks/docker/fetch_configs.yml +++ b/roles/ceph-mds/tasks/docker/fetch_configs.yml @@ -12,7 +12,7 @@ local_action: stat path={{ item }} with_items: ceph_config_keys changed_when: false - sudo: false + become: false failed_when: false register: statconfig diff --git a/roles/ceph-mon/tasks/deploy_monitors.yml b/roles/ceph-mon/tasks/deploy_monitors.yml index 9df981a74..74158903c 100644 --- a/roles/ceph-mon/tasks/deploy_monitors.yml +++ b/roles/ceph-mon/tasks/deploy_monitors.yml @@ -3,14 +3,14 @@ local_action: shell python -c "import os ; import struct ; import time; import base64 ; key = os.urandom(16) ; header = struct.pack('