The dev_install.yaml script breaks when running python 3 because of
unsupported comparisions between 'AnsibleUnsafeText' and 'int' with the
'>' operator.
This is very similar to a bug opened against ansible upstream [0]. We
can fix the issue by using length explicitly, which ensures we're
comparing integers to integers since we're dealing with a list.
[0] https://github.com/ansible/ansible/issues/50388
Change-Id: I100639982b75c9d345269ba9bf10defb7e96d774
This will allow dev to update their container images from a local Python
directory, example in /home/joe/git/openstack/heat.
The new parameter python_dir is a list of directories.
To use it, your playbook must be like:
- hosts: localhost
connection: local
tasks:
- name: dev install heat-api
import_role:
name: tripleo-modify-image
vars:
tasks_from: dev_install.yml
source_image: docker.io/tripleomaster/centos-binary-heat-api:current-tripleo
modified_append_tag: -devel
python_dir:
- /home/joe/git/openstack/heat
Change-Id: I182c3fa58dc9af870e0da9f51ae1e22aa90d03e5
Executes all linters via pre-commit, which is much faster, guarantees
their version locking and allows upgrading them with a single command.
Before this change the only linter running via pre-commit was
ansible-lint.
Now we also run bashate, flake8 and yamllint via pre-commit.
For developer convenience we still keep the old tox environments
which allow running a single linter.
Added long_description_content_type to fix twine check failure
Change-Id: I037eae61921b2a84aa99838804f70e96ee8d8b13
The following playbook will produce a modified image with Python source
code installed via pip. To minimize dependencies within the container
we generate the sdist locally and then copy it into the resulting
container image as an sdist tarball to run pip install locally.
Useful for local ad-hoc testing of upstream patches without
having to build and RPM in those cases.
Change-Id: I93c0e86b2e421b0bcb777d536fcb0d30e0ee3b68