Installs protoc
See meta/main.yml
See meta/main.yml
- hosts: servers
roles:
- andrewrothstein.protoc
MIT
Andrew Rothstein [email protected]
License: MIT License
Installs protoc
See meta/main.yml
See meta/main.yml
- hosts: servers
roles:
- andrewrothstein.protoc
MIT
Andrew Rothstein [email protected]
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 ๐
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.