From c0a3837d6e2c28ccdb447c9d41f76feef9648892 Mon Sep 17 00:00:00 2001 From: =?utf8?q?S=C3=A9bastien=20Han?= Date: Thu, 4 Feb 2016 12:36:46 +0100 Subject: [PATCH] ceph-common: replace 'sudo' by 'become' MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit to avoid warning from ansible v2. works for both `1.9.4` and `2.0.0.2`. Signed-off-by: Sébastien Han --- roles/ceph-common/tasks/checks/check_system.yml | 2 +- roles/ceph-common/tasks/main.yml | 6 +++--- roles/ceph-mds/tasks/docker/fetch_configs.yml | 2 +- roles/ceph-mon/tasks/deploy_monitors.yml | 4 ++-- roles/ceph-mon/tasks/docker/fetch_configs.yml | 2 +- roles/ceph-osd/tasks/docker/fetch_configs.yml | 2 +- roles/ceph-restapi/tasks/docker/fetch_configs.yml | 2 +- roles/ceph-rgw/tasks/docker/fetch_configs.yml | 2 +- site.yml.sample | 10 +++++----- 9 files changed, 16 insertions(+), 16 deletions(-) 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('