
I noticed this by accident when I ran ansible-lint over this repo from an outside context; it didn't use the .yamllint in here and started compalining about eof whitespace. After scratching my head for a bit as to why this didn't fail here, I realised we've allowed various newlines since the initial commit I936fe2c997597972d884c5fc62655d28e8aaf8c5. Remove this and just use the default eof rules, and fixup the whitespace as required. This is fairly unimportant, but is nice for consistency. Change-Id: Idb46a1f39ba798b0bf70eaa27b4c6b4758ce3d26
46 lines
1.5 KiB
YAML
46 lines
1.5 KiB
YAML
#
|
|
# This file contains workaround tasks for specific issues
|
|
#
|
|
|
|
# Somehow on SuSE 15 the dependencies are such that python2-pip can be
|
|
# installed, but setuptools is not. This breaks Ansible's pip: which
|
|
# does a direct import of pkg_resources and thus has a hard-dependency
|
|
# on setuptools. This doesn't appear to happen for python3. Thus we
|
|
# ensure this is installed, even if we skipped install phase because
|
|
# pip looked like it was installed already.
|
|
- name: Ensure setuptools
|
|
package:
|
|
name: python-setuptools
|
|
become: yes
|
|
when:
|
|
- ansible_python.version.major == 2
|
|
- ansible_os_family == 'Suse'
|
|
- ansible_distribution_major_version == '15'
|
|
|
|
# Part of this role is exporting a working virtualenv_command for you
|
|
# -- on Debuntu, the presence of venv (i.e. "python3 -m venv --help"
|
|
# works) doesn't actually mean venv works ... that's just a stub that
|
|
# will give you an error telling you the python3-venv package isn't
|
|
# installed.
|
|
#
|
|
# It's quite possible we have pip and so have skipped installing from
|
|
# packages, where we would have brought this in. To avoid requiring
|
|
# sudo, which is the whole point of probing for pip and skipping
|
|
# install if we have it, we probe for the package here and only
|
|
# install if required.
|
|
- name: Check for python3-venv
|
|
command: dpkg --status python3-venv
|
|
failed_when: false
|
|
register: _deb_venv_pkg
|
|
when:
|
|
- ansible_os_family == 'Debian'
|
|
|
|
- name: Ensure python3-venv
|
|
package:
|
|
name:
|
|
- python3-venv
|
|
become: yes
|
|
when:
|
|
- ansible_os_family == 'Debian'
|
|
- _deb_venv_pkg.rc != 0
|