ansible-ad-hoc Questions

4

What is the way to get the output of Ansible ad-hoc command in JSON, CSV or other format?
Burks asked 4/5, 2018 at 19:27

5

Solved

I want to use Ansible as part of another Python software. in that software I have a hosts list with their user / password. Is there a way to pass the user / pass of the SSH connection to the Ansi...
Banky asked 3/5, 2016 at 12:51

3

Solved

I know it's possible to run multiple adhoc commands one after the other for each module and using playbook. Playbook: - hosts: webservers tasks: - name: create .ssh dir file: path ~/.ssh sta...
Bacchae asked 6/6, 2017 at 15:56

3

Solved

I want to run ansible adhoc command on a list of EC2 instances. I want ansible to run it in sequence but ansible runs them in random. For example: 13:42:21 @cnayak ansible :► ansible aws -a "hostn...
Kathrynkathryne asked 24/5, 2016 at 8:21

1

Solved

When I run this: ansible host -u myuser -a "sudo su - otheruser -s /bin/bash" I get warning: [WARNING]: Consider using 'become', 'become_method', and 'become_user' rather than running sudo host...
Cornaceous asked 22/9, 2018 at 12:26

1

I'm a beginner with Ansible and trying to write a string to a file with an Ad-Hoc command I'm trying to play around with the replace module. The file I'm trying to write to is /etc/motd/. ansible ...
Dymoke asked 22/12, 2016 at 21:28

2

Solved

In a playbook, I try to extract the last character of variable "ansible_hostname". I try to use regex_replace filter to do that, but nothing works. I simplified my piece of script with this ad-...
Barbirolli asked 10/6, 2016 at 12:21

1

Solved

Is it possible to use what would normally be included in ansible_facts in an Ansible adhoc command? For example, I have a file at /tmp/myFile on all of my servers and I'd like to do: ansible all ...
Alodi asked 7/4, 2016 at 19:2

6

When building out a Vagrant project it would be helpful to run ad hoc Ansible tasks instead of adding test commands to a playbook. I've tried several methods of targeting the VM but keep getting th...
Schottische asked 11/10, 2013 at 22:18

1

Solved

I have some difficulties to adapt Ansible configuration to my environment. My testing environment : PermitRootLogin no Only one user allowed to connect through SSH (foo, without any privileges) ...
Fertile asked 14/7, 2014 at 18:14
1

© 2022 - 2024 — McMap. All rights reserved.