From b459dcf7aafba570c9e80aab80784f222cfb7007 Mon Sep 17 00:00:00 2001 From: Zack Cerza Date: Fri, 15 Apr 2016 15:52:18 -0600 Subject: [PATCH] ansible.CephLab: touch ~/.vault_pass.txt To avoid ansible bailing with an OSError. Normally we don't even need the vault password for cephlab.yml. Signed-off-by: Zack Cerza --- teuthology/task/ansible.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/teuthology/task/ansible.py b/teuthology/task/ansible.py index f290682399..b6cb9fbd84 100644 --- a/teuthology/task/ansible.py +++ b/teuthology/task/ansible.py @@ -371,6 +371,15 @@ class CephLab(Ansible): 'ceph-cm-ansible.git') super(CephLab, self).__init__(ctx, config) + def begin(self): + # Emulate 'touch ~/.vault_pass.txt' to avoid ansible failing; + # in almost all cases we don't need the actual vault password + vault_pass_path = os.path.expanduser('~/.vault_pass.txt') + if not os.path.exists(vault_pass_path): + with open(vault_pass_path, 'a'): + pass + super(CephLab, self).begin() + task = Ansible cephlab = CephLab -- 2.39.5