mirror of https://github.com/ceph/ceph-ansible.git
ceph-mon: Generate initial keyring
Minor fix so that initial keyring can be generated using python3. Signed-off-by: Ha Phan <thanhha.work@gmail.com>pull/2832/head v3.2.0beta1
parent
b7b8aba47b
commit
a7b7735b6f
|
@ -2,7 +2,7 @@
|
||||||
- name: generate monitor initial keyring
|
- name: generate monitor initial keyring
|
||||||
local_action:
|
local_action:
|
||||||
module: shell
|
module: 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
|
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).decode())" | tee {{ fetch_directory }}/monitor_keyring.conf
|
||||||
creates: "{{ fetch_directory }}/monitor_keyring.conf"
|
creates: "{{ fetch_directory }}/monitor_keyring.conf"
|
||||||
register: monitor_keyring
|
register: monitor_keyring
|
||||||
become: false
|
become: false
|
||||||
|
|
Loading…
Reference in New Issue