Ansible deprecation warnings (docker-host)
Open
Nobody has claimed this yet.
- Dominant language
- Jinja
- Stars
- 542
- Forks
- 185
- Avg merge
- 22h 15m
- Merged PRs (30d)
- 4
Description
TASK [docker : add os-specific repos] **********************************************************************************
[WARNING]: Deprecation warnings can be disabled by setting `deprecation_warnings=False` in ansible.cfg.
[DEPRECATION WARNING]: ansible.builtin.apt_key has been deprecated. Use deb822_repository instead. This feature will be removed from ansible-core version 2.25.
Origin: /Users/mzasso/git/nodejs/build/ansible/roles/docker/tasks/partials/repo/ubuntu2204.yml:8:3
6
7 - name: "repo : add Ubuntu Docker repo key"
8 ansible.builtin.apt_key:
^ column 3
[DEPRECATION WARNING]: ansible.builtin.apt_repository has been deprecated. Use deb822_repository instead. This feature will be removed from ansible-core version 2.25.
Origin: /Users/mzasso/git/nodejs/build/ansible/roles/docker/tasks/partials/repo/ubuntu2204.yml:13:3
11
12 - name: "repo : add Ubuntu Docker repo"
13 ansible.builtin.apt_repository:
^ column 3
included: /Users/mzasso/git/nodejs/build/ansible/roles/docker/tasks/partials/repo/ubuntu2204.yml for test-digitalocean-ubuntu2204_docker-x64-2 => (item=/Users/mzasso/git/nodejs/build/ansible/roles/docker/tasks/partials/repo/ubuntu2204.yml)
TASK [docker : repo : add Ubuntu Docker repo] **************************************************************************
[DEPRECATION WARNING]: INJECT_FACTS_AS_VARS default to `True` is deprecated, top-level facts will not be auto injected after the change. This feature will be removed from ansible-core version 2.24.
Origin: /Users/mzasso/git/nodejs/build/ansible/roles/docker/tasks/partials/repo/ubuntu2204.yml:14:11
12 - name: "repo : add Ubuntu Docker repo"
13 ansible.builtin.apt_repository:
14 repo: "deb [arch=amd64] https://download.docker.com/linux/ubuntu {{ ansible_distribution_release }} stable"
^ column 11
Use `ansible_facts["fact_name"]` (no `ansible_` prefix) instead.
This one is printed for each Dockerfile:
[DEPRECATION WARNING]: INJECT_FACTS_AS_VARS default to `True` is deprecated, top-level facts will not be auto injected after the change. This feature will be removed from ansible-core version 2.24.
Origin: /Users/mzasso/git/nodejs/build/ansible/roles/docker/templates/alpine323.Dockerfile.j2
Use `ansible_facts["fact_name"]` (no `ansible_` prefix) instead.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Review ansible/roles/docker/tasks/partials/repo/ubuntu2204.yml and the Dockerfile templates, including alpine323.Dockerfile.j2, where the warnings originate. Replace the deprecated repository modules and top-level fact references while preserving the Docker repository setup; done means these deprecation warnings no longer appear for the Dockerfiles.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ansible, docker
- Domain
- devops, infrastructure
- Issue type
- Refactor
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 68/100