From 6af52b6b05466cf0696bf7767a6ec3ff0a228059 Mon Sep 17 00:00:00 2001 From: Jesse Pretorius Date: Wed, 15 Aug 2018 14:51:07 +0100 Subject: [PATCH] Use the Ansible runtime venv for pw-token-gen.py Rather than installing pip packages on to the host system, we can just execute the script and it will use the ansible runtime venv. This works for Ocata onwards. Any earlier releases can either pre-install the right packages, or implement the change to the script shebang in a fork. Change-Id: I88eb4c1bc9fe3a38803c5f0f5d1725dbed74dac7 --- multi-node-aio/playbooks/deploy-osa.yml | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/multi-node-aio/playbooks/deploy-osa.yml b/multi-node-aio/playbooks/deploy-osa.yml index 5e8f54ee..b54921bd 100644 --- a/multi-node-aio/playbooks/deploy-osa.yml +++ b/multi-node-aio/playbooks/deploy-osa.yml @@ -110,17 +110,8 @@ when: - pre_config_osa | default(true) | bool - - name: Get pip2 and pw gen deps - shell: | - python2 /opt/get-pip.py - $(which pip2 || which pip) install setuptools pycrypto pyyaml - args: - chdir: /opt/openstack-ansible - when: - - pre_config_osa | default(true) | bool - - name: Create passwords - command: python2 ./scripts/pw-token-gen.py --file /etc/openstack_deploy/user_secrets.yml + command: ./scripts/pw-token-gen.py --file /etc/openstack_deploy/user_secrets.yml args: chdir: /opt/openstack-ansible when: