]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
ceph-common: replace 'sudo' by 'become' 516/head
authorSébastien Han <seb@redhat.com>
Thu, 4 Feb 2016 11:36:46 +0000 (12:36 +0100)
committerSébastien Han <seb@redhat.com>
Thu, 4 Feb 2016 11:36:46 +0000 (12:36 +0100)
to avoid warning from ansible v2. works for both `1.9.4` and `2.0.0.2`.

Signed-off-by: Sébastien Han <seb@redhat.com>
roles/ceph-common/tasks/checks/check_system.yml
roles/ceph-common/tasks/main.yml
roles/ceph-mds/tasks/docker/fetch_configs.yml
roles/ceph-mon/tasks/deploy_monitors.yml
roles/ceph-mon/tasks/docker/fetch_configs.yml
roles/ceph-osd/tasks/docker/fetch_configs.yml
roles/ceph-restapi/tasks/docker/fetch_configs.yml
roles/ceph-rgw/tasks/docker/fetch_configs.yml
site.yml.sample

index 3b692e2962bb92a172479efb9efeb6739fd457a5..a823fdc4094a15bd211e2d2c550f33dbaefbba00 100644 (file)
@@ -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
index f01a52f5a93230ff8b64578416cb49a12e783e74..a75b8fac9fe7070a06e87e99054e13e25a6a16a2 100644 (file)
 - 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:
index 14a4638e40d839f24389c542d9d311fa209410ce..1ab999b49ec772d02d6a9f5c6ced18f29926e1ae 100644 (file)
@@ -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
 
index 9df981a7492df93e330022a2e09f4bdd40af107b..74158903cd84b41eba1481777fae17731ddbfcbf 100644 (file)
@@ -3,14 +3,14 @@
   local_action: shell python -c "import os ; import struct ; import time; import base64 ; key = os.urandom(16) ; header = struct.pack('<hiih',1,int(time.time()),0,len(key)) ; print base64.b64encode(header + key)" | tee {{ fetch_directory }}/monitor_keyring.conf
     creates={{ fetch_directory }}/monitor_keyring.conf
   register: monitor_keyring
-  sudo: false
+  become: false
 
 - name: read monitor initial keyring if it already exists
   local_action: command cat {{ fetch_directory }}/monitor_keyring.conf
     removes={{ fetch_directory }}/monitor_keyring.conf
   changed_when: false
   register: monitor_keyring
-  sudo: false
+  become: false
 
 - name: create monitor initial keyring
   command: ceph-authtool /var/lib/ceph/tmp/keyring.mon.{{ ansible_hostname }} --create-keyring --name=mon. --add-key={{ monitor_secret }} --cap mon 'allow *'
index 06d9546b34088d03180e0b3a8c545a83bf236a0c..5381c1adefb73be90369cce38cc1a5ee0df03301 100644 (file)
@@ -14,7 +14,7 @@
   local_action: stat path={{ item }}
   with_items: ceph_config_keys
   changed_when: false
-  sudo: false
+  become: false
   failed_when: false
   register: statconfig
 
index c26c683d68b8c21c50edb40909ed8169c1f064d0..802b4b9d28970c8b560cb0c8f5be06def6009bb8 100644 (file)
@@ -9,7 +9,7 @@
   local_action: stat path={{ item }}
   with_items: ceph_config_keys
   changed_when: false
-  sudo: false
+  become: false
   failed_when: false
   register: statconfig
 
index cbb3c055df8fb2f8b7c71fe43060c8336fe99121..0b7e43dbb9ef7b19740fda5ee01bb9efd00f4318 100644 (file)
@@ -9,7 +9,7 @@
   local_action: stat path={{ item }}
   with_items: ceph_config_keys
   changed_when: false
-  sudo: false
+  become: false
   ignore_errors: true
   register: statconfig
 
index 2da6ce8a23b8b1f5c5b4219a59c2931a2b9057a1..0154d911ccb64fa3c601eb75c82beb1cf47256be 100644 (file)
@@ -9,7 +9,7 @@
   local_action: stat path={{ item }}
   with_items: ceph_config_keys
   changed_when: false
-  sudo: false
+  become: false
   ignore_errors: true
   register: statconfig
 
index 64ebab5f7c4120c87a689d79eda05dd86f04f085..b13c1c2abc82e51da4f48278c4c710c078d8ccf1 100644 (file)
@@ -2,27 +2,27 @@
 # Defines deployment design and assigns role to server groups
 
 - hosts: mons
-  sudo: True
+  become: True
   roles:
   - ceph-mon
   #serial: 1 # ENABLE THIS WHEN DEPLOYING MONITORS ON DOCKER CONTAINERS
 
 - hosts: osds
-  sudo: True
+  become: True
   roles:
   - ceph-osd
 
 - hosts: mdss
-  sudo: True
+  become: True
   roles:
   - ceph-mds
 
 - hosts: rgws
-  sudo: True
+  become: True
   roles:
   - ceph-rgw
 
 - hosts: restapis
-  sudo: True
+  become: True
   roles:
   - ceph-restapi