60acea0da6
We bump the Ansible version to the version that Zuul runs. We then set ansible-lint to the current latest version. This results in a number of new linter violations which we fix. These violations include: * Needing to name plays * Needing to start names with a capital letter * Using fully qualified names for action modules * Quoting permissions strings to avoid octal conversion errors * Using explicit yaml structures for tasks We also tell ansible-lint to mock zuul_return so that we don't get errors from it complaining that this module is not defined. Change-Id: Ic881313fea58f4482f70e493f3d256541d31860a
36 lines
1.1 KiB
YAML
36 lines
1.1 KiB
YAML
# NOTE(ianw) 2023-02-08:
|
|
#
|
|
# In change [1] we dropped python-dev packages and thus stopped
|
|
# installing python2 packages. Jobs should be relying on bindep for
|
|
# this, but many on stable branches aren't. Since the python2/3
|
|
# transition as a weird time, we'll just install python2 packages
|
|
# here.
|
|
#
|
|
# [1] https://review.opendev.org/c/openstack/project-config/+/872476
|
|
|
|
- name: Install Python2 Dependencies
|
|
hosts: all
|
|
become: true
|
|
tasks:
|
|
- name: Install Python 2.7
|
|
package:
|
|
name:
|
|
- python
|
|
- python-dev
|
|
state: present
|
|
when: ansible_facts['distribution'] != "CentOS"
|
|
- name: Install Python 2.7 for CentOS 7
|
|
package:
|
|
name:
|
|
- python
|
|
- python-devel
|
|
state: present
|
|
when: (ansible_facts['distribution'] == "CentOS" and ansible_facts['distribution_major_version'] == "7")
|
|
- name: Install Python 2.7 for CentOS 8
|
|
package:
|
|
name:
|
|
- python2
|
|
- python2-devel
|
|
state: present
|
|
when: (ansible_facts['distribution'] == "CentOS" and ansible_facts['distribution_major_version'] == "8")
|