system-config/playbooks/roles/install-launch-node/tasks/main.yaml
Ian Wienand ed4dadfcad
install-launch-node: upgrade all packages
This is a follow-on to I50674a25da9e1761af8daa78970c473e651791b0 which
should ensure we try to upgrade everything in the venv, which is what
we want.

Change-Id: I8f1bffe762e0bb87e8185dff2e4ce472603ece08
2023-04-06 09:20:15 +10:00

42 lines
1.2 KiB
YAML

- name: Create launcher venv
include_role:
name: create-venv
vars:
create_venv_path: '/usr/launcher-venv'
- name: Add RAX rdns credentials
template:
src: rax-rdns-auth.conf.j2
dest: /etc/rax-rdns-auth.conf
owner: root
group: root
mode: '0600'
# This is used to timestamp the launch-env-req.txt file. This means
# we will run --upgrade on the venv once a day, but otherwise leave it
# alone.
- name: Install node launcher stamp
template:
src: launch-env-req.txt.j2
dest: /usr/launcher-venv/launch-env-req.txt
register: _upgrade
- name: Install node launcher
pip:
name: 'file:///home/zuul/src/opendev.org/opendev/system-config/launch'
virtualenv: '/usr/launcher-venv'
state: '{{ "latest" if _upgrade.changed else "present" }}'
extra_args: '--upgrade-strategy=eager'
# Admins use openstackclient on the bastion host to deal with cloud
# issues. The best version to use is the one from launch node, as
# whatever workarounds we need to talk to all clouds should be in that
# environment. For convenience link this version globally
- name: Link openstack client globally
file:
src: /usr/launcher-venv/bin/openstack
dest: /usr/local/bin/openstack
owner: root
group: root
state: link