base-jobs/playbooks/infra-prod/setup-keys.yaml
Clark Boylan 7bd42d37c4 Fixup CI jobs
Several things have bit rotted in here that we need to take care of.

First is that we updated the default nodeset to Noble which breaks our
ability to install Pillow<10 for blockdiag. To fix this we need to
install libjpeg-dev so that we can build a Pillow wheel locally during
testing.

Next old ansible-lint doesn't run on Noble's python3.12. We bump up
Ansible lint to a modern version that matches Zuul's current default
Ansible. We also stop installing zuul to get zuul_console and
zuul_return and instead simply mock them in the linter. To make this
work we have to drop the ansible-playbook syntax check run which is fine
because ansible-lint runs this too, but when done via ansible-lint the
mocked modules are respected [0].

Finally we have to clean up/ignore some of the new linter
warnings/errors.

[0] https://ansible.readthedocs.io/projects/lint/rules/syntax-check/

Change-Id: Ia0e936fefc9e2b0f2fa614c93a2f168e14b2825b
2024-09-19 14:18:01 -07:00

25 lines
1.4 KiB
YAML

- hosts: localhost
tasks:
- name: Add bastion to inventory
add_host:
name: bridge01.opendev.org
ansible_python_interpreter: python3
ansible_user: zuul
# Without setting ansible_host directly, mirror-workspace-git-repos
# gets sad because if delegate_to localhost and with add_host that
# ends up with ansible_host being localhost.
ansible_host: bridge01.opendev.org
ansible_port: 22
# Port 19885 is firewalled
zuul_console_disabled: true
# Playbooks are written to refer to "prod_bastion[0]" rather
# than the hostname directly, so we can swap the bridge
# hostname more easily.
groups:
- prod_bastion
- name: Add bridge.o.o hostkey to known hosts
known_hosts:
name: bridge01.opendev.org
key: "bridge01.opendev.org ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQC2zgQQ0lpnjtST1oINVPo9jTDI0W3IJA+ZSUTsOo6gGzz6M8PN+jyxQ3EQy8H/xPjm2C55yGfaLNzj557P5arI0TkdeNHt4hzRcmpsNUVE4fOtzMblThRSA1ipfhd/DqMUKz1Ofie3hojnhE1ecB86IcdbF9rfJxl0DOuoSQfClJw3kDx5nK+0Ps5lVnSBZ+NUKbnUFizWVjKz6qIe3tZpuHAvuD/S8tM/gJ+3fC7LcssGb+njo5ghhSUl8wasGBXZQuby33mtuX+UBON+h95odanZs3iGMZScPxgchGb4xB3OTyYn0dFG3mnwPuUnrEKluJ/eFXCkM+Q35DMCa+mynco0stt136e2qTrX1jhtcaDerufb7hs2/7zM/q4zbRYKalUhnh0CZshQ3Y1AuwI3ssmwczQpwgTJnceBmmh5xYPDVCGPpAamTPKhl4VSqlfm2Nc56+dcUm0Y6jiQjBhLIbWevq6RWse6K4R39ovPlTN3z037oJxQHsIETrXxHp0=" # noqa: yaml[line-length]