[ansible-project] How to creaye partitions

2017-07-28 Thread Shubham Shrivastava
Hii guys, I am trying to create standard linux fdisk partitions from playbook using parted module. But it is giving me an error, PARTED IS NOT A VALID ATTRIBUTE FOR A PLAY. Is there any other way i can create partitions. -- You received this message because you are subscribed to the Google

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

2017-07-28 Thread Vijay Misra
Thanks kai ! setting become: false worked. -VM On Fri, Jul 28, 2017 at 6:42 AM, Kai Stian Olstad < ansible-project+l...@olstad.com> wrote: > On 28.07.2017 01:06, Vijay Misra wrote: > >> One more thing i wanted to clarify nomatter what command i se for >> appending >> the line(

[ansible-project] ansible_ssh_pass parameter with salt encrypt value of ansible_user password makes client server Unreachable on playbook run

2017-07-28 Thread Lorenzo Farinas
I successfully created and tested some Ansible playbooks, that's when ansible_ssh_pass parameter value is the actual password of the ansible_user for the involved server specified in a group in the /etc/ansible/hosts file. But when the ansible_ssh_pass parameter was replaced with its salt

[ansible-project] Quote mismatch when executing a command on windows boxes

2017-07-28 Thread rambius
Hello, I have several windows boxes with directories on them full of log files. I want to delete all log files older then 7 days. The dos command that does it is forfiles /d -7 /c "cmd /c del @path" I tested the command on some of the windows boxes and it works correctly. Next I tried to

Re: [ansible-project] Expect module in ansible

2017-07-28 Thread Kai Stian Olstad
On 28. juli 2017 22:49, SARANYA devotional R wrote: Thanks Kai! I am a new beginner to Ansible. if I want to execute series of a commands in OVM prompt like list repository etc, what should I do? Expect takes a list on responses, the fist time it get the response it will give the first

Re: [ansible-project] Expect module in ansible

2017-07-28 Thread SARANYA devotional R
Thanks Kai! I am a new beginner to Ansible. if I want to execute series of a commands in OVM prompt like list repository etc, what should I do? On Friday, 28 July 2017 15:14:28 UTC-4, Kai Stian Olstad wrote: > > On 28. juli 2017 19:14, SARANYA devotional R wrote: > > Expect module is not

Re: [ansible-project] complex dictionary reference including "item" question

2017-07-28 Thread Kai Stian Olstad
On 28. juli 2017 21:52, je...@soundhound.com wrote: I am wondering if it possible to do this kind of form in a playbook. I know how to do it in a template: If I have some data of the form: mydict: - entry1: data: xyzzy filename: scroll.txt - entry2: data: boom

[ansible-project] complex dictionary reference including "item" question

2017-07-28 Thread jerry
Hi, I am wondering if it possible to do this kind of form in a playbook. I know how to do it in a template: If I have some data of the form: mydict: - entry1: data: xyzzy filename: scroll.txt - entry2: data: boom filename: sound.txt things: - entry1 - entry2

Re: [ansible-project] ansible doubt

2017-07-28 Thread Kai Stian Olstad
On 28. juli 2017 17:26, Sameer Modak wrote: when i run below command without -k switch it asks for one sudo password and fails on all server. [smodak@hel-shell-2 tasks]$ ansible all -a "/bin/date" SUDO password: NESECDA01 | UNREACHABLE! => { Since you host require a password it will of course

Re: [ansible-project] Vmdeploy-queries

2017-07-28 Thread Kai Stian Olstad
On 28. juli 2017 16:24, Saravanan Gandhirajan wrote: We are planning to use vmcreate module to automate vmcreation and installation. Can you please help to answer below queries. 1. vcenter is running in windows server & needs AD authentication, What we have to do to connect vcenter and deploy

[ansible-project] Getting started with "properly structured playbooks!?"

2017-07-28 Thread Nicholas Sheridan
Hi Forum, If I write playbooks using the "ansible-galaxy init" command: ansible-galaxy init standardisationBot Which gives me this shr1mac1:standardisationBot nsheridan$ tree . ├── README.md ├── defaults │ └── main.yml ├── handlers │ └── main.yml ├── meta │ └── main.yml ├──

Re: [ansible-project] Using Cpanel with Ansible

2017-07-28 Thread Kai Stian Olstad
On 28. juli 2017 17:12, Fayad wrote: I've added the following line in the /etc/sudoers file on the client server: ansible_userALL=(root) NOPASSWD: ALL Won't this provide enough privilege for the ansible user to execute commands as root? Yes, it will, but you still has to tell ansible to

[ansible-project] Expect module in ansible

2017-07-28 Thread SARANYA devotional R
Expect module is not taking the password! Task: - expect: command: ssh -l admin localhost -p 1 responses: admin@localhost's password: "xyz" Error: TASK [unpresentrepo : expect]

[ansible-project] Is it possible to change the Vault cipher from AES256?

2017-07-28 Thread leam hall
The stuff I've read said that AES256 is the default but I can't find what options are available and where it gets changed. Thanks! Leam -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving

[ansible-project] Ansible winrm to connect to windows guest via certificate.

2017-07-28 Thread Rui Pereira
Hello Guys, I'm trying to understand the way to go here. I want to secure as much as possible my connection from my ansible box to the guests. In terms of Linux i already have all the communication based on SSH keys. In terms of windows i have it working via https && user and pass. (basic

Re: [ansible-project] ansible doubt

2017-07-28 Thread Sameer Modak
Hello Team, when i run below command without -k switch it asks for one sudo password and fails on all server. [smodak@hel-shell-2 tasks]$ ansible all -a "/bin/date" SUDO password: NESECDA01 | UNREACHABLE! => { "changed": false, "msg": "Failed to connect to the host via ssh: Permission

Re: [ansible-project] Using Cpanel with Ansible

2017-07-28 Thread Fayad
Thanks Kai. I've added the following line in the /etc/sudoers file on the client server: ansible_userALL=(root) NOPASSWD: ALL Won't this provide enough privilege for the ansible user to execute commands as root? Fayad On Fri, Jul 28, 2017 at 7:01 PM, Kai Stian Olstad <

[ansible-project] Vmdeploy-queries

2017-07-28 Thread Saravanan Gandhirajan
Hi , We are planning to use vmcreate module to automate vmcreation and installation. Can you please help to answer below queries. 1. vcenter is running in windows server & needs AD authentication, What we have to do to connect vcenter and deploy vm. 2. As the ssh connection will not work for

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

2017-07-28 Thread Werner Flamme
Vijay Misra [28.07.2017 01:23]: > > 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". How does the corresponding line look like in /etc/sudoers? There must be a "NOPASSWD:" as in nagios

Re: [ansible-project] Using Cpanel with Ansible

2017-07-28 Thread Kai Stian Olstad
On 28.07.2017 05:50, Fayad wrote: Is it required to run ansible commands as the root user? No. If running as another user, is there any privileges required to be given for this user? No. But if a command or a action need privileges the user doesn't have it will of course not work with

Re: [ansible-project] /etc not writable

2017-07-28 Thread Fayad
Changing ownership of /etc is not a proper way. So you have root access?? Fayad Sent from my OnePlus One On 22-Jul-2017 5:37 PM, "Yuriy Buha" wrote: > Hi Fayad. > > Thank you for the quick reply. > I tried to create the file in user's home directory, and then move to the

Re: [ansible-project] ansible doubt

2017-07-28 Thread Jean-Yves LENHOF
Le 28/07/2017 à 12:30, Sameer Modak a écrit : > I tried with given command but it does not work. > > I will repeat my question. My question is we have 20 servers in > inventory file and i want /sbin/vgs data using below command > > > ansible -b -k -m shell -a "/sbin/vgs" all > > Now out of 20

Re: [ansible-project] ansible doubt

2017-07-28 Thread Branko Majic
On Fri, 28 Jul 2017 03:30:15 -0700 (PDT) Sameer Modak wrote: > I tried with given command but it does not work. > > I will repeat my question. My question is we have 20 servers in > inventory file and i want /sbin/vgs data using below command > > > ansible -b -k -m

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

2017-07-28 Thread Pshem Kowalczyk
Hi, You didn't say what type of switch you're trying to access. There is a module for the CloudEngine (CE) switches. If you have a different one you have the following options: 1. Adapt native ansible modules for Cisco (using ssh and 'native' configuration) 2. Create a driver module for