Re: [ansible-project] centos7 target - sudden python interpreter trouble

2021-10-14 Thread Sandip Bhattacharya
On 14.10.21 14:03, dulhaver via Ansible Project wrote: On 10/14/2021 1:41 PM dulhaver via Ansible Project wrote: also I can run ad-hoc commands (like ping) on that target successfully (which should proove to some extend that python can be addressed on target, shouldn't it?) this i.e.

Re: [ansible-project] centos7 target - sudden python interpreter trouble

2021-10-14 Thread Sandip Bhattacharya
On 14.10.21 11:49, dulhaver via Ansible Project wrote: I am running a playbook to install postgresql against a centos7 (python 2.75) target and am getting this error about a bad python interpreter . I try to solve this

Re: [ansible-project] Getting Permission Denied Error

2021-10-14 Thread Sandip Bhattacharya
On 13.10.21 13:51, Anirban Das wrote: I have created aws ec2 instances through Terraform, so that time I have mentioned key name for ec2 launching. But yes didn't mention ansible private key in terraform script. So in the provisioner bock I put ansible playbook command with private-key

Re: [ansible-project] Re: Combining several facts into one array

2021-10-06 Thread Sandip Bhattacharya
On 06.10.21 14:38, lift...@gmail.com wrote: However, in my other thread about removing items from the list, I'm trying the suggestion as follows:   - name: Print output     debug:       msg: "{{ item.uid[0] }}:  {{ item.gidnumber[0] }}:  {{ item.homedirectory[0] }}"     loop: "{{

Re: [ansible-project] Ansible performing poorly on scale setups

2021-10-05 Thread Sandip Bhattacharya
On 01.10.21 23:11, nds.ap...@gmail.com wrote: We build a stream file to map the interfaces of all the hosts and then trigger traffic on respective hosts participating. This stream file is around 100 MB. So just this line in one of the playbook:   vars_files:     - "{{ playbook_dir }}/{{

Re: [ansible-project] when condition is not working

2021-10-01 Thread Sandip Bhattacharya
On 01.10.21 15:32, subbamma natla wrote: when: htop_is_running.stdout == '0'   did not work command: pgrep httpd My question is why the following not working  when: status_httpd.stdout_lines == 0 ok: [mhost1] => {     "status_httpd.stdout_lines": [         "0"     ] } If the 'when'

Re: [ansible-project] when condition is not working

2021-10-01 Thread Sandip Bhattacharya
What's wrong with asserting that the service should be started? - systemd:     name: httpd     state: started For the vast majority of cases that should work (the apache service in major distros being such a case). Sometimes you do get an edge case where the PID check in the unit file

Re: [ansible-project] when condition is not working

2021-10-01 Thread Sandip Bhattacharya
On 01.10.21 02:10, subbamma natla wrote: can somebody explaine me why service sis not starting on mhost1: [root@mhost1 ~]#  ps -ef | grep -v grep | grep httpd It might be cleaner to use pgrep instead for process check. Then you can use something like this: tasks: - name: Process

Re: [ansible-project] expect module

2021-09-30 Thread Sandip Bhattacharya
On 30.09.21 21:43, Hanumantha Reddy Basireddy wrote: trying to understand expect functionality using below piece of code... I know I can do using becom_user, but I would like to check expect module... since there is requirement where I need to use expect module for automating client app CLI

Re: [ansible-project] List manipulation questions

2021-09-28 Thread Sandip Bhattacharya
e on my own and leave to consume people's time when I'm in trouble with a real-life playbook. All the best, Alex On Mon, Sep 27, 2021 at 5:07 PM Sandip Bhattacharya wrote: Hi, It would be helpful to us if you could explain a bit more clearly about: a. What you want to do here b. Wh

Re: [ansible-project] List manipulation questions

2021-09-27 Thread Sandip Bhattacharya
Hi, It would be helpful to us if you could explain a bit more clearly about: a. What you want to do here b. What are all the inputs here Questions: - What are the variables 'my_host' and 'server' here? - Do you want a file created on every host? Or only on the control-host? In any case, using

Re: [ansible-project] Cannot source /etc/lsb-release

2021-09-27 Thread Sandip Bhattacharya
source /etc/lsb-release echo $DISTRIB_CODENAME bionic sudo source /etc/lsb-release [sudo] password for ubuntu: sudo: source: command not found So it is a matter of elevated access level, but I just don't know how to run that at lower level... Sandip Bhattacharya schrieb am Montag, 27

Re: [ansible-project] Cannot source /etc/lsb-release

2021-09-27 Thread Sandip Bhattacharya
source is a bash built-in command. There is no executable. You can try "bash -c 'source /etc/lsb-release' " HTH,   Sandip On 27.09.21 19:04, 'Neil Young' via Ansible Project wrote: Hi, I'm banging my head trying to make this simple statement work: - name: Get Ubuntu version definitions  

Re: [ansible-project] Folder Permission for Multiple directories at once

2019-08-07 Thread Sandip Bhattacharya
 Please always share your actual error message to help people helping you. On August 7, 2019 at 6:23:31 PM, Bishwajit Samanta (bishwajitsamanta1...@gmail.com(mailto:bishwajitsamanta1...@gmail.com)) wrote: > Hi All, > > I am trying to achieve mentioning multiple directories in var.yml so

Re: [ansible-project] Typo in hard link example for file module?

2019-08-07 Thread Sandip Bhattacharya
On August 7, 2019 at 4:10:31 PM, Andrew Latham (lath...@gmail.com(mailto:lath...@gmail.com)) wrote: > It appears to be correct in code, maybe a recent fix that just has not > resulted in a refreshed docs page. See >

[ansible-project] Typo in hard link example for file module?

2019-08-07 Thread Sandip Bhattacharya
  [my third attempt to send this message got lost somehow. Trying again.] In the documentation for the file module at: https://docs.ansible.com/ansible/latest/modules/file_module.html An example for creating hard links is given as below:   - name: Create two hard links     file:      

Re: [ansible-project] Ansible [Errno 13] Permission denied

2019-08-05 Thread Sandip Bhattacharya
On Mon, Aug 5, 2019, at 5:34 PM, Andrew Morgan wrote: > Ahh, you are right, I am getting the error: > > Sorry, user andrewm is not allowed to execute '/bin/sh -c echo hello from > bash; python -c 'print "hello"' ' as root on ip-10-0-0-162 > > but in ansible I am becoming root! Now when I

Re: [ansible-project] Ansible [Errno 13] Permission denied

2019-08-05 Thread Sandip Bhattacharya
[ Yeah, it should have been -vvv and not --debug. I am missing up apps. :) My apologies. ]  On August 5, 2019 at 4:45:33 PM, Andrew Morgan (alonsoamor...@gmail.com(mailto:alonsoamor...@gmail.com)) wrote: > <54.236.183.46> ESTABLISH SSH CONNECTION FOR USER: andrewm > <54.236.183.46> SSH: EXEC

