Sounds like a permissions issue with the error you've got. Does it work if you elevate the user to root?
add become: yes to your play From: Thirumalai Raja A <[email protected]> Sent: Friday, December 15, 2023 9:28 AM To: Stuart Lowe <[email protected]> Cc: [email protected] Subject: Re: [ansible-project] need to test Ping You don't often get email from [email protected]<mailto:[email protected]>. Learn why this is important<https://aka.ms/LearnAboutSenderIdentification> Caution: This email originated from outside of the organisation. Do not click links or open attachments unless you recognise the sender and know the content is safe HI, Thank you for correcting me i have some other issue related to this i hope you can help me on this, I am using AWX tower and I created an Execution environment(which installed Packer and Terraform) to run my play book, i particularly use this task to confirm whether my ip is free or not. After my correction i am getting below error. play: - name: Ping the IP address ansible.builtin.command: cmd: ping -c 4 10.144.35.9 register: ping_result tags: - ping Error: ping: socket: Operation not permitted On Fri, 15 Dec 2023 at 14:34, Stuart Lowe <[email protected]<mailto:[email protected]>> wrote: Your formatting is off and your missing a few bits - name: Ping the IP address ansible.builtin.command: cmd: ping -c 4 10.144.35.9 register: ping_result tags: - ping should work From: [email protected]<mailto:[email protected]> <[email protected]<mailto:[email protected]>> On Behalf Of Thirumalai Raja A Sent: Friday, December 15, 2023 8:57 AM To: [email protected]<mailto:[email protected]> Subject: [ansible-project] need to test Ping You don't often get email from [email protected]<mailto:[email protected]>. Learn why this is important<https://aka.ms/LearnAboutSenderIdentification> Caution: This email originated from outside of the organisation. Do not click links or open attachments unless you recognise the sender and know the content is safe hello team, i need to perform ping command to check the ip address is that is possible in ansible i was tested with blow code i am getting error - name: Ping the IP address ansible.builtin.command: "ping -c 4 10.144.35.9" register: ping_result tags: - ping -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]<mailto:[email protected]>. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CALyK%3Dg_LjQjb8J8%2Baak2H6PZd%3DnULR9LMgnpUwFyWaL6%3DAPW0g%40mail.gmail.com<https://groups.google.com/d/msgid/ansible-project/CALyK%3Dg_LjQjb8J8%2Baak2H6PZd%3DnULR9LMgnpUwFyWaL6%3DAPW0g%40mail.gmail.com?utm_medium=email&utm_source=footer>. --------------- [https://www.zen.co.uk/resources/images/default-source/image-library/icons/zen-logo_meeting.png] Stuart Lowe He/Him Senior Cloud Support Engineer Zen Internet Team: 01706 902009 www.zen.co.uk <https://www.zen.co.uk/> Proud to be a certified B Corporation [https://www.zen.co.uk/resources/images/default-source/image-library/which232221-stacked-emailsig.tmb-0.png] This message is private and confidential. If you have received this message in error, please notify us and remove it from your system. Zen Internet Limited may monitor email traffic data to manage billing, to handle customer enquiries, and for the prevention and detection of fraud. We may also monitor the content of emails sent to and/or from Zen Internet Limited for the purposes of security, staff training and to monitor the quality of service. Zen Internet Limited is registered in England and Wales, Sandbrook Park, Sandbrook Way, Rochdale, OL11 1RY Company No. 03101568 VAT Reg No. 686 0495 01 -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]<mailto:[email protected]>. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/PA4PR01MB89948ECD8FF0F9BFED1A6F5CA893A%40PA4PR01MB8994.eurprd01.prod.exchangelabs.com<https://groups.google.com/d/msgid/ansible-project/PA4PR01MB89948ECD8FF0F9BFED1A6F5CA893A%40PA4PR01MB8994.eurprd01.prod.exchangelabs.com?utm_medium=email&utm_source=footer>. -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/PA4PR01MB8994F5F57391F2DD0B13BBB4A893A%40PA4PR01MB8994.eurprd01.prod.exchangelabs.com.
