Re: [ansible-project] Role dependencies

2016-09-21 Thread Dick Davies
I've used role dependencies to address a similar requirement (collectd in our case). http://docs.ansible.com/ansible/playbooks_roles.html#role-dependencies If you make the telegraf role a dependency of the redis role, you'll have access to vars set by the telegraf role as well as its handlers by

Re: [ansible-project] Command not working on remote host through shell module or playbook

2016-09-21 Thread Kai Stian Olstad
On 20.09.2016 10:00, DHAVAL JAISWAL wrote: Ansible version: ansible 1.9.2 I am unable to execute following command from shell module neither through playbook. It could be any command at the run time. While reading found $,% need the escape string. Tried but not working. Is there any way/modul

[ansible-project] Re: Unable to reach to EC2 instance using dynamic inventory with a single region

2016-09-21 Thread 'Nirav Radia' via Ansible Project
Thanks @Alexander for your reply. Here is *ec2.ini* # Ansible EC2 external inventory script settings # [ec2] # to talk to a private eucalyptus instance uncomment these lines # and edit edit eucalyptus_host to be the host name of your cloud controller #eucalyptus = True #eucalyptus_host = clc.

Re: [ansible-project] How to create a nicer pause...

2016-09-21 Thread Krist van Besien
On Monday, September 19, 2016 at 9:21:25 PM UTC+2, Kai Stian Olstad wrote: > > On 17. sep. 2016 14:41, Krist van Besien wrote: > > Hi all, > > > > In one of my playbooks I need to build in a fairly long pause. > > > > So I have this task: > > > > - name: Pause for 20 minutes > > pause:

[ansible-project] Using command and shell modules properly

2016-09-21 Thread Will Thames
As I say in the intro to the post, I have strong opinions on using command and shell properly - most of those opinions are encoded into ansible-lint checks. Would be interested in any feedback, particularly anything that could be done better with command/shell that I've missed. http://willtham

Re: [ansible-project] How to create a nicer pause...

2016-09-21 Thread Kai Stian Olstad
On 21.09.2016 14:09, Krist van Besien wrote: On Monday, September 19, 2016 at 9:21:25 PM UTC+2, Kai Stian Olstad wrote: On 17. sep. 2016 14:41, Krist van Besien wrote: > Hi all, > > In one of my playbooks I need to build in a fairly long pause. > > So I have this task: > > - name: Pause for 20

Re: [ansible-project] How to create a nicer pause...

