Code Monkey home page Code Monkey logo

Comments (3)

geerlingguy avatar geerlingguy commented on August 26, 2024

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.

pkaramol avatar pkaramol commented on August 26, 2024

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.

pkaramol avatar pkaramol commented on August 26, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.