Skip to content

[!!!][TASK] Remove the Ansible provisioning from the images - #600

Merged
Kanti merged 1 commit into
webdevops:masterfrom
andersundsehr:chore/remove-ansible-provisioning
Nov 9, 2026
Merged

Kanti merged 1 commit into
webdevops:masterfrom
andersundsehr:chore/remove-ansible-provisioning

Conversation

@Kanti

@Kanti Kanti commented Nov 9, 2026

Copy link
Copy Markdown
Collaborator

Summary

Removes the Ansible provisioning from the images. It did not work in any image, and there was nothing left for it to run.

Until May 2017 the images were built with Ansible roles (provision run --tag bootstrap --role webdevops-…). The switch to shell scripts in bootstrap.d, build.d and entrypoint.d (6390b47) removed the roles and kept docker-provision and docker-ansible-install for roles of one's own. Today docker-ansible-install asks for Python 2 packages that no longer exist (python-minimal, python-pip, py-jinja2, …), and provision.py is Python 2 code that needs a python binary no image has, so every call fails. Users get a removed command instead of a failing one; hence [!!!].

Changes

  • Removed from provisioning/base/general, and so from base, php/php-official and every image built on them:
    • docker-provision, docker-ansible-install, /opt/docker/bin/provision and provision.py
    • ansible.cfg, variables.yml, variables-webdevops.yml, the empty roles/
    • the empty onbuild.d/, which docker-run-bootstrap never runs
  • control.sh: the 20 provision.role* commands, which only called /opt/docker/bin/provision. The other commands are unchanged.
  • Tests: base::layout no longer checks roles/, onbuild.d/ and docker-provision; the unused Ansible patterns in spec_config.rb are gone.
  • Docs: the known issues for onbuild.d and the Ansible provisioning become a note under "Migration from older images" that points to bootstrap.d and build.d.

How it was verified

  • docker-provision list in the current base:ubuntu-22.04, base:alpine, php:8.5 and php:8.5-alpine: the installer fails on the missing packages everywhere, then provision.py fails (exit code 127; in php:8.5-alpine a Python 3 SyntaxError).
  • base built completely, php:8.5 and 8.5-alpine built up to the setup step, each with the old and the new files: only the removed files and control.sh differ.
  • In the new images docker-provision is not found and control.sh provision.role reports an invalid command; control.sh version.get is unchanged.
  • Serverspec for base (Ubuntu, Alpine) and php 8.5 (Debian, Alpine) and the base structure test pass. Each serverspec run has 41 examples fewer, exactly the removed layout checks.
  • make provision and ci/console github:generate-ci produce no unexpected diff; build.yaml is unchanged.

docker-provision, docker-ansible-install, /opt/docker/bin/provision with
provision.py and the provision.role* commands of control.sh did not work
in any image: the installer asks for Python 2 packages that no longer
exist (python-minimal, python-pip, py-jinja2, ...), and provision.py
needs a python binary that no image has, so every call ended with exit
code 127. The roles directory was empty, so there was nothing to run.

Removed with them: ansible.cfg, variables.yml, variables-webdevops.yml,
the empty roles directory and /opt/docker/provision/onbuild.d, which
docker-run-bootstrap never ran. The two known issues become a migration
note; scripts at image build go to bootstrap.d or build.d.
@sonarqubecloud

sonarqubecloud Bot commented Nov 9, 2026

Copy link
Copy Markdown

@Kanti
Kanti marked this pull request as ready for review November 9, 2026 12:35
@Kanti
Kanti merged commit 9ae7b5c into webdevops:master Nov 9, 2026
322 of 327 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant