back to listing index

ansible local_action returns error "invalid output was: [sudo via ansible, key=xxx] password:"

[web search]
Original source (stackoverflow.com)
Tags: ansible
Clipped on: 2016-01-27

I've being trying to run this ansible playbook to get a AWS resource tags:

- name: list resource tags local_action: ec2_tag resource=i-abcdefg region=us-east-1 state=list register: result

And this error is returned:

failed: [ec2-11-222-333-444.compute-1.amazonaws.com] => {"failed": true, "parsed": false} invalid output was: [sudo via ansible, key=heoqwlqnhxlxyzwnxmtbvmdtvmvjbsux] password:

FATAL: all hosts have already failed -- aborting

How can I fix that

asked Jun 25 '14 at 16:23
Image (Asset 2/2) alt=
douglaslps
2,65711135
up vote 13 down vote accepted

You cannot run this local_action as root. Change your task to be:

- name: list resource tags sudo: false local_action: ec2_tag resource=i-abcdefg region=us-east-1 state=list register: result

answered Jun 25 '14 at 16:23
douglaslps
2,65711135
   upvote
  flag
Any idea why this is? – Eli Jun 23 '15 at 21:58
   upvote
  flag
Perhaps because it would require a password and ansible cannot provide it. – douglaslps Jun 24 '15 at 12:04

Your Answer

asked

1 year ago

viewed

2957 times

active

1 year ago

Featured on Meta

Technology Life / Arts Culture / Recreation Science Other
  1. Stack Overflow
  2. Server Fault
  3. Super User
  4. Web Applications
  5. Ask Ubuntu
  6. Webmasters
  7. Game Development
  8. TeX - LaTeX
  1. Programmers
  2. Unix & Linux
  3. Ask Different (Apple)
  4. WordPress Development
  5. Geographic Information Systems
  6. Electrical Engineering
  7. Android Enthusiasts
  8. Information Security
  1. Database Administrators
  2. Drupal Answers
  3. SharePoint
  4. User Experience
  5. Mathematica
  6. Salesforce
  7. ExpressionEngine® Answers
  8. more (13)
  1. Photography
  2. Science Fiction & Fantasy
  3. Graphic Design
  4. Movies & TV
  5. Seasoned Advice (cooking)
  6. Home Improvement
  7. Personal Finance & Money
  8. Academia
  9. more (9)
  1. English Language & Usage
  2. Skeptics
  3. Mi Yodeya (Judaism)
  4. Travel
  5. Christianity
  6. Arqade (gaming)
  7. Bicycles
  8. Role-playing Games
  9. more (21)
  1. Mathematics
  2. Cross Validated (stats)
  3. Theoretical Computer Science
  4. Physics
  5. MathOverflow
  6. Chemistry
  7. Biology
  8. more (5)
  1. Stack Apps
  2. Meta Stack Exchange
  3. Area 51
  4. Stack Overflow Careers
site design / logo © 2016 Stack Exchange Inc; user contributions licensed under cc by-sa 3.0 with attribution required
rev 2016.1.27.3215