2db422f0b8
We ran into issues getting ansible-lint to run on Noble without updating everything to current ish versions due to Python 3.12 compatibility issues. Updating everything in this way created a bunch of new lint errors we need to fix so we worked around the problem previously by pinning back to Jammy. Now we move the job back to Noble (the default Nodeset) and update the tooling and fix the linter errors. This should allow us to move forward in a productive manner on modern platforms. The linter errors we fix include: * Naming every play * Ensuring every play name starts with a capital letter * Using fully qualified collection names for action modules (archive, git_config, and synchronize) * Quoting octal file modes Change-Id: I96560c5ce2a5af39d39b3fc339862932a856bd13
94 lines
2.8 KiB
YAML
94 lines
2.8 KiB
YAML
- name: Prepare a Code Proposal Environment
|
|
hosts: all
|
|
pre_tasks:
|
|
- name: Ensure pip
|
|
include_role:
|
|
name: ensure-pip
|
|
|
|
- name: Install git-review
|
|
pip:
|
|
name: git-review
|
|
virtualenv: /opt/git-review
|
|
virtualenv_command: '{{ ensure_pip_virtualenv_command }}'
|
|
become: yes
|
|
|
|
- name: Link git-review
|
|
file:
|
|
src: /opt/git-review/bin/git-review
|
|
dest: /usr/local/bin/git-review
|
|
owner: root
|
|
group: root
|
|
state: link
|
|
become: yes
|
|
|
|
- name: Copy scripts to the script dir on the node
|
|
copy:
|
|
dest: '{{ ansible_user_dir }}/scripts/'
|
|
src: '{{ item }}'
|
|
mode: '0755'
|
|
with_items:
|
|
- generate_puppetfile.sh
|
|
- propose_update.sh
|
|
- sync_openstack_ansible_common_files.sh
|
|
|
|
roles:
|
|
- role: configure-git
|
|
git_config:
|
|
user.name: OpenStack Proposal Bot
|
|
user.email: openstack-infra@lists.openstack.org
|
|
gitreview.username: proposal-bot
|
|
- copy-proposal-common-scripts
|
|
# For propose-update-constraints
|
|
- copy-release-tools-scripts
|
|
- add-sshkey
|
|
- bindep
|
|
|
|
tasks:
|
|
# NOTE: Due to a confluence of problems between requirements
|
|
# versions, java versions, zanata clients, etc. translation
|
|
# proposal jobs have to run on bionic. However, ensure-tox uses
|
|
# ensure_pip_virtualenv_command, which installs using default
|
|
# python on the system. On bionic this is 3.6, which can not deal
|
|
# with master upper-constraints.txt.
|
|
#
|
|
# So we bring in the python 3.8 packages and override ensure-tox
|
|
# to use this to create the tox environment.
|
|
- name: Setup Bionic
|
|
when: ansible_distribution == 'Ubuntu' and ansible_distribution_release == 'bionic'
|
|
block:
|
|
- name: Ensure python
|
|
include_role:
|
|
name: ensure-python
|
|
vars:
|
|
python_version: 3.8
|
|
|
|
- name: Setup virtualenv version
|
|
set_fact:
|
|
_venv_command: '/usr/bin/python3.8 -m venv'
|
|
|
|
# The base proposal jobs require both python3.8 and python3.9.
|
|
# Bring in Python 3.9 for them here.
|
|
- name: Setup Focal
|
|
when: ansible_distribution == 'Ubuntu' and ansible_distribution_release == 'focal'
|
|
block:
|
|
- name: Ensure python
|
|
include_role:
|
|
name: ensure-python
|
|
vars:
|
|
python_version: 3.9
|
|
|
|
- name: Install tox with venv command override
|
|
include_role:
|
|
name: ensure-tox
|
|
vars:
|
|
ensure_global_symlinks: true
|
|
ensure_pip_virtualenv_command: '{{ _venv_command }}'
|
|
when: _venv_command is defined
|
|
|
|
- name: Install tox without venv command override
|
|
include_role:
|
|
name: ensure-tox
|
|
vars:
|
|
ensure_global_symlinks: true
|
|
when: _venv_command is not defined
|