Comments (3)
That failure indicates Ansible is not able to determine the release version—it uses the variable ansible_distribution_release
to build the repo URL.
See: https://github.com/geerlingguy/ansible-role-docker/blob/master/defaults/main.yml#L20
I would suggest you force override the variable in this situation, since I'm guessing you won't be able to fix the upstream AMI:
docker_apt_repository: "deb [arch={{ docker_apt_arch }}] https://download.docker.com/linux/debian stretch Release"
from ansible-role-docker.
I performed the following on my site.yml
- name: pre_tasks --> Force set ansible_distribution_release variable cause it is not set in stretch ami
set_fact:
ansible_distribution_release: "stretch"
when: ansible_distribution_release == "NA" and ansible_distribution_version == "stretch/sid"
but now it fails as follows;
(any suggestions? the same role works ok when spinning up a jessie
ami.
as it if tries to find the task file to include in the wrong place;
amazon-ebs: TASK [geerlingguy.docker : include_tasks] **************************************
amazon-ebs: Friday 23 November 2018 10:22:22 +0200 (0:00:00.045) 0:00:58.088 *******
amazon-ebs: fatal: [default]: FAILED! =>
amazon-ebs: reason: |-
amazon-ebs: Unable to retrieve file contents
amazon-ebs: Could not find or access '/home/pkara/Workspace/gitlab/aws_ami/ansible/setup-Debian.yml' on the Ansible Controller.
amazon-ebs: If you are using a module and expect the file to exist on the remote, see the remote_src option
overriding the {{ docker_apt_repository }}
variable failed as follows:
amazon-ebs: TASK [geerlingguy.docker : Install Docker.] ************************************
amazon-ebs: Friday 23 November 2018 10:48:05 +0200 (0:00:03.073) 0:01:05.176 *******
amazon-ebs: fatal: [default]: FAILED! => changed=false
amazon-ebs: msg: No package matching 'docker-ce' is available
from ansible-role-docker.
Nevermind, this fixed it:
- name: pre_tasks --> Force set ansible_distribution_release variable cause it is not set in stretch ami
set_fact:
ansible_distribution_release: "stretch"
ansible_distribution_version: "9"
when: ansible_distribution_release == "NA" and ansible_distribution_version == "stretch/sid"
from ansible-role-docker.
Related Issues (20)
- Run playbook HOT 1
- Idempotence test failed HOT 3
- feature: use ansible facts HOT 3
- Amazon Linux 2023 support HOT 1
- docker-compose-plugin install fails on arch HOT 6
- geerlingguy.docker was NOT installed successfully HOT 4
- error in first run during check if there are any users to add to docker group HOT 3
- Failure when adding docker repository HOT 7
- GPG keys should not be saved to `/apt/trusted.gpg.d` / Do not use `apt-key` HOT 2
- Playbook Fails with error when uninstalling HOT 2
- Reload system config at start HOT 2
- ansible.builtin.include has been removed Error while installing docker role HOT 2
- no /etc/docker/daemon.json ? HOT 1
- Fix min_ansible_version type HOT 1
- Update docker version HOT 2
- No luck with this role on ubuntu-24.04-minimal-cloudimg-amd64.img HOT 1
- ERROR "No package matching 'containerd.io' is available" at remote host "ubuntu 20.04" HOT 1
- Failure when docker repo is already present but not enabled
- Recent role update does not remove previous versions of the apt key, and so duplicate apt keys are created on Debian HOT 1
- Encountering "Error while fetching server API version: Not supported URL scheme http+docker" HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ansible-role-docker.