Re: [ansible-project] Using Cpanel with Ansible

2017-07-27 Thread Fayad
Is it required to run ansible commands as the root user? If running as another user, is there any privileges required to be given for this user? Fayad Sent from my OnePlus One On 17-Jul-2017 6:45 PM, "Fayad" wrote: > The issue was fixed by creating the ansible user on the client server with

[ansible-project] How to do OS hardening and and install antivirus on my windows server using Ansible

2017-07-27 Thread tarvinder7
I have configured and am able to ping from my control machine (Ubuntu 16.04 LTS) to my Windows Server 2012. Now i want to be able to do OS hardening and installing Antivirus software on my windows server. Any help, external links or any other discussion on this. Please do inform. Thanks in adv

Re: [ansible-project] ANSIBLE: how to append a string at the end of a file

2017-07-27 Thread Vijay Misra
Thanks Adrian ! I would try using callback plugin. -Vijay On Thu, Jul 27, 2017 at 11:17 AM, Adrian Likins wrote: > > "I am trying to use ansible as a test tool. at the end of each > sucess/faiure i want to append a string at the end of a file and this file > can be used as a test report. > i Ha

[ansible-project] use ansible configuration h3c and huawei s series switch from china

2017-07-27 Thread lei wang
dear all: i want to use ansible configuration h3c and huawei s series switch but there is no network modules i try Developing Modules but it not work well someone help me . -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To un

[ansible-project] Re: Ansible 2.2.1.0 failing while connecting to Windows using AD credentials.

2017-07-27 Thread Siva Subramaniyan
Nice to Hear...!! Have a good one...! On Thursday, July 27, 2017 at 11:58:22 AM UTC-6, Tom Paschenda wrote: > > This helped me as well, thanks :-) > > Am Freitag, 21. April 2017 21:10:48 UTC+2 schrieb Siva Subramaniyan: >> >> *Thank you so much Jordan and Matt.* Issue has been resolved now. I >>

[ansible-project] Re: ANSIBLE: how to append a string at the end of a file

2017-07-27 Thread Vijay Misra
Thanks Rick for your help ! I am using lineinfile now and it works partially, only thing is it fails initially and outputs Sudo: a password requied". if i give permission through cmod 777 results.txt and then try to run the playbook it passes. - lineinfile: path: /etc/ansible/results.txt

Re: [ansible-project] ANSIBLE: how to append a string at the end of a file

2017-07-27 Thread Vijay Misra
Thanks kai ! Yes, I don't know how i missed the localhost part after adding "delegateTo: localhost" I am able to append the line on each test case success/failure. One more thing i wanted to clarify nomatter what command i se for appending the line( command/sheel/lineinfile) it always fails and

Re: [ansible-project] ANSIBLE: how to append a string at the end of a file

2017-07-27 Thread Adrian Likins
"I am trying to use ansible as a test tool. at the end of each sucess/faiure i want to append a string at the end of a file and this file can be used as a test report. i Have tried this code but it did not log anything in the file." This sounds like a good use for a callback plugin. A custom callb

Re: [ansible-project] What exactly is the "action" module and how does it work?

2017-07-27 Thread Kai Stian Olstad
On 27. juli 2017 19:41, Frank Thommen wrote: On 07/27/2017 07:25 PM, Kai Stian Olstad wrote: On 27. juli 2017 18:42, Frank Thommen wrote: and I also don't understand, why the ">" is needed at that point. It's an yaml indicator character, ">" indicate that the lines can be broken to multiple l

Re: [ansible-project] Pause after each iteration in a loop

2017-07-27 Thread rambius
четвъртък, 27 юли 2017 г., 13:29:54 UTC-4, Kai Stian Olstad написа: > > Put the win_nssm and the pause task in a file and use > - include: file.yml >with_items: "{{ services }}" > Thank you. I am trying that. Regards rambius -- You received this message because you are subscribed to th

[ansible-project] Re: Ansible 2.2.1.0 failing while connecting to Windows using AD credentials.

2017-07-27 Thread Tom Paschenda
This helped me as well, thanks :-) Am Freitag, 21. April 2017 21:10:48 UTC+2 schrieb Siva Subramaniyan: > > *Thank you so much Jordan and Matt.* Issue has been resolved now. I > really appreciate your help on this, i was struggling to fix this for long > time..!! Happy week end...! > > I just fo

Re: [ansible-project] What exactly is the "action" module and how does it work?

