Because there is no docker supported anymore, remove all custom
config of "container_build_tool", only "buildah" is supported.
Change-Id: I57720cc1d7da96f9277b62298cabce9ff7765f47
This change updates the copy task to assume the source is remote. This
will allow the module to use any path provided and not assume the file
is within the relative path from the role.
The become jinja used in the task "Modify image from {{ modify_dir_path }}"
was attempting to match on the full command executed, which would always
evaluate to `false`. This change corrects the condition so that it can
evaluate to true, when "buildah" is used.
Change-Id: I348dbf91b5f2e0dcdfeffd336782c24499d7a569
Signed-off-by: Kevin Carter <kecarter@redhat.com>
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
This allows directly mounting directories instead of copying them
twice. Also the resulting image has only one extra layer instead of
one per Dockerfile directive.
Change-Id: I8a3769c0b55572ba05cc29ecd28a131cc94e8c4d
When using modify_image.yml directly with a multiple image prepare,
the Dockerfile.modified can be overwritten multiple times in a race
which causes the wrong images to be built.
This change uses a tempfile for the modified Dockerfile, avoiding this
issue.
yum_update.yml and rpm_install.yml is not affected by this because
they write out the Dockerfile to a temp directory for each image.
Change-Id: I374f76650ef0b0211d92435d66fdead2b7730b21
There is no need to let these directories clutter /tmp, unless the
modify tasks fail, then it should be left to allow debugging.
Change-Id: Ie258a997951cc17cee9d7b6978e7ecf53e3cffb6
This was broken recently in a2229e738a
where the buildah support hard coded the modify command so that
it required a 'sudo' for the docker version.
Docker does not always require root for these commands. Also,
need to look further as to why buildah required this.
Change-Id: Iae231ec8bc8dc2822fc3d6bfab593cff3c599910
Buildag is a tool that facilitates building OCI container images.
This patch adds support to modify and update containers built by
Buildah.
It's just making sure we can run the build command with their CLI and
also get the user from the container config.
The default remains 'docker' for backward compatibility.
Note: it push the new images with sudo to avoid permissions errors.
Change-Id: I3db1934ad826ec6433bd6aec067112e91d82e355
Use role defaults rather than set_fact tasks.
Remove empty placeholder files.
Add role meta info.
For variables that can't have a sane default, add precheck tasks to fail early if they are not defined.