Re: [ansible-project] Ansible [Errno 13] Permission denied

2019-08-05 Thread Sandip Bhattacharya
  On August 5, 2019 at 4:35:34 PM, Andrew Morgan (alonsoamor...@gmail.com(mailto:alonsoamor...@gmail.com)) wrote: > Thank you, but I also tried that, but no luck > > > ansible all -i inventory > > --private-key="/Users/confluencetrades/Desktop/andrewm.pem" -u andrewm -k > > --become

Re: [ansible-project] Ansible [Errno 13] Permission denied

2019-08-04 Thread Sandip Bhattacharya
On August 4, 2019 at 3:06:25 PM, Andrew Morgan (alonsoamor...@gmail.com(mailto:alonsoamor...@gmail.com)) wrote: > More verbose output > > ansible all -vvv -i inventory -m command -a "/usr/sbin/useradd -s /bin/bash > -m test" --private-key="/Users/confluencetrades/Desktop/andrewm.pem" -u >

Re: [ansible-project] Re: Need small help

2019-08-04 Thread Sandip Bhattacharya
  > No even if the dest is /tmp the file is not visible in the remote server. > Run our command using “-v” or “—debug” to find out what is happening in that particular task. If you still cannot find out, share the output here. - Sandip -- You received this message because you are

[ansible-project] Re: Need small help

2019-08-04 Thread Sandip Bhattacharya
Check your "dest" parameter value. From your scp command example, I think you want this to be "/tmp" - Sandip On Saturday, August 3, 2019 at 10:27:27 PM UTC-7, Bubunia Patra wrote: > > Hi all, > > I am having a issue with copy module copying from localhost to remote > server. The problem is