logo
down
shadow

sudo error when running playbook in ansible


sudo error when running playbook in ansible

Content Index :

sudo error when running playbook in ansible
Tag : ansible , By : hammer_1968
Date : January 12 2021, 08:33 AM

help you fix your problem Here is my output of test.yml ansible-playbook test.yml
I think you've problem in inventory (dev) file.. mine is
[server]
server ansible_host=ip_address ansible_user=ubuntu ansible_private_key_file=/path_to_keyfile/docker-key.pem

Comments
No Comments Right Now !

Boards Message :
You Must Login Or Sign Up to Add Your Comments .

Share : facebook icon twitter icon

Running a command in an ansible-playbook from the ansible host using variables from the current ansible process


Tag : ansible , By : shenol
Date : March 29 2020, 07:55 AM
To fix this issue Having hit a brick wall with troubleshooting why one shell script is hanging when I'm trying to run it via Ansible on the remote host, I've discovered that if I run it in an ssh session from the ansible host it executes successfully. , Try with ansible_host:
- name: Run script
  local_action: 'shell ssh {{ ansible_host }} "/home/ansibler/script.sh"'

Why do my sudo commands work with ansible but not with ansible-playbook?


Tag : azure , By : Gerhard Miller
Date : March 29 2020, 07:55 AM
This might help you connection: local means execute every command on the localhost.
Remove it from your playbook and try again.

Ansible playbook only working with root user and failing when running with other sudo user


Tag : ansible , By : Magnus
Date : March 29 2020, 07:55 AM
around this issue I will suggest making for admin@10.16.24.102 and admin@10.165.240.103 sudo access without password:
You can add to /etc/sudoers file:
admin ALL=(ALL:ALL) NOPASSWD:ALL

run ansible playbook with sudo


Tag : ansible , By : user183954
Date : March 29 2020, 07:55 AM

How can I run commands in sudo mode with ansible playbook?


Tag : ansible , By : Andrew Mattie
Date : March 29 2020, 07:55 AM
Related Posts Related QUESTIONS :
  • How to fix: problem with conflicting request when installing ansible
  • How to get Ansible to run a step ONLY 1x
  • Ansible to store variable facts
  • Why register is registering even if the module when condition is false?
  • Ansible EC2 Dynamic Inventory with host_vars
  • How to loop over tasks with each task having another loop
  • Ansible - with_dict: dictionary - How to use variables defined in each dictionary which depends upon others
  • In Ansible, how to apply a scalar filter to a list
  • Ansible playbook with json output
  • Is there a better way to iterate through multiple files on the node machine using Ansible playbook and search n replace
  • Location to keep Ansible custom modules
  • Ansible remove blank lines from list
  • Variable from another host in ansible
  • Pass through a variable to an included playbook
  • Using Ansible to orchestrate (delegate_to)
  • Ansible: find file and loop over paths
  • Copy Files from one server to another using Ansible
  • Ansible Dynamic Inventory
  • include playbook with a variable name, which is defined on another host
  • calling an ansible playbook with tag and parameter
  • Ansible parse JSON with YAML
  • Copying files from S3 buckets in Ansible
  • Ansible: looping over with multiple {{ items }}
  • How to read an Ansible variable from a string containing YAML?
  • Modify source file used for the Copy on the target machine
  • using '#' in group_vars for ansible
  • How set ansible function to when modeule?
  • ansible "sed: can't read file: No such file or directory"
  • Ansible: customizable template filenames
  • Ansible render variable from set variable
  • How to set ansible configuration variables run time
  • ERROR! 'notify' is not a valid attribute for a Play
  • When conditional from ssh command line in Ansible Role
  • How to debug a failing Ansible playbook?
  • Can inventory plugin "constructed" create a groups based on ansible_facts?
  • Run Ansible module module multiple time
  • optimizing ansible playbook to overcome redundant hardcoding for multiple clients
  • how to set different python interpreters for local and remote hosts
  • How to print only the stderr_lines when shell command execution fails in ansible playbook task
  • Ansible group_vars files to match multiple groups
  • Is there any way to get more details of a ansible task
  • Pipe process to target stdin in Ansible Playbook
  • Can an Ansible inventory include another?
  • Ansible - check if item is in the list
  • Ansible - how to run the same command on multiple shell in one task
  • How do I use Ansible loop register values?
  • Ansible Version Forcing
  • Simple Ansible playbook to unzip .tar.gz in remote Windows machine
  • How ansible find python modules on target and is it possible to use virtualenv to install modules dependencies?
  • Ansible dropping root privilege after long-running task
  • Upgrade Ansible Tower - Minor upgrade
  • Issue on Ansible
  • How to filter the latest version of every file in a tree using Ansible?
  • shadow
    Privacy Policy - Terms - Contact Us © scrbit.com