2016-09-21 Thread Josh Smift
How about wait_for? - name: count down forty 30-second intervals wait_for: timeout=30 with_sequence: start=40 end=0 stride=-1 That gives me output like this: TASK [count down forty 30-second intervals] * ok: [localhost] => (item=40) ok: [loca

Re: [ansible-project] Using command and shell modules properly

2016-09-21 Thread Brian Coca
Looks great!. Not sure how i feel about the term 'Ansibley' though -- -- Brian Coca -- 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 ansible-

[ansible-project] Shell script does NOT run on target system?

2016-09-21 Thread ZillaYT
I have a task that does this - name: Generate certs using the example.sh script from zip file shell: > cd "/tmp/{{ sg_ssl_dir }}/example-pki-scripts" chmod +x *.sh ./example.sh pw pw Which should generate cert/key pairs, but I don't see them. I do NOT get errors. If I run the s

[ansible-project] Re: Shell script does NOT run on target system?

2016-09-21 Thread ZillaYT
SOLVED! I had to put a semi-colon at the end of each command, except the last one. so - name: Generate certs using the example.sh script from zip file shell: > cd "/tmp/{{ sg_ssl_dir }}/example-pki-scripts"; chmod +x *.sh; ./example.sh pw pw On Wednesday, September 21, 2016 at

Re: [ansible-project] Re: Shell script does NOT run on target system?

2016-09-21 Thread Brian Coca
next time you might want to do: shell: | which preserves literal whitespace, vs shell: > which does not. -- Brian Coca -- 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

Re: [ansible-project] Command not working on remote host through shell module or playbook

2016-09-21 Thread bablu
That's working. But I guess here i have to hard code the command. Is there any way where i can pass any command at the run time to execute on the remote host. I saw the raw module and below are the behavior i got. working: /usr/bin/ansible test -m raw -a netstat -tanpu | /bin/awk '{print $

[ansible-project] ios clear command expect confirm

2016-09-21 Thread Valérie P
Hi, I have a question regarding the network core module "ios_command". I want to clear counters on some interfaces through a play. When I send the command directly through an SSH connection, the process is the following : rtr-site6#clear counters GigabitEthernet 0/0 Clear "show interface" co

[ansible-project] Executing python script through ansible keeps saying that Permission denied even though become: yes is specified

2016-09-21 Thread Robert Grossman
Hi, I am new to ansible and I have been trying to execute a python script through a task. I have tried the command, script, and shell modules, but ansible is unable to execute this script. If I try using the command module, ansible says that the script is not there even though when I ssh into

[ansible-project] Failed to validate the SSL certificate for deb.nodesource.com:443

2016-09-21 Thread Yuri Kanivetsky
Hi, For some reason, ansible fails to install nodesource's apt key on ubuntu/trusty. It seem to worked about a month ago or so (if I'm not mistaken). playbook.yml: - hosts: all gather_facts: no tasks: - name: apt-get update raw: '! which apt-get &

[ansible-project] Open Source: Usage/Licence/Community Edition?

2016-09-21 Thread Dan
Hi, sorry, stupid question... does Open Source here mean that I can use Ansible and build upon it for my business project without buying the product? On the homepage I only find "free trial", not "community edition".. Thx for any advice Dan -- You received this message because you are subscr

Re: [ansible-project] How Network Modules using openssh controlpersist feature?

2016-09-21 Thread jacky . gao2016
*If I want to use openssh ControlPersist function or similar feature, I can't use module_util/shell.y & basic.y, I have to write myself basc library? * *Is there any other featuca to avoid SSH authentication for each task?* 在 2016年9月21日星期三 UTC+8上午3:26:33,Peter Sprygada写道: > > No, there is no

[ansible-project] Re: Open Source: Usage/Licence/Community Edition?

2016-09-21 Thread Dan
Hi, read and read...so could it be that I can use Ansible for my project under the open source licence...just "Tower" is a product I would need to buy from Red Hat...did I understand this correctly? Thx Dan Am Mittwoch, 21. September 2016 19:27:04 UTC+2 schrieb Dan: > > Hi, sorry, stupid ques

Re: [ansible-project] Re: Shell script does NOT run on target system?

2016-09-21 Thread ZillaYT
Nice, thank you. I changed my script accordingly. On Wednesday, September 21, 2016 at 12:32:19 PM UTC-4, Brian Coca wrote: > > next time you might want to do: > > shell: | > > which preserves literal whitespace, vs > > shell: > > > which does not. > > > -- > Brian Coca > -- You receive

Re: [ansible-project] Failed to validate the SSL certificate for deb.nodesource.com:443

2016-09-21 Thread Matt Martz
The easy solution may just be updating your cacert bundle by updating the ca-certificates package and then trying again. My initial look indicates that the server is not using SNI, it has a wildcard cert, provided by Amazon. On Wed, Sep 21, 2016 at 8:09 AM, Yuri Kanivetsky wrote: > Hi, > > For

[ansible-project] Possible to switch credentials mid-playbook?

2016-09-21 Thread Brantley West
Hello, Is there a way to instruct ansible to use a different username/password combinations for a tasks or plays within a playbook? I see the remote_user variable, but do not see an accompanying remote_pass variable. I need something like ansible_ssh_user and ansible_ssh_pass to be definable

Re: [ansible-project] Cloudformation Boto3 Update

2016-09-21 Thread Stephen Granger
Did anyone follow up on this? With the recent changes (YAML), I wondering if anyone has started working on anything yet? https://groups.google.com/forum/?utm_medium=email&utm_source=footer#!msg/ansible-project/bg9FLpAbqng/BitUh1DPAwAJ This was asked about yesterday too. @ryansb is this on the

Re: [ansible-project] Ansible 2.1.2 RC3 is ready for testing

2016-09-21 Thread nusenu
James Cammarata: > Hi all, we're happy to announce that RC3 for 2.1.2 is now available for > testing. > > This release candidate also adds the following fixes for bugs: [...] Looks like a fix for regression https://github.com/ansible/ansible/issues/14829 is not included yet. Will it be fixed in

[ansible-project] How to conditionally include other playbooks?

2016-09-21 Thread Tristan Muntsinger
I tried this and it isn't working as expected: test.yml --- - include: 1.yml when: type == '1' - include: 2.yml when: type == '2' 1.yml --- - name: "1" hosts: localhost tasks: - debug: msg="1" 2.yml --- - name: "2" hosts: localhost tasks: - debug: msg="2" Command: ansible-

Re: [ansible-project] Failed to validate the SSL certificate for deb.nodesource.com:443

2016-09-21 Thread Yuri Kanivetsky
> > The easy solution may just be updating your cacert bundle by updating the > ca-certificates package and then trying again. > Adding - name: Update ca-certificates apt: name: ca-certificates state: latest before installing apt key didn't help. > My initial look

Re: [ansible-project] How to conditionally include other playbooks?

2016-09-21 Thread Brian Coca
playbooks cannot be included conditionally. -- Brian Coca -- 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 ansible-project+unsubscr...@googlegroups.c

[ansible-project] Limit hosts for nested playbook

2016-09-21 Thread Andrew
Is it possible to limit the hosts that run against a nested playbook? For example, I have a site.yml file that includes other playbooks like so: --- - hosts: all roles: - foo - include: foo.yml For the foo playbook I'd only want a subset of hosts to get evaluated. Some googling pointed m

[ansible-project] Re: Unable to reach to EC2 instance using dynamic inventory with a single region

2016-09-21 Thread Alexander H. Laughlin
Hi Nirav, I have a vague recollection of at some point having had a similar issue with dynamic inventory that was solved by placing the availability zone in the region field instead of the region. My memory is far from a reliable source of information so if you decide to give that a shot don't

[ansible-project] Re: Dependencies from private repo

2016-09-21 Thread Alexander H. Laughlin
Hi Karibou, I think what you're looking for is the Vault . You can store the url in your vault with the username and password included. That file would look like this: role-foo-url: 'git+http://username:passw...@git.example.com/ repos/role-