Giter Club home page Giter Club logo

ansible-protoc's Introduction

ansible-protoc's People

Contributors

andrewrothstein avatar

Stargazers

 avatar

Watchers

James Cloos avatar  avatar  avatar

ansible-protoc's Issues

ansible_architecture access in map is incorrect

ansible install details:

$ ansible --version
ansible [core 2.13.4]
  config file = None
  configured module search path = ['/Users/jackevans/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /opt/homebrew/Cellar/ansible/6.4.0/libexec/lib/python3.10/site-packages/ansible
  ansible collection location = /Users/jackevans/.ansible/collections:/usr/share/ansible/collections
  executable location = /opt/homebrew/bin/ansible
  python version = 3.10.6 (main, Aug 30 2022, 04:58:14) [Clang 13.1.6 (clang-1316.0.21.2.5)]
  jinja version = 3.1.2
  libyaml = True

Trying to use this ansible role to install protoc on a m1 mac and am getting the following error:

TASK [andrewrothstein.protoc : downloading {{ protoc_url }} to {{ protoc_tmp_zip }}] *********************************************************************************************************************************
fatal: [localhost]: FAILED! => {"msg": "The task includes an option with an undefined variable. The error was: {{ protoc_mirror }}/v{{ protoc_ver }}/{{ protoc_zip }}: protoc-{{ protoc_ver }}-{{ protoc_platform }}.zip: {{ protoc_os }}-{{ protoc_arch }}: {{ protoc_arch_map[ansible_architecture] }}: 'dict object' has no attribute 'arm64'\n\nThe error appears to be in '/Users/jackevans/.ansible/roles/andrewrothstein.protoc/tasks/main.yml': line 22, column 7, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n  block:\n    - name: downloading {{ protoc_url }} to {{ protoc_tmp_zip }}\n      ^ here\nWe could be wrong, but this one looks like it might be an issue with\nmissing quotes. Always quote template expression brackets when they\nstart a value. For instance:\n\n    with_items:\n      - {{ foo }}\n\nShould be written as:\n\n    with_items:\n      - \"{{ foo }}\"\n"}

TASK [andrewrothstein.protoc : rm {{ protoc_tmp_zip }}] **************************************************************************************************************************************************************
fatal: [localhost]: FAILED! => {"msg": "The task includes an option with an undefined variable. The error was: /tmp/{{ protoc_zip }}: protoc-{{ protoc_ver }}-{{ protoc_platform }}.zip: {{ protoc_os }}-{{ protoc_arch }}: {{ protoc_arch_map[ansible_architecture] }}: 'dict object' has no attribute 'arm64'\n\nThe error appears to be in '/Users/jackevans/.ansible/roles/andrewrothstein.protoc/tasks/main.yml': line 46, column 7, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n  always:\n    - name: rm {{ protoc_tmp_zip }}\n      ^ here\nWe could be wrong, but this one looks like it might be an issue with\nmissing quotes. Always quote template expression brackets when they\nstart a value. For instance:\n\n    with_items:\n      - {{ foo }}\n\nShould be written as:\n\n    with_items:\n      - \"{{ foo }}\"\n"}

seems like it is trying to access protoc_arch_map[ansible_architecture] but is getting empty. On an m1 mac, the ansible_architecture is coming back as arm64 which doesnt match anything defined in the map:

protoc_arch_map:
  aarch64: aarch_64
  ppc64le: ppcle_64
  s390x: s390x
  x86_64: x86_64
  x86_32: x86_64

I also notice there are a few other modules developed that have a similar issue. happy to look at putting in a PR to fix this if it helps ๐Ÿ™‚

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.