aws-iam-authenticator install via ansible2019 Community Moderator ElectionAnsible - Download latest release binary from Github repoSafely limiting Ansible playbooks to a single machine?Run command on the Ansible hostHow to get the host name of the current machine as defined in the Ansible hosts file?Specify sudo password for AnsibleHow to create a directory using AnsibleHow to move/rename a file using an Ansible task on a remote systemansible: lineinfile for several lines?How to ignore ansible SSH authenticity checking?The async task did not return valid JSONAnsible Module to list iam users?
Determine voltage drop over 10G resistors with cheap multimeter
Friend wants my recommendation but I don't want to give it to him
Animating wave motion in water
What kind of footwear is suitable for walking in micro gravity environment?
How do you justify more code being written by following clean code practices?
Why are there no stars visible in cislunar space?
Should a narrator ever describe things based on a characters view instead of fact?
How can a new country break out from a developed country without war?
Why is indicated airspeed rather than ground speed used during the takeoff roll?
Homology of the fiber
Why do I have a large white artefact on the rendered image?
How to test the sharpness of a knife?
Have the tides ever turned twice on any open problem?
Would this string work as string?
Would mining huge amounts of resources on the Moon change its orbit?
How to read string as hex number in bash?
How to determine the greatest d orbital splitting?
Imaginary part of expression too difficult to calculate
Does convergence of polynomials imply that of its coefficients?
Do I need an EFI partition for each 18.04 ubuntu I have on my HD?
Asserting that Atheism and Theism are both faith based positions
Does the Shadow Magic sorcerer's Eyes of the Dark feature work on all Darkness spells or just his/her own?
When did hardware antialiasing start being available?
How to balance a monster modification (zombie)?
aws-iam-authenticator install via ansible
2019 Community Moderator ElectionAnsible - Download latest release binary from Github repoSafely limiting Ansible playbooks to a single machine?Run command on the Ansible hostHow to get the host name of the current machine as defined in the Ansible hosts file?Specify sudo password for AnsibleHow to create a directory using AnsibleHow to move/rename a file using an Ansible task on a remote systemansible: lineinfile for several lines?How to ignore ansible SSH authenticity checking?The async task did not return valid JSONAnsible Module to list iam users?
Looking how to translate (properly) from a bash command (orig inside a Dockerfile) to ansible task/role that will download latest aws-iam-authenticator binary and install into /usr/local/bin on Ubuntu (x64) OS.
currently I have:
curl -s https://api.github.com/repos/kubernetes-sigs/aws-iam-authenticator/releases/latest | grep "browser_download.url.*linux_amd64" | cut -d : -f 2,3 | tr -d '"' | wget -O /usr/local/bin/aws-iam-authenticator -qi - && chmod 555 /usr/local/bin/aws-iam-authenticator
amazon-web-services ansible
add a comment |
Looking how to translate (properly) from a bash command (orig inside a Dockerfile) to ansible task/role that will download latest aws-iam-authenticator binary and install into /usr/local/bin on Ubuntu (x64) OS.
currently I have:
curl -s https://api.github.com/repos/kubernetes-sigs/aws-iam-authenticator/releases/latest | grep "browser_download.url.*linux_amd64" | cut -d : -f 2,3 | tr -d '"' | wget -O /usr/local/bin/aws-iam-authenticator -qi - && chmod 555 /usr/local/bin/aws-iam-authenticator
amazon-web-services ansible
I have updated the answer with a working example
– Hernan Garcia
Mar 7 at 21:13
add a comment |
Looking how to translate (properly) from a bash command (orig inside a Dockerfile) to ansible task/role that will download latest aws-iam-authenticator binary and install into /usr/local/bin on Ubuntu (x64) OS.
currently I have:
curl -s https://api.github.com/repos/kubernetes-sigs/aws-iam-authenticator/releases/latest | grep "browser_download.url.*linux_amd64" | cut -d : -f 2,3 | tr -d '"' | wget -O /usr/local/bin/aws-iam-authenticator -qi - && chmod 555 /usr/local/bin/aws-iam-authenticator
amazon-web-services ansible
Looking how to translate (properly) from a bash command (orig inside a Dockerfile) to ansible task/role that will download latest aws-iam-authenticator binary and install into /usr/local/bin on Ubuntu (x64) OS.
currently I have:
curl -s https://api.github.com/repos/kubernetes-sigs/aws-iam-authenticator/releases/latest | grep "browser_download.url.*linux_amd64" | cut -d : -f 2,3 | tr -d '"' | wget -O /usr/local/bin/aws-iam-authenticator -qi - && chmod 555 /usr/local/bin/aws-iam-authenticator
amazon-web-services ansible
amazon-web-services ansible
asked Mar 7 at 18:58
JKDayJKDay
1
1
I have updated the answer with a working example
– Hernan Garcia
Mar 7 at 21:13
add a comment |
I have updated the answer with a working example
– Hernan Garcia
Mar 7 at 21:13
I have updated the answer with a working example
– Hernan Garcia
Mar 7 at 21:13
I have updated the answer with a working example
– Hernan Garcia
Mar 7 at 21:13
add a comment |
2 Answers
2
active
oldest
votes
Basically you need to write a playbook and separate that command in various tasks
Example example.yml
file
- hosts: localhost
tasks:
- shell: |
curl -s https://api.github.com/repos/kubernetes-sigs/aws-iam-authenticator/releases/latest
register: json
- set_fact:
url: " from_json).assets[2].browser_download_url "
- get_url:
url: " url "
dest: /usr/local/bin/aws-iam-authenticator-ansible
mode: 0555
you can execute it by doing
ansible-playbook --become example.yml
I hope this is what you're looking for ;-)
Thanks for the information you provided. The only issue I see is that I can't guarantee that the browser_url_download is always the 3rd entry[2]
in the array. I've posted my answer to alleviate that issue after a lot of research.
– JKDay
Mar 8 at 3:29
add a comment |
So after finding other posts that gave strong hints, information and unresolved issues, Ansible - Download latest release binary from Github repo & https://github.com/ansible/ansible/issues/27299#issuecomment-331068246. I was able to come up with the following ansible task that works for me.
- name: Get latest url for linux-amd64 release for aws-iam-authenticator
uri:
url: https://api.github.com/repos/kubernetes-sigs/aws-iam-authenticator/releases/latest
return_content: true
body_format: json
register: json_response
- name: Download and install aws-iam-authenticator
get_url:
url: " from_json"
mode: 555
dest: /usr/local/bin/aws-iam-authenticator
add a comment |
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55050984%2faws-iam-authenticator-install-via-ansible%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
Basically you need to write a playbook and separate that command in various tasks
Example example.yml
file
- hosts: localhost
tasks:
- shell: |
curl -s https://api.github.com/repos/kubernetes-sigs/aws-iam-authenticator/releases/latest
register: json
- set_fact:
url: " from_json).assets[2].browser_download_url "
- get_url:
url: " url "
dest: /usr/local/bin/aws-iam-authenticator-ansible
mode: 0555
you can execute it by doing
ansible-playbook --become example.yml
I hope this is what you're looking for ;-)
Thanks for the information you provided. The only issue I see is that I can't guarantee that the browser_url_download is always the 3rd entry[2]
in the array. I've posted my answer to alleviate that issue after a lot of research.
– JKDay
Mar 8 at 3:29
add a comment |
Basically you need to write a playbook and separate that command in various tasks
Example example.yml
file
- hosts: localhost
tasks:
- shell: |
curl -s https://api.github.com/repos/kubernetes-sigs/aws-iam-authenticator/releases/latest
register: json
- set_fact:
url: " from_json).assets[2].browser_download_url "
- get_url:
url: " url "
dest: /usr/local/bin/aws-iam-authenticator-ansible
mode: 0555
you can execute it by doing
ansible-playbook --become example.yml
I hope this is what you're looking for ;-)
Thanks for the information you provided. The only issue I see is that I can't guarantee that the browser_url_download is always the 3rd entry[2]
in the array. I've posted my answer to alleviate that issue after a lot of research.
– JKDay
Mar 8 at 3:29
add a comment |
Basically you need to write a playbook and separate that command in various tasks
Example example.yml
file
- hosts: localhost
tasks:
- shell: |
curl -s https://api.github.com/repos/kubernetes-sigs/aws-iam-authenticator/releases/latest
register: json
- set_fact:
url: " from_json).assets[2].browser_download_url "
- get_url:
url: " url "
dest: /usr/local/bin/aws-iam-authenticator-ansible
mode: 0555
you can execute it by doing
ansible-playbook --become example.yml
I hope this is what you're looking for ;-)
Basically you need to write a playbook and separate that command in various tasks
Example example.yml
file
- hosts: localhost
tasks:
- shell: |
curl -s https://api.github.com/repos/kubernetes-sigs/aws-iam-authenticator/releases/latest
register: json
- set_fact:
url: " from_json).assets[2].browser_download_url "
- get_url:
url: " url "
dest: /usr/local/bin/aws-iam-authenticator-ansible
mode: 0555
you can execute it by doing
ansible-playbook --become example.yml
I hope this is what you're looking for ;-)
edited Mar 7 at 21:13
answered Mar 7 at 20:17
Hernan GarciaHernan Garcia
565315
565315
Thanks for the information you provided. The only issue I see is that I can't guarantee that the browser_url_download is always the 3rd entry[2]
in the array. I've posted my answer to alleviate that issue after a lot of research.
– JKDay
Mar 8 at 3:29
add a comment |
Thanks for the information you provided. The only issue I see is that I can't guarantee that the browser_url_download is always the 3rd entry[2]
in the array. I've posted my answer to alleviate that issue after a lot of research.
– JKDay
Mar 8 at 3:29
Thanks for the information you provided. The only issue I see is that I can't guarantee that the browser_url_download is always the 3rd entry
[2]
in the array. I've posted my answer to alleviate that issue after a lot of research.– JKDay
Mar 8 at 3:29
Thanks for the information you provided. The only issue I see is that I can't guarantee that the browser_url_download is always the 3rd entry
[2]
in the array. I've posted my answer to alleviate that issue after a lot of research.– JKDay
Mar 8 at 3:29
add a comment |
So after finding other posts that gave strong hints, information and unresolved issues, Ansible - Download latest release binary from Github repo & https://github.com/ansible/ansible/issues/27299#issuecomment-331068246. I was able to come up with the following ansible task that works for me.
- name: Get latest url for linux-amd64 release for aws-iam-authenticator
uri:
url: https://api.github.com/repos/kubernetes-sigs/aws-iam-authenticator/releases/latest
return_content: true
body_format: json
register: json_response
- name: Download and install aws-iam-authenticator
get_url:
url: " from_json"
mode: 555
dest: /usr/local/bin/aws-iam-authenticator
add a comment |
So after finding other posts that gave strong hints, information and unresolved issues, Ansible - Download latest release binary from Github repo & https://github.com/ansible/ansible/issues/27299#issuecomment-331068246. I was able to come up with the following ansible task that works for me.
- name: Get latest url for linux-amd64 release for aws-iam-authenticator
uri:
url: https://api.github.com/repos/kubernetes-sigs/aws-iam-authenticator/releases/latest
return_content: true
body_format: json
register: json_response
- name: Download and install aws-iam-authenticator
get_url:
url: " from_json"
mode: 555
dest: /usr/local/bin/aws-iam-authenticator
add a comment |
So after finding other posts that gave strong hints, information and unresolved issues, Ansible - Download latest release binary from Github repo & https://github.com/ansible/ansible/issues/27299#issuecomment-331068246. I was able to come up with the following ansible task that works for me.
- name: Get latest url for linux-amd64 release for aws-iam-authenticator
uri:
url: https://api.github.com/repos/kubernetes-sigs/aws-iam-authenticator/releases/latest
return_content: true
body_format: json
register: json_response
- name: Download and install aws-iam-authenticator
get_url:
url: " from_json"
mode: 555
dest: /usr/local/bin/aws-iam-authenticator
So after finding other posts that gave strong hints, information and unresolved issues, Ansible - Download latest release binary from Github repo & https://github.com/ansible/ansible/issues/27299#issuecomment-331068246. I was able to come up with the following ansible task that works for me.
- name: Get latest url for linux-amd64 release for aws-iam-authenticator
uri:
url: https://api.github.com/repos/kubernetes-sigs/aws-iam-authenticator/releases/latest
return_content: true
body_format: json
register: json_response
- name: Download and install aws-iam-authenticator
get_url:
url: " from_json"
mode: 555
dest: /usr/local/bin/aws-iam-authenticator
answered Mar 8 at 3:33
JKDayJKDay
1
1
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55050984%2faws-iam-authenticator-install-via-ansible%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
I have updated the answer with a working example
– Hernan Garcia
Mar 7 at 21:13