Code Monkey home page Code Monkey logo

Comments (5)

nickjj avatar nickjj commented on June 12, 2024 1

I can't say for sure but that sounds like maybe you ran the playbook without gathering facts.

You'll need to gather_facts: True for those ansible_* variables to be defined. This is normal Ansible behavior.

from ansible-docker.

nickjj avatar nickjj commented on June 12, 2024

You shouldn't need to configure anything extra to have everything work. Just by calling the role with its current defaults you should end up with the latest Docker / Docker Compose installed and a cron job to deal with Docker related maintenance.

What held you back from it all working automatically?

Btw all of the defaults in the readme are real defaults. You can see them at https://github.com/nickjj/ansible-docker/blob/master/defaults/main.yml.

from ansible-docker.

ArtemBernatskyy avatar ArtemBernatskyy commented on June 12, 2024

There are a couple of predefined variables but

TASK [nickjj.docker : Configure upstream APT repository] **************************************************************************************************************************** fatal: [default]: FAILED! => {"failed": true, "msg": "The task includes an option with an undefined variable. The error was: deb [arch=amd64] https://download.docker.com/linux/{{ docker_distribution | lower }} {{ docker_distribution_release }} {{ docker_channel }}: {{ ansible_local.core.distribution_release if (ansible_local|d() and ansible_local.core|d() and ansible_local.core.distribution_release|d()) else ansible_distribution_release }}: 'ansible_distribution_release' is undefined\n\nThe error appears to have been in '/Users/artem/.ansible/roles/nickjj.docker/tasks/main.yml': line 26, column 3, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n\n- name: Configure upstream APT repository\n ^ here\n\nexception type: <class 'ansible.errors.AnsibleUndefinedVariable'>\nexception: deb [arch=amd64] https://download.docker.com/linux/{{ docker_distribution | lower }} {{ docker_distribution_release }} {{ docker_channel }}: {{ ansible_local.core.distribution_release if (ansible_local|d() and ansible_local.core|d() and ansible_local.core.distribution_release|d()) else ansible_distribution_release }}: 'ansible_distribution_release' is undefined"}

as u can see there are a lot of not predefined variables

from ansible-docker.

ArtemBernatskyy avatar ArtemBernatskyy commented on June 12, 2024

Yes you r right ( I'll close this issue. Thx for help !

from ansible-docker.

ArtemBernatskyy avatar ArtemBernatskyy commented on June 12, 2024

For those with similar situation when you don't want to gather facts at the beginning you can use this task, it will gather facts at that specific point

- name: Gathering facts
  setup:

from ansible-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.