[ansible-project] Re: Jinja2 - variable inside a variable

2015-10-06 Thread Vikas Kumar
I had to use this {% set my_port = item.value.get(nginx_dir).port %} Regards, Vikas On Wednesday, 7 October 2015 13:40:34 UTC+11, Vikas Kumar wrote: > > Hello Everyone, > > I am trying to iterate over a dictionary in a Jinja2 template (in > Ansible). One of the arrays or keys in the

[ansible-project] ERROR: Syntax Error while loading YAML script

2015-10-06 Thread ansible_novice
Im trying to run playbook, --- - hosts:group1 user:user1 sudo:yes gather_facts:yes tasks: - name: ensure update apt:upgrade=full apt:update_cache=yes How I`m trying to run. sudo ansible-playbook -i /etc/ansible/hosts test1.yml But I have an error. ERROR: Syntax Error

Re: [ansible-project] syntax error while loading yaml script

2015-10-06 Thread ansible_novice
Ok, now I have another code in playbook --- - hosts:group1 user:chinkovm sudo:yes gather_facts:yes tasks: - name: ensure update apt:update_cache=yes - name: ensure upgrade apt:upgrade=full But ansible says about the same error in the same place: in colon of word 'tasks'. On

Re: [ansible-project] syntax error while loading yaml script

2015-10-06 Thread David Karban
Hi, tasks should have more spaces, it should be aligned to user, sudo, etc. keywords: --- - hosts:group1 user:chinkovm sudo:yes gather_facts:yes tasks: - name: ensure update apt:update_cache=yes - name: ensure upgrade apt:upgrade=full David Karban Linux server

Re: [ansible-project] Re: bad PATH when running "apt" module

2015-10-06 Thread Alastair Brayne
Did you find a solution to this by any chance? I've got exactly the same problem and am beginning to get mighty pissed at the amount of useless yak-shaving that isn't even working. No matter what I try, it looks like the secure_path in the sudoers file is ignored somewhere down the call stack.

[ansible-project] Re: Windows Server 2012 R2 - Process is terminated due to StackOverflowException.

2015-10-06 Thread Nikolai Shornikov
Really want to know if you've found a workaround. This exact executable on a patched 2008R2 machine is giving me the same error. On Tuesday, September 29, 2015 at 7:56:23 AM UTC-6, Amir Luzon wrote: > > I am running a playbook on this machine an i am recieving the following > error: > >

[ansible-project] Re: Windows Server 2012 R2 - Process is terminated due to StackOverflowException.

2015-10-06 Thread Nikolai Shornikov
Yeah. Wrapping sqlpackage.exe, I would get the above CLR error, and sometimes Out of Memory, and sometimes success. I'm specifically wrapping a 32-bit sqlpackage.exe, but I don't know which "plugin" settings below ultimately applies to the process, which I start via Start-Process. I'm having a

[ansible-project] Re: Windows Server 2012 R2 - Process is terminated due to StackOverflowException.

2015-10-06 Thread Trond Hindenes
Nice. I doubt its the last one, since that seems to deal with the 32-bit think, but that's just an assumption. Amir, care to test out these values and see if they help? On Tuesday, October 6, 2015 at 11:59:19 PM UTC+2, Nikolai Shornikov wrote: > > Yeah. Wrapping sqlpackage.exe, I would get the

[ansible-project] Re: Windows Server 2012 R2 - Process is terminated due to StackOverflowException.

2015-10-06 Thread Trond Hindenes
Nikolai, you're saying a sqlpackage job is giving you the same error? On Tuesday, October 6, 2015 at 9:43:52 PM UTC+2, Nikolai Shornikov wrote: > > Really want to know if you've found a workaround. This exact executable on > a patched 2008R2 machine is giving me the same error. > > On Tuesday,

[ansible-project] Jinja2 - variable inside a variable

2015-10-06 Thread Vikas Kumar
Hello Everyone, I am trying to iterate over a dictionary in a Jinja2 template (in Ansible). One of the arrays or keys in the dictionary is 'abcd' This works fine, but key 'abcd' varies in each dictionary. {{ item.value.abcd.port }} I am looking to do something like below using a variable

[ansible-project] ansible2 -- filter_plugins

2015-10-06 Thread Ben Cohen
I wanted to start looking at ansible 2 now that its in beta -- most things are working for me out of the box -- but I have a very simple custom filter that I need to use which isn't being discovered: sts-infrastructure (master)> cat filter_plugins/wrap.py def wrap(list): return [ '"' + x +

[ansible-project] Re: syntax error while loading yaml script

2015-10-06 Thread pixel fairy
theres an intro to yaml syntax here. http://docs.ansible.com/ansible/YAMLSyntax.html be carefull cutting and pasting from groups because things can get reformatted. heres an example with the code highlighting. i hope it comes out ok. also, you can put multiple variables in a single module call

[ansible-project] Ansible filter & search facts

2015-10-06 Thread Lemming1988
Hi guys, i have a RHEL7 vm with this facts that show the network configi: *[root@** /etc/ansible]# ansible testserver -m setup -a 'filter=ansible_eno1628'* *** | success >> {* *"ansible_facts": {* *"ansible_eno1628": {* *"active": true,* *

[ansible-project] Selecting hosts with softlayer.py dynamic inventory

2015-10-06 Thread Bedwyr Humphreys
Hi, I'm trying to use a dynamic inventory to configure Softlayer hosts. My scripts are working with a static inventory file where I specify things like [BACKUP_SERVER] 10.000.00.00 [JIRA] 10.111.11.11 Now i want to move to using a dynamic inventory using softlayer.py from

[ansible-project] Re: Problem with vsphere_guest on vm_extra_config and state reconfigured

2015-10-06 Thread pax pacis
Hi Timo, I have the same issue at the moment, I can not change any of the network configuration or even add/change the notes. Adding a CPU or changing disk or memory is working. Also I do not get any errors on the network change. Op dinsdag 15 september 2015 08:42:55 UTC+2 schreef Timo: > >

Re: [ansible-project] Gathering ec2 instance facts with only a region and instance id?

2015-10-06 Thread Frank Perks
I ended up just creating an ansible module. Which is here if anyone runs into this issue in the future. https://gist.github.com/fperks/475e3e58d60cef8fc922 Honestly i would really like this kind of functionality to be added the ec2_remote_facts. On Monday, October 5, 2015 at 4:42:15 PM

[ansible-project] Testing dynamic inventory in python, order of hosts in lists change

2015-10-06 Thread pixel fairy
Im trying to test an inventory source in python with unittest. the correct output was written by had following the docs. while the orders dont matter in dictionaries, they do in lists. and in this list, that order changes, thus giving the test a false negative. is there a way to test lists

[ansible-project] Re: syntax error while loading yaml script

2015-10-06 Thread ansible_novice
I`m trying to run your example, but I have a message of error again. Now this is another position. I thougth there could be a problem with spaces, but changes doesn`t work too. ERROR: Syntax Error while loading YAML script, test1.yml Note: The error may actually appear before this position:

Re: [ansible-project] Re: syntax error while loading yaml script

2015-10-06 Thread Brian Coca
you need a space after : apt: update_cache=yes upgrade=full cache_valid_time=3600 -- 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] Ansible 2.0 is BETA!

2015-10-06 Thread James Cammarata
Hi all, I'm very happy to announce the first beta release of Ansible 2.0! In case you missed the original update in the alpha release, here's a quick break down of some of the new features in 2.0: * Blocks, which allow playbooks to do some basic try/except/finally style error handling