Installed ansible as post-install instead of feature

This commit is contained in:
Francesco Zimbolo
2026-04-24 12:58:33 +00:00
parent 8477f5b592
commit 6f6cc10aae

View File

@@ -1,19 +1,15 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the // For format details, see https://aka.ms/devcontainer.json.
// README at: https://github.com/devcontainers/templates/tree/main/src/python
{ {
"name": "Python 3", "name": "Ansible - Proxmox Post-Install",
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
"image": "mcr.microsoft.com/devcontainers/python:3-3.14-trixie", "image": "mcr.microsoft.com/devcontainers/python:3-3.14-trixie",
// Features to add to the dev container. More info: https://containers.dev/features.
"features": { // Do NOT use separate devcontainer features for ansible and ansible-lint.
"ghcr.io/devcontainers-extra/features/ansible": {}, // Both features use pipx and create isolated venvs, so ansible-lint ends up
"ghcr.io/hspaans/devcontainer-features/ansible-lint": {} // with its own internal Ansible copy that cannot see externally installed
}, // collections — causing syntax-check failures even after collection install.
// Use 'forwardPorts' to make a list of ports inside the container available locally. // Installing everything via pip into the shared base Python env solves this.
// "forwardPorts": [], "postCreateCommand": "pip install --quiet ansible ansible-lint && ansible-galaxy collection install -r ansible/requirements.yaml",
// Use 'postCreateCommand' to run commands after the container is created.
// "postCreateCommand": "pip3 install --user -r requirements.txt",
// Configure tool-specific properties.
"customizations": { "customizations": {
"vscode": { "vscode": {
"settings": { "settings": {
@@ -25,6 +21,4 @@
] ]
} }
} }
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
// "remoteUser": "root"
} }