2017-07-27 Thread Frank Thommen
Thanks a lot On 07/27/2017 07:25 PM, Kai Stian Olstad wrote: On 27. juli 2017 18:42, Frank Thommen wrote: Hi, I was looking for a way to run the distro-dependent package manager w/o too many "when"s and I found this (on https://ansible-tips-and-tricks.readthedocs.io/en/latest/os-dependent-task

Re: [ansible-project] Pause after each iteration in a loop

2017-07-27 Thread Kai Stian Olstad
On 27. juli 2017 18:59, rambius wrote: host6 services='["service23", "service24", "service25", "service26"]' Then using win_nssm we start the above services in the following way --- - name: start services hosts: win_services - name: install and start services win_nssm: name: "

Re: [ansible-project] What exactly is the "action" module and how does it work?

2017-07-27 Thread Kai Stian Olstad
On 27. juli 2017 18:42, Frank Thommen wrote: Hi, I was looking for a way to run the distro-dependent package manager w/o too many "when"s and I found this (on https://ansible-tips-and-tricks.readthedocs.io/en/latest/os-dependent-tasks/installing_packages/#installing-packages): - name: inst

Re: [ansible-project] Re: How to mount partition when NTFS only

2017-07-27 Thread Kai Stian Olstad
On 27. juli 2017 18:10, Gilberto Valentin wrote: Any suggestions? :) You should check your with_items: under "Check for hard drive devices" it's in practice empty. -- Kai Stian Olstad -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To u

[ansible-project] Pause after each iteration in a loop

2017-07-27 Thread rambius
Hello, Assume we have the following in an inventory [win_services] host1 services='["service1", "service2", "service3", "service4"]' host2 services='["service5", "service6", "service7", "service8"]' host3 services='["service9", "service10", "service11", "service12", "service13"]' host4 services=

[ansible-project] What exactly is the "action" module and how does it work?

2017-07-27 Thread Frank Thommen
Hi, I was looking for a way to run the distro-dependent package manager w/o too many "when"s and I found this (on https://ansible-tips-and-tricks.readthedocs.io/en/latest/os-dependent-tasks/installing_packages/#installing-packages): - name: install basic package action: > {{ ansible_pkg

[ansible-project] Re: How to mount partition when NTFS only

2017-07-27 Thread Gilberto Valentin
Any suggestions? :) On Tuesday, July 25, 2017 at 8:42:25 AM UTC-4, Gilberto Valentin wrote: > > Hello, > > I have a playbook that scans for hard drives and mounts them in order to > do a backup of the data from those drives. I am able to scan for the drives > just fine and I can also mount them

[ansible-project] group variable precence

2017-07-27 Thread Peter Hudec
Hi, my gruestion is about the group varilabes, when the host is in more groups and there are same variable keys. See next example ### INVENTORY [cm] ditlcm01ansible_ssh_host=192.168.93.101 ansible_ssh_user=root ditlcm05ansible_ssh_host=192.168.93.105 ansible_ssh_u

[ansible-project] ansible doubt

2017-07-27 Thread Sameer Modak
Hello Team, Can some one tell me do we need user to b in /etc/sudoers file of all servers if we wish to execute /sbin/vgs command on all servers. also how can we we store global username password variable for ansible which is accesible for all other ansible components. -- You received this m

[ansible-project] Azure create vm module - cant specify vm size compatible with premium storage (or other valid vm_size values)

2017-07-27 Thread Andy Redhead
Hi, I'm pretty new to Ansible and so far have spent only an afternoon with the Ansible Azure module - so it's likely I'm being dim... After a bit of trial and error I got a playbook together that can create a basic VM (along with the virtual networking gubbins to make it accessible etc.) - ver

Re: [ansible-project] ANSIBLE: how to append a string at the end of a file

2017-07-27 Thread Kai Stian Olstad
On 27.07.2017 02:08, Vijay Misra wrote: I am trying to use ansible as a test tool. at the end of each sucess/faiure i want to append a string at the end of a file and this file can be used as a test report. i Have tried this code but it did not log anything in the file. - debug: msg="HPQC C

[ansible-project] Re: ANSIBLE: how to append a string at the end of a file

2017-07-27 Thread Rick Stokkingreef
Hi, You should use the line in file module, only specify the path and line. This way it will append it to the file. Op donderdag 27 juli 2017 02:08:53 UTC+2 schreef Vijay Misra: > > > Hi , > >I am trying to use ansible as a test tool. at the end of each > sucess/faiure i want to append a

[ansible-project] Ansible static inventory with dynamic tags for Amazon EC2 Windows instances

2017-07-27 Thread Poornima Sandireddy
Hi All, I am working on a project where in agents needs to be installed on running windows instances on AWS account. I need to discover the instances based on tags (ex - tag_owner_poornima) but I am facing issues. Below are the configurations that I have made. hosts : [win] tag_owner_poornima

[ansible-project] Re: Ansible ios_command module - Failure execution basic commands on a Cisco IOS device

2017-07-27 Thread lei wang
here is my way ios_command it work well cat /etc/ansible/hosts [cisco] 10.101.24.241 ansible_ssh_user=cisco ansible_ssh_pass=cisco123 root@ansible:~# ansible cisco -c local -m ios_command -a "commands='show version'" 10.101.24.241 | SUCCESS => { "changed": false, "stdout": [ "Ci