Merge pull request #516 from ceph/ansible-v2-warnings

ceph-common: replace 'sudo' by 'become'
pull/519/head
Leseb 2016-02-04 15:31:12 +01:00
commit 115d62d560
9 changed files with 16 additions and 16 deletions

View File

@ -24,7 +24,7 @@
- name: check ansible version - name: check ansible version
local_action: shell ansible --version | awk '/[0-9].[0-9].[0-9]/ {print $2}' local_action: shell ansible --version | awk '/[0-9].[0-9].[0-9]/ {print $2}'
changed_when: false changed_when: false
sudo: false become: false
register: ansible__version register: ansible__version
- name: fail on unsupported ansible version - name: fail on unsupported ansible version

View File

@ -74,21 +74,21 @@
- name: create a local fetch directory if it does not exist - name: create a local fetch directory if it does not exist
local_action: file path={{ fetch_directory }} state=directory local_action: file path={{ fetch_directory }} state=directory
changed_when: false changed_when: false
sudo: false become: false
run_once: true run_once: true
- name: generate cluster uuid - name: generate cluster uuid
local_action: shell python -c 'import uuid; print str(uuid.uuid4())' | tee {{ fetch_directory }}/ceph_cluster_uuid.conf 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" creates="{{ fetch_directory }}/ceph_cluster_uuid.conf"
register: cluster_uuid register: cluster_uuid
sudo: false become: false
- name: read cluster uuid if it already exists - name: read cluster uuid if it already exists
local_action: command cat {{ fetch_directory }}/ceph_cluster_uuid.conf local_action: command cat {{ fetch_directory }}/ceph_cluster_uuid.conf
removes="{{ fetch_directory }}/ceph_cluster_uuid.conf" removes="{{ fetch_directory }}/ceph_cluster_uuid.conf"
changed_when: false changed_when: false
register: cluster_uuid register: cluster_uuid
sudo: false become: false
- name: create ceph conf directory - name: create ceph conf directory
file: file:

View File

@ -12,7 +12,7 @@
local_action: stat path={{ item }} local_action: stat path={{ item }}
with_items: ceph_config_keys with_items: ceph_config_keys
changed_when: false changed_when: false
sudo: false become: false
failed_when: false failed_when: false
register: statconfig register: statconfig

View 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 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 creates={{ fetch_directory }}/monitor_keyring.conf
register: monitor_keyring register: monitor_keyring
sudo: false become: false
- name: read monitor initial keyring if it already exists - name: read monitor initial keyring if it already exists
local_action: command cat {{ fetch_directory }}/monitor_keyring.conf local_action: command cat {{ fetch_directory }}/monitor_keyring.conf
removes={{ fetch_directory }}/monitor_keyring.conf removes={{ fetch_directory }}/monitor_keyring.conf
changed_when: false changed_when: false
register: monitor_keyring register: monitor_keyring
sudo: false become: false
- name: create monitor initial keyring - 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 *' command: ceph-authtool /var/lib/ceph/tmp/keyring.mon.{{ ansible_hostname }} --create-keyring --name=mon. --add-key={{ monitor_secret }} --cap mon 'allow *'

View File

@ -14,7 +14,7 @@
local_action: stat path={{ item }} local_action: stat path={{ item }}
with_items: ceph_config_keys with_items: ceph_config_keys
changed_when: false changed_when: false
sudo: false become: false
failed_when: false failed_when: false
register: statconfig register: statconfig

View File

@ -9,7 +9,7 @@
local_action: stat path={{ item }} local_action: stat path={{ item }}
with_items: ceph_config_keys with_items: ceph_config_keys
changed_when: false changed_when: false
sudo: false become: false
failed_when: false failed_when: false
register: statconfig register: statconfig

View File

@ -9,7 +9,7 @@
local_action: stat path={{ item }} local_action: stat path={{ item }}
with_items: ceph_config_keys with_items: ceph_config_keys
changed_when: false changed_when: false
sudo: false become: false
ignore_errors: true ignore_errors: true
register: statconfig register: statconfig

View File

@ -9,7 +9,7 @@
local_action: stat path={{ item }} local_action: stat path={{ item }}
with_items: ceph_config_keys with_items: ceph_config_keys
changed_when: false changed_when: false
sudo: false become: false
ignore_errors: true ignore_errors: true
register: statconfig register: statconfig

View File

@ -2,27 +2,27 @@
# Defines deployment design and assigns role to server groups # Defines deployment design and assigns role to server groups
- hosts: mons - hosts: mons
sudo: True become: True
roles: roles:
- ceph-mon - ceph-mon
#serial: 1 # ENABLE THIS WHEN DEPLOYING MONITORS ON DOCKER CONTAINERS #serial: 1 # ENABLE THIS WHEN DEPLOYING MONITORS ON DOCKER CONTAINERS
- hosts: osds - hosts: osds
sudo: True become: True
roles: roles:
- ceph-osd - ceph-osd
- hosts: mdss - hosts: mdss
sudo: True become: True
roles: roles:
- ceph-mds - ceph-mds
- hosts: rgws - hosts: rgws
sudo: True become: True
roles: roles:
- ceph-rgw - ceph-rgw
- hosts: restapis - hosts: restapis
sudo: True become: True
roles: roles:
- ceph-restapi - ceph-restapi