Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed: AnsibleNonZero: Error running Ansible Node Step. #46

Closed
farkasferi opened this issue Jul 22, 2016 · 7 comments
Closed

Failed: AnsibleNonZero: Error running Ansible Node Step. #46

farkasferi opened this issue Jul 22, 2016 · 7 comments
Labels

Comments

@farkasferi
Copy link

I'm using the latest Rundeck, Ansible, and Rundeck ansible plugin.

I keep getting this error:

08:31:59 localhost 1. Ansible Playbook Using /etc/ansible/ansible.cfg as config file
08:31:59 Failed: AnsibleNonZero: Error running Ansible Node Step.
08:31:59 Execution failed: 6: [Workflow result: , step failures: {1=Dispatch failed on 1 nodes: [localhost: AnsibleNonZero: Error running Ansible Node Step.]}, Node failures: {localhost=[AnsibleNonZero: Error running Ansible Node Step.]}, status: failed]

What do i wrong?

@frozenice
Copy link
Contributor

Hi, please get more information via the debug mode (see README).

@yassineazzouz
Copy link
Contributor

Hi @frantyo ,

Any updates on this ?

@telefax
Copy link

telefax commented Aug 20, 2016

I had a similar problem, at least the error message was the same.

It seem to work better if I set the "hosts" directive in my playbook. I can set hosts to something and then use that something as a tag in my project node filter.
The error seem to appear when the playbook has syntax errors...like missing the hosts directive.

EDIT: removed some stuff since I couldn't reproduce it.

Also, I see you ask people to debug rundeck using the instructions in the readme:

"add a Java system property named ansible.debug with the value true. You can do that for example in /etc/rundeck/profile, make sure to restart your rundeck service."

This should need some examples as well. I have no clue how to set a java system property somewhere in the profile file.

If we want to display bad hosts, maybe we can tag them with OFFLINE or some custom tag?
This way we can filter them out from the jobs.

@another-admin
Copy link

I have the same problem.
Bellow log from run simple playbook after add ansible.debug=true to /etc/rundeck/profile:

15:19:46 2: Workflow step executing: StepExecutionItem{type='NodeDispatch', keepgoingOnSuccess=false, hasFailureHandler=false}
15:19:46 preparing for sequential execution on 1 nodes
15:19:46 Executing command on node: localhost, NodeEntryImpl{tags=[], attributes={nodename=localhost, hostname=localhost, osFamily=unix, osVersion=3.10.0-327.13.1.el7.x86_64, osArch=amd64, description=Rundeck server node, osName=Linux, username=rundeck, tags=}, project='null'}
15:19:46 [workflow] beginExecuteNodeStep(localhost): NodeDispatch: StepExecutionItem{type='NodeDispatch', keepgoingOnSuccess=false, hasFailureHandler=false}
15:19:46 extraArgs: -vvv
15:19:46 tokenized: [-vvv]
15:19:47 Using /etc/ansible/ansible.cfg as config file
15:19:47 Failed: AnsibleNonZero: Error running Ansible Node Step.
15:19:47 [workflow] finishExecuteNodeStep(localhost): NodeDispatch: AnsibleNonZero: Error running Ansible Node Step.
15:19:47 2: Workflow step finished, result: Dispatch failed on 1 nodes: [localhost: AnsibleNonZero: Error running Ansible Node Step.]
15:19:47 [workflow] Finish step: 2,NodeDispatch
15:19:47 [workflow] Finish execution: rundeck-workflow-step-first: [Workflow result: , step failures: {2=Dispatch failed on 1 nodes: [localhost: AnsibleNonZero: Error running Ansible Node Step.]}, Node failures: {localhost=[AnsibleNonZero: Error running Ansible Node Step.]}, flow control: Continue, status: failed]
15:19:47 [Workflow result: , step failures: {2=Dispatch failed on 1 nodes: [localhost: AnsibleNonZero: Error running Ansible Node Step.]}, Node failures: {localhost=[AnsibleNonZero: Error running Ansible Node Step.]}, flow control: Continue, status: failed]
15:19:47 Execution failed: 69: [Workflow result: , step failures: {2=Dispatch failed on 1 nodes: [localhost: AnsibleNonZero: Error running Ansible Node Step.]}, Node failures: {localhost=[AnsibleNonZero: Error running Ansible Node Step.]}, flow control: Continue, status: failed]

rundeck job have two resources:

  1. file
  2. ansible-resources

Additional info: rundeck don't get nodes from ansible inventory.
Playbook run from user rundeck without problem.

@kondalonline
Copy link

@another-admin
Can you check /var/log/ansible.log
You might see below error which would help to troubleshoot.
ERROR! Specified --limit does not match any hosts

@kondalonline
Copy link

@ALL..
If the error matches the info mentioned in my previous post
then follow this.

  1. Create a new project, select Ansible Resource model as source
  2. Ansible file copier for copying files
  3. AnsibleNodeExecutor as adhoc node executor.

Create a the same job in this project and see if it runs fine ? Let me know if that worked for you

@yassineazzouz
Copy link
Contributor

Hi @another-admin @farkasferi ,

I would avoid using Node Steps, you can check release 2.0.0 (note that the Node steps are removed, please use workflow steps instead)

Thanks,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants