Re: [ansible-project] Servicenow behind proxy

2022-04-04 Thread Ankit Vashistha
Ansible Collection for ServiceNow works only for instances which can be reached directly through the internet. We have a similar setup, our instances are accessible through an internal network only. I had to end up writing a custom role to access our instances, this may be different for your

Re: [ansible-project] How to send ansible tower metrics to prometheus

2021-04-18 Thread Ankit Vashistha
amy >> wrote: >> >>> Hi Ankit, >>> Thanks for sharing the details. Do you have a sample Ansible playbook to >>> connect to the Prometheus? >>> >>> Regards >>> Saravanan >>> >>> >>> On Mon, Mar 8, 2021 at 1:

Re: [ansible-project] How to send ansible tower metrics to prometheus

2021-03-21 Thread Ankit Vashistha
haring the details. Do you have a sample Ansible playbook to > connect to the Prometheus? > > Regards > Saravanan > > > On Mon, Mar 8, 2021 at 1:37 AM Ankit Vashistha > wrote: > >> Hello, >> >> Check this: 12. Metrics — Ansible Tower Administration Guide v3.8.1 >

Re: [ansible-project] How to send ansible tower metrics to prometheus

2021-03-07 Thread Ankit Vashistha
Hello, Check this: 12. Metrics — Ansible Tower Administration Guide v3.8.1 *Regards,* *Ankit* On Thu, Mar 4, 2021 at 1:22 AM Saravanan Ponnusamy wrote: > Hi Ansible experts, > We are trying to push Ansible

Re: [ansible-project] setting up windows host on a production environment

2020-12-08 Thread Ankit Vashistha
You need to use the following variables/extra vars for your playbook to connect to windows hosts ofcourse after the initial configuration on windows server to accept incoming connection is done. *ansible_connection: winrmansible_winrm_message_encryption: autoansible_winrm_port:

Re: [ansible-project] How can i use Host Variables in Task name

2020-10-16 Thread Ankit Vashistha
Hello, Thanks for your response. Sadly, it didn't work. *Regards,* *Ankit* On Fri, Oct 9, 2020 at 9:24 PM Dick Visser wrote: > On Fri, 9 Oct 2020 at 17:34, Ankit wrote: > > > > Hello Everyone, > > > > I am trying to use the host variables set for each host of inventory in > the task name

Re: [ansible-project] copy file to host not in inventory

2020-09-02 Thread Ankit Vashistha
I am not sure if i clearly understood your question but, you might look into this: https://docs.ansible.com/ansible/latest/modules/add_host_module.html *Regards,* *Ankit* On Tue, Sep 1, 2020 at 9:25 PM william...@gmail.com < william.doss...@gmail.com> wrote: > Hi, sorry, I can't quite get my

Re: [ansible-project] How to copy directory recursively using pattern to remote machine?

2020-06-01 Thread Ankit Vashistha
Hi Stefan, Thanks for your comment, i am getting the same issue even after putting that in double quotes. *Regards,* *Ankit* On Mon, Jun 1, 2020 at 5:30 PM Stefan Hornburg (Racke) wrote: > On 6/1/20 1:49 PM, Ankit wrote: > > Hello All, > > > > I have got the following playbooks where i am

Re: [ansible-project] Login/Password encryption in host file

2020-04-14 Thread Ankit Vashistha
Ansible Documentation is a wonderful place. Did you try searching for the solution? Try the following doc, it has got all the scenarios. https://docs.ansible.com/ansible/latest/user_guide/vault.html You can use group vars directory and create yml files with group names with encrypted credential

Re: [ansible-project] Connecting to Linux and Windows hosts

2020-04-14 Thread Ankit Vashistha
Not sure if i get your question. You can specify the group specific variables including connection method like below. You need to identify their OS so that you could specify which host will use which connection method. [all:vars] ansible_connection=ssh ansible_ssh_user=user

Re: [ansible-project] ansible support

2020-02-03 Thread Ankit Vashistha
When you post queries, please try to describe the problem in detail so that you could get proper response. *Regards,* *Ankit* On Tue, Feb 4, 2020 at 8:44 AM vishwas govekar wrote: > Hi > I need some project support on ansible scrippting > > -- > You received this message because you are

Re: [ansible-project] home directory for Ansible in windows machine using cygwin

2019-12-23 Thread Ankit Vashistha
What do you mean by home directory? I think you can keep your playbook anywhere and it will work until you point to the correct file. *ansible-playbook -i * EX: ansible-playbook -i myinventory myplaybook will work if myinventory myplaybook are in current directory or you can specific the

Re: [ansible-project] Want to send notification if no hosts match

2019-12-22 Thread Ankit Vashistha
Check this. https://docs.ansible.com/ansible/latest/modules/fail_module.html You can perform custom actions when something fails. I guess there are also ways to control if your job needs to fail or skip to next. I havent tried it though, check out ansible docs. *Regards,* *Ankit* On Fri, Dec

Re: [ansible-project] How to replace a line with special characters to another line with special characters using variables?

2019-10-27 Thread Ankit Vashistha
Hello Kai, Thanks for your response. Actually the issue here is that these pattern value and replace text values are provided to the playbook using surveys i.e., during run time and hence, it won't be possible to manually escape them by the users who run the template. Is there a way to auto

Re: [ansible-project] Ansible VMWare Dynamic inventory script pulling Cluster IP instead of server IP

2019-08-06 Thread Ankit Vashistha
Hello Community Members, Could anyone please help by providing your expert opinion on this? *Thanks* *Ankit* On Mon, Aug 5, 2019 at 6:15 PM Ankit wrote: > I have been testing VMWare Dynamic inventory script (which ships with AWX > 4.0.0.0) and recently noticed an issue where the sync results

Re: [ansible-project] Ansible tower installation error !!

2019-07-20 Thread Ankit Vashistha
Try validating the error: *no password supplied*. *Regards,* *Ankit* On Sat, Jul 20, 2019 at 7:23 PM aditya singh wrote: > Hi recently i was trying to install Tower in centos7 bu t iam getting a > error during the time of installation / Can i get some help ??? > > > The Error I'm getting is

Re: [ansible-project] Problems with Ansible and WinRM

2019-04-30 Thread Ankit Vashistha
Can you try adding the following as well and test: *ansible_winrm_message_encryption: auto* *Regards,* *Ankit* On Tue, Apr 30, 2019 at 2:38 PM Bryan Sanchez wrote: > Hello AnsibleProjectForum, im trying to deploy ansible with winrm module. > > > First thing, sorry for my english, im not

Re: [ansible-project] Splunk Administror

2019-04-04 Thread Ankit Vashistha
Can we ban the spammers? On Thu, Apr 4, 2019, 10:07 PM Recruiter Soni wrote: > *Hi,* > > > > *Hope you’re doing well!* > > *This is Chintan from Inficare Technologies, please find the job > description if you are interested for this below job reply to this email

Re: [ansible-project] Ansible show simple variable

2019-03-29 Thread Ankit Vashistha
Use *var* instead of *msg*. - debug: *var*: "{{ my_variable }}" *Regards,* *Ankit* On Fri, Mar 29, 2019 at 4:25 PM wrote: > Hi all, > > I have this variable "my_variable" with content "machainedecaractere" > > Why when i show this variable with module : > > - debug: >msg: "{{

Re: [ansible-project] How do I use snow_record and snow_record find in Ansible? Or should I do something different?

2019-03-20 Thread Ankit Vashistha
Do you have ADFS in between? This module can't handle ADFS. *Regards,* *Ankit* On Wed, Mar 20, 2019 at 1:02 AM Beau Gauthreaux wrote: > I'm trying to gather change record information from ServiceNow. > Specifically I would like to query against a hostname and find if that > server has change

Re: [ansible-project] How to Restore DB from backup file

2019-03-13 Thread Ankit Vashistha
Try removing no_log from the playbook which is giving error to see what exact error it gives. It might have sensitive data hence it is censored. On Thu, Mar 14, 2019, 7:42 AM Sindhuja Koneru wrote: > Hello, > > Can someone please help me here, not able to figure out why i am unable to > run

Re: [ansible-project] Export gathering facts to .csv file

2019-03-12 Thread Ankit Vashistha
Can you try the *block/catch *and see if that works? https://docs.ansible.com/ansible/latest/user_guide/playbooks_blocks.html ansible_failed_taskThe task that returned ‘failed’ and triggered the rescue. For example, to get the name use ansible_failed_task.name. ansible_failed_resultThe captured

Re: [ansible-project] How can i run a block of playbook instructions only if they pass the specified condition?

2019-03-11 Thread Ankit Vashistha
Thanks Kai. I had all the tasks running with own retries but i was hoping to have retries condition for multiple tasks or a bunch of tasks having single condition and retries. It is strange that there is no way to get that done. On Mon, Mar 11, 2019, 7:35 PM Kai Stian Olstad <

Re: [ansible-project] How do I read/ use Ansible tower credentials (machine/ network/ Vault/ Source Control)?

2019-01-27 Thread Ankit Vashistha
The question should be posted in AWX group or instead should be posted for your Red-hat support. Coming to your question, you don't need to specifically define the username and password in the playbook. When you create a template, you choose the playbook, credentials (already created ones under

Re: [ansible-project] How to run a localhost python script in a play defined for a different host group?

2018-12-15 Thread Ankit Vashistha
do to awx user, i get a expired password error. What is the default password for awx user. I don't remember setting it up anywhere during installation of Tower.* *# sudo su - awx* *sudo: Account or password is expired, reset your password and try again* *Changing password for root.* *(current

Re: [ansible-project] How to run a localhost python script in a play defined for a different host group?

