Giter Site home page Giter Site logo

Comments (5)

t-prinz avatar t-prinz commented on August 11, 2024

Just for reference, I am running into this as well:

TASK [wetty : Copy cert.pem to Wetty dir] ******************************************************************************************
fatal: [EduCauseTrey.tower.0.redhatgov.io]: FAILED! => {"msg": "The task includes an option with an undefined variable. The error was: 'dict object' has no attribute 'ec2_tag_Index'\n\nThe error appears to have been in '/home/tprinz/Documents/Projects/EduCause-2018-Ansible-Workshop/redhatgov.workshops/roles/wetty/tasks/main.yml': line 39, 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: Copy cert.pem to Wetty dir\n ^ here\n"}
fatal: [EduCauseTrey.tower.1.redhatgov.io]: FAILED! => {"msg": "The task includes an option with an undefined variable. The error was: 'dict object' has no attribute 'ec2_tag_Index'\n\nThe error appears to have been in '/home/tprinz/Documents/Projects/EduCause-2018-Ansible-Workshop/redhatgov.workshops/roles/wetty/tasks/main.yml': line 39, 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: Copy cert.pem to Wetty dir\n ^ here\n"}

from redhatgov.workshops.

ajacocks avatar ajacocks commented on August 11, 2024

from redhatgov.workshops.

rafaeltuelho avatar rafaeltuelho commented on August 11, 2024

I'm using on my Mac:

Python 2.7.15
Ansible 2.6.2
Terraform v0.11.10

pip list | grep boto
boto                          2.49.0
boto3                        1.7.72
botocore                   1.10.72

But, in order to get instances tag from ec2 I had to use this: https://github.com/rafaeltuelho/redhatgov.workshops/blob/redhatbr/roles/wetty/tasks/main.yml#L3-L10

and then I can use this: {{ hostvars[inventory_hostname].ec2_tags.tags.Index }}, like in https://github.com/rafaeltuelho/redhatgov.workshops/blob/redhatbr/roles/wetty/tasks/main.yml#L52

from redhatgov.workshops.

ajacocks avatar ajacocks commented on August 11, 2024

from redhatgov.workshops.

rafaeltuelho avatar rafaeltuelho commented on August 11, 2024

Thanks, @ajacocks ! I'll take a look at this approach.
thanks.

from redhatgov.workshops.

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.