2018-12-15 Thread Ankit Vashistha
/usr/bin/python /tmp/ansible_scripts/MSTeamsNotifications.pyc* *MSTeamsNotifications.py - Send Notifications to MS Teams Team* *1* *Thanks and Regards,* *Ankit* On Sat, Dec 15, 2018 at 6:49 PM Kai Stian Olstad < ansible-project+l...@olstad.com> wrote: > On Saturday, 15 December 2018 13:37:17 CET Ank

Re: [ansible-project] How to run a localhost python script in a play defined for a different host group?

2018-12-15 Thread Ankit Vashistha
r 2018 13:18:49 CET Ankit Vashistha wrote: > > I have got the following playbook: > > > > --- > > - hosts: Windows > > > > tasks: > > - name: Ensure Service status is running and startup mode set to > > Automatic > > win_se

Re: [ansible-project] How to run a localhost python script in a play defined for a different host group?

2018-12-15 Thread Ankit Vashistha
Thanks a lot Kai for the quick help. I will try this. *Thanks and Regards,* *Ankit* On Sat, Dec 15, 2018 at 5:53 PM Kai Stian Olstad < ansible-project+l...@olstad.com> wrote: > On Saturday, 15 December 2018 13:18:49 CET Ankit Vashistha wrote: > > I have got the fol

[ansible-project] How to run a localhost python script in a play defined for a different host group?

2018-12-15 Thread Ankit Vashistha
I have got the following playbook: --- - hosts: Windows tasks: - name: Ensure Service status is running and startup mode set to Automatic win_service: name: MSSQLSERVER state: started start_mode: auto ... I want to run a Python script on the *localhost*

[ansible-project] How can i handle ADFS in between Ansible and ServiceNow Portal to Create, Update Snow tickets?

2018-11-24 Thread Ankit Vashistha
I was trying to using snow modules (https://docs.ansible.com/ansible/2.7/modules/snow_record_module.html). This works for a normal snow instance where there is no ADFS in between. However, in our organization, we have ADFS which cannot be avoided because of which the *snow_record* module fails

Re: [ansible-project] WinRM - running ansible on widnows returning error

2018-11-01 Thread Ankit Vashistha
Can you share winrm configuration? On Thu, Nov 1, 2018, 3:50 PM nadim mansour wrote: > How can I let ansible run on windows node(windows server 2012 machine) ?? > I ran the belwo commands on power shell before running the ansible script : > > > *netsh advfirewall firewall add rule name="Allow

Re: [ansible-project] tower_credential module is failing

2018-11-01 Thread Ankit Vashistha
Did you notice it says, tower_cli.exceptions.BadRequest: Missing required fields: credential-type Have you selected the credentials type? On Thu, Nov 1, 2018, 12:28 PM Vinod Patil wrote: > Hi , > > I am using tower_credential module to create a credential on ansible > tower. > > Ansible tower

Re: [ansible-project] looks like sudo error, may be

2018-10-31 Thread Ankit Vashistha
I suspect it has something related to the permission mentioned in the output. On Thu, Nov 1, 2018, 7:36 AM 'Kallu Srikanth' via Ansible Project < ansible-project@googlegroups.com> wrote: > Playbook: > > --- > - hosts: patch_group > user: dpiesa > become: yes > become_user: root >

Re: [ansible-project] Ansible Python Module Error.

2018-09-27 Thread Ankit Vashistha
What is the issue then? On Thu, Sep 27, 2018, 4:22 PM Saurabh wrote: > Hi All, > > if i > give os.path.dirname(os.path.abspath(os.path.realpath(ansible.__file__))) > command in python terminal will give > me "/usr/lib/python2.7/site-packages/ansible" > > but if same command i write in own

Re: [ansible-project] Unable to authenticate through CredSSP

2018-09-23 Thread Ankit Vashistha
Is your user a part of admin group? On Sun, Sep 23, 2018, 11:38 AM Shyam wrote: > Hi all, > > Im unable to connect to windows using the credssp authentication issue. Im > getting the following error, > > > x.x.x.x | UNREACHABLE! => { > "changed": false, > "msg": "credssp:

Re: [ansible-project] Re: WinRM Connection Error

2018-09-20 Thread Ankit Vashistha
Try adding the following and recheck with ntlm ansible_winrm_message_encryption: auto On Thu, Sep 20, 2018, 7:09 PM 'J Hawkesworth' via Ansible Project < ansible-project@googlegroups.com> wrote: > Can you run > > ansible windows -m win_ping -v > > This should return the stack trace. > > My

[ansible-project] How can i gather ec2 elb facts using AWX/Ansible Tower?

2018-09-19 Thread Ankit Vashistha
I have been following the ec2_elb_facts module and tried using the below example but in the debug logs i can see the aws values are completely getting ignored. How can i get this working? - hosts: localhost vars: aws_access_key: accesskey aws_secret_key: secretkey ec2_region: