[ansible-project] Re: copy file from remote windows server to local machine?

2016-02-17 Thread Gerald Spencer
Line 85 

 
in the win_copy module is the chunk that actually copies the file from the 
local to remote. Perhaps try executing a raw command to test it out? 
Something along the lines of:

- name: copy to local from remote
  raw: Copy-Item -Path {{remoteFileLocation}} -Destination 
{{localFileLocation}} -Force

Can't test this currently, but can do in the morning. 

On Wednesday, February 17, 2016 at 8:16:34 PM UTC-8, Slim Slam wrote:
>
> In Ansible 2.0, the win_copy module will move a local file to a remote 
> windows machine.
>
> Is there an Ansible way to fetch a remote file on a windows server and 
> move it to a local machine?
>
> J
>

-- 
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.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/9227ea4a-9b53-49c8-8e11-037e7f5b7a3e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] YAML variable without using quotes?

2016-02-17 Thread RobL
I'm hitting this error:


We could be wrong, but this one looks like it might be an issue with
missing quotes.  Always quote template expression brackets when they
start a value. For instance:

with_items:
  - {{ foo }}

Should be written as:

with_items:
  - "{{ foo }}"


The problem is that I'm converting the YAML to JSON, and I need the value 
(a number) to be unquoted in the JSON.

Is there any way I can avoid this error without quoting, or is there some 
way to remove the quotes when it's converted to JSON?

-- 
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.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/87877629-bbac-448f-a47e-a04ba4ecffd4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] Re: Random return host in groups and balanced accross the cluster

2016-02-17 Thread Paul Markham


1:05 PM (less than a minute ago)
There's a random number filter; see 
http://docs.ansible.com/ansible/playbooks_filters.html#random-number-filter.

Try something like:


server_address = {{ groups['dbservers'] | random }}


-- 
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.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/dc329c3d-88ae-4a3a-8220-471d06f36903%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] Re: Dynamic 'include:' lines?

2016-02-17 Thread Mailo Svetel
On Ansible 2.0.0.2 I am able to do this:

- include: "{{ansible_os_family | lower}}.yml"




Dne čtvrtek 17. října 2013 19:25:25 UTC+2 candlerb napsal(a):
>
> Using ansible 1.3.3, I am trying to structure my tasks like this:
>
> ==> roles/ntp_client/tasks/main.yml <==
> - include: "{{ ansible_os_family }}.yml"
>
> ==> roles/ntp_client/tasks/Debian.yml <==
> - action: apt pkg=ntp state=installed
> - service: name=ntp state=started enabled=yes
>
> ==> roles/ntp_client/tasks/RedHat.yml <==
> - yum: name=ntp state=installed
> - service: name=ntpd state=started enabled=yes
>
> It fails with:
>
> ERROR: file not found: 
> /root/ansible/roles/ntp_client/tasks/{{ansible_os_family}}.yml
>
> I also tried:
>
> - include: $ansible_os_family
> - include: ${ansible_os_family}.yml
>
> which give:
>
> ERROR: file not found: 
> /root/ansible/roles/ntp_client/tasks/$ansible_os_family
> ERROR: file not found: 
> /root/ansible/roles/ntp_client/tasks/${ansible_os_family}.yml
>
> respectively.
>
> What I am trying to avoid is this:
>
> - include: Debian.yml
>   when: ansible_os_family == 'Debian'
> - include: RedHat.yml
>   when: ansible_os_family == 'RedHat'
>
> which works, but is tedious if I have to write it for every role, and it 
> also gives lots of 'skipping' tasks when run.
>
> There is a tiny note at 
> http://www.ansibleworks.com/docs/playbooks_roles.html which says:
> "Note that you cannot do variable substitution when including one playbook 
> inside another."
> which maybe applies to tasks/roles too - this isn't clear to me.
>
> I could of course define distinct roles called, say:
>
> roles/ntp_client_Debian
> roles/ntp_client_RedHat
>
> but to avoid conditionally including them, I would have to make different 
> playbooks for Debian-based hosts and RedHat-based hosts.
>
> Any other suggestions for how to achieve what I want here?
>
> Thanks,
>
> Brian.
>
>

-- 
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.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/07b16700-34a0-4e91-a0dc-d78d0b3cdf4c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] Random return host in groups and balanced accross the cluster

2016-02-17 Thread Nicolas G
Hi,

I have an inventory file with the bellow servers :

# servers

[dbservers]
db01
db02
db03
db04


In my template I want to populate the config by choosing randomly one of 
the servers from the dbservers group .

Unfortunately the bellow will return all servers :  

{% for host in groups['dbservers'] %}
server_address = {{ hostvars[host]['inventory_hostname'] }}
{% endfor %}


1) I need Ansible to return only 1 server (random) .

2) I will run this on a big cluster of servers so I would like that random 
is actually balanced across the cluster equally or else a db servers will 
get more connections than the others and could hit a capacity issue.

Can someone help me ? 

Thanks in advance.

-- 
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.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/693115dc-9f62-4bf3-855a-3510968d55ab%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] win_package product_id

2016-02-17 Thread Gerald Spencer
I am currently going through and installing all of the various software 
that is needed to provision our windows 7 machines. Unfortunately, when I 
attempt to install the latest Anaconda3 from continuum, I am unable to 
locate that products guid (product_id). It doesn't appear in the normal 
registry locations for 64 or 32 installs, in the wmic.exe get product 
powershell output or under a Get-ChildItem Win32_Product powershell output 
as well. 

I generated a guid, but after the program installed it failed since it was 
unable to locate the product_id to see if it was installed (the error was 
basically, the program appeared to install correctly, but it was unable to 
located the product_id). 

Since the product_id is required for this module is there anything I can 
do? I double the win_msi package would work due to the face that the 
anaconda3 installer is a installshield exe. 

I currently have a version by repackaging the exe as a msi in AdminStudio, 
but that isn't ideal.

Cheers

-- 
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.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/b1d84386-504c-425f-a401-d45a742d6984%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] Re: win_package arguments format

2016-02-17 Thread Gerald Spencer
Interestingly enough, the absolute path with forward slashes did the trick. 
The normal setup isn't created, but everything appears to be working as it 
should. Thanks!

On Wednesday, February 17, 2016 at 9:51:50 AM UTC-8, Gerald Spencer wrote:
>
> When the appropriate command line format for the reference file is 
> supplied, the installer creates a setup.txt in the installers directory 
> with various other information. Unfortunately, using the an absolute path 
> with forward or back slashes does not appear to work for the ansible 
> arguments as no setup.txt is created.
>
>  
> On Wednesday, February 17, 2016 at 9:40:58 AM UTC-8, Trond Hindenes wrote:
>>
>> Your pathing for "setup.iss" is probably wrong. PowerShell takes a 
>> "dot-backslash" approach when using the shell interactively, but that 
>> doesn't mean you should do the same when supplying absolute/relative paths 
>> to the ansible module. Also, PowerShell supports forward slashes, so feel 
>> free to use them instead, so you don't have to escape them.
>>
>> I would assume you would use something like:
>>
>> - name: install software
>>   win_package:
>> path: "C:/Users/UserName/Desktop/Software/setup.exe"
>> product_id: {guid}
>> arguments: '-s -f1 "C:/Users/UserName/Desktop/Software/setup.iss" ' 
>> (i added a space between the last double-quote and single-quote just for 
>> clarification. Should probably be removed in prod)
>>
>>
>> On Wednesday, February 17, 2016 at 6:35:17 PM UTC+1, Gerald Spencer wrote:
>>>
>>> After further poking around after the win_package is parsed out to the 
>>> windows machine. Every backslash that is entered into the arguments is 
>>> doubled for the $complex_args variable in the powershell script that is ran 
>>> on the windows machine. 
>>>
>>> So 
>>>
>>>- "-s -f1".\setup.iss" becomes "-s -f1".\\setup.iss" 
>>>- "-s -f1".\\setup.iss" becomes "-s -f1".setup.iss" 
>>>- "-s -f1"C:\\Users\\UserName\\Desktop\\Software\\setup.iss" becomes 
>>>"-s -f1"C:UsersUserNameDesktopSoftwaresetup.iss"" 
>>>
>>> I even set an enviroment variable for the full path of setup.iss and 
>>> tried to invoke it with 
>>>
>>>- "-s -f1\'$env:referenceFilePath\' " ( \' in order to escape the 
>>>single quote required to evaluate a variable in a double quote of a .ps1)
>>>
>>> Unfortunately, this did not work with win_package. Though it did work 
>>> when I created a quick script on the local machine for testing. It seems to 
>>> me that the win_package parses the argument string in an odd way. 
>>>
>>

-- 
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.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/74b4ab93-38c7-4686-b745-43002364eacb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ansible-project] Multiple instances of Ansible to deliver to production and non-production environments

2016-02-17 Thread Byron Mabbett
Thanks Dick,
'policy scar tissue' :')

Thats great, I am going to use that. It's more that we have had no CM, it 
all been manual in the past. Have tried to say by implementing Ansible we 
do no need the complete separation, so will have to prove it. The agentless 
of ansible was the key point for me in going with it.

On Wednesday, February 17, 2016 at 12:14:17 AM UTC+13, Dick Davies wrote:
>
> We run the same playbooks against 7 (!) various staging environments, 
> with a different inventory 
> for each. Per-environment config goes into the inventory under the 
> [all:vars] key - including things 
> like versions of RPMs etc. 
>
> SSH credentials are managed out of band, but there's a central git 
> repo to hold all this that can 
> be checked out to a bastion host on the relevant environment. 
>
> We've occasionally branched the repo to allow big changes in playbook 
> structure to be proven 
> on dev. environment configs but try to merge those into master asap. 
>
> As others have said, a playbook per environment is likely to involve 
> unproven playbook 
> runs against production. 
>
> (as an aside, the restrictions you are being presented with sound like 
> 'policy scar tissue' after someone 
> got burned by a different CM solution like Puppet or Chef. The 
> agentless nature of Ansible makes 
> it a lot less likely a change can 'leak' into prod without some 
> operator explicitly wanting it). 
>
> On 14 February 2016 at 20:23, Byron Mabbett  > wrote: 
> > HI All, 
> > First post and we are looking to implement Ansible into a new cloud 
> > environment for multiple legacy systems. 
> > 
> > Sorry but there is a bit of a story first and this is more a 
> setup/component 
> > architecture question as we have a security constraint that production 
> and 
> > non-production data centers can never talk to each other. Meaning 
> components 
> > such as version control and configuration management have to have two 
> > instances (prod and non-prod) with separate login's etc and syncing 
> taking 
> > place between them. 
> > 
> > I think this is mad, and have managed to talk them down to have only one 
> > version control instance. 
> > 
> > However, compromise was a prod and non prod Ansible, which we can sort 
> of 
> > justify, as we have a lack of maturity with tools as we are just 
> starting to 
> > implement Ansible. 
> > 
> > Do others have experience in running two instances of Ansible, and 
> keeping 
> > common config in sync? 
> > 
> > eg: 
> > 1. One source repository for Ansible config containing both prod and 
> > non-prod config 
> > 2. Two source repository's for Ansible config, one prod and one non-prod 
> > config 
> > 
> > Any steer's appreciated. 
> > 
> > Cheers 
> > Byron 
> > 
> > -- 
> > 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-proje...@googlegroups.com . 
> > To post to this group, send email to ansible...@googlegroups.com 
> . 
> > To view this discussion on the web visit 
> > 
> https://groups.google.com/d/msgid/ansible-project/ea685c2a-0084-49b6-b692-1934c366d45f%40googlegroups.com.
>  
>
> > For more options, visit https://groups.google.com/d/optout. 
>

-- 
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.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/2194db62-7238-4b48-814e-c14134740da2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] Re: Re-using "register" variable in multiple tasks

2016-02-17 Thread Dimitri Yioulos
I've found that my register variable only fails when applied to the play 
involving another host in my playbook.  After having poured over lots of 
posts from various other sources, I saw one that says, "use hostvars to 
access the register variables from a different host".  If, indeed, that's 
the solution, how do I use hostvars to achieve it?

On Wednesday, February 17, 2016 at 12:07:40 PM UTC-5, Dimitri Yioulos wrote:
>
> I have the following play in a playbook:
>
> - hosts: talk
>   gather_facts: false
>
>   tasks:
> - name: win update
>   win_updates:
> category: 
> ['SecurityUpdates','CriticalUpdates','Updates','Tools','DefinitionUpdates','UpdateRollups']
>   register: reboot_hint
>
> I'd like to re-use reboot_hint in additional plays in the playbook via 
> "when", but the playbook ultimately fails after the first "when", as in:
>
> - hosts: talk
>   gather_facts: false
>
>   tasks:
> - name: start Lyris services
>   win_service: name={{ item }} state=started start_mode=auto
>   with_items: ["ListManager", "LyrisAlert"]
>   when: (lyris_hint.rc == 0) and (reboot_hint.reboot_required == true) 
> # ie, the ListManager service is installed and reboot is required
>
> - hosts: admin2
>   gather_facts: false
>   sudo: yes
>
>   tasks:
> - nagios: action=downtime minutes=10 author="Dimitri Yioulos" 
> service=host host={{item}}
>   with_items:
>  - talk
>   when: reboot_hint.reboot_required == true
>   delegate_to: admin2
> - nagios: action=downtime minutes=20 author="Dimitri Yioulos" 
> service=all host={{item}}
>   with_items:
>  - talk
>   when: reboot_hint.reboot_required == true
>   delegate_to: admin2
>   tags:
>  - nagios_downtime
>
> - hosts: talk
>   gather_facts: false
>
>   tasks:
> - name: reboot server
>   raw: 'cmd /c shutdown /r /t 0'
>   when: reboot_hint.reboot_required == true
>
> This is another of my Ansible 101 questions; help making it work is 
> appreciated!
>

-- 
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.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/38372e21-751d-4e01-a161-a0249ebb6ed9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] Re: openstack os_project endpoint error

2016-02-17 Thread David Shrewsbury
You can set your auth parameters within each task of your playbook. Not as 
convenient, obviously.
If you do that, you should not mix env variables with auth params in the 
playbook. You could also
define two clouds in a clouds.yaml file 
(see http://docs.openstack.org/developer/os-client-config/),
one with v2 and the other with v3 and just name the cloud in each task. 
Again, don't mix env variables
and use of clouds.yaml.


On Tuesday, February 16, 2016 at 3:25:50 AM UTC-5, Scott wrote:
>
>
> Thanks for reply.  Tried settings as mentioned and now get is "The request 
> you have made requires authentication. (HTTP 401) (Request-ID: 
> req-3b396e91-c949-4956-b724-9b716c1f19df)".  I know the user I'm using is 
> OK because when I run the openstack cli using same credentials it works.  I 
> have just noticed that on some of my openstack CLI commands,  I need to set 
> "--os-identity-api-version 3"  and some need "--os-identity-api-version 
> 2.0".  This mismatch of APV Version calls is what I think maybe causing the 
> issue.  Have a call to HP to query if this is correct.  But is there a way 
> within the auth section of the module to specify which API version to use?
>

-- 
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.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/2b0852da-ed6c-4f05-9693-c90fec0d5571%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] Re: Debugging Ansible 2 on Windows Server?

2016-02-17 Thread Slim Slam
It sits there for a few moments and then moves on.  

J

On Tuesday, February 16, 2016 at 4:55:21 PM UTC-6, J Hawkesworth wrote:
>
> The only time I've seen a raw really not produce any output was on ansible 
> 1.9.4 where one of the command args contained a > - however the same 
> problem doesn't occurr in 2.0.
>
> Does it fail instantly or after a second or two?
>
> Only thing other I can think of is to try the update to Windows Management 
> Framework 4.0 then.  I heard Dave Wyatt (powershell MVP) say at WinOps last 
> year that 4.0 includes a re-write of WMI, which in his opinion made it much 
> more stable and a better choice for automating against.
> Unless it would invalidate the purpose of compiling on Server 2008R2 I 
> reckon it would be worth a try.
>
> Jon
>
> On Tuesday, 16 February 2016 21:34:30 UTC, Slim Slam wrote:
>>
>> Windows 2008R2 is still a mystery.  I'm using the stock AWS AMI with all 
>> updates applied and upped the
>> PS RAM as I did for Windows 2012R2.  Still, I get the same thing as 
>> before.  How can it just fail with no
>> output?  I don;t see anything in the Windows event logs, but I could be 
>> missing something. 
>> I'm hoping that Ansible 2.01 might work a bit better.
>>
>> J
>>
>> On Monday, February 15, 2016 at 3:04:10 PM UTC-6, J Hawkesworth wrote:
>>>
>>> Glad increasing the quota got you going on S 2012.
>>>
>>> You can manually apply the hotfix, although my prefered way of getting 
>>> round it was to upgrade to Windows Management Framework 4.0 (which includes 
>>> powershell 4) if that's an option for you.  I think there's an msi or msu 
>>> to run to install it - I'm not actually using 2008 any more.
>>>
>>> You can see if you have the hotfix installed by running the powershell 
>>> command
>>>
>>> Get-Hotfix 
>>>
>>>  - see https://technet.microsoft.com/en-us/library/hh849836.aspx
>>>
>>> Hope this helps,
>>>
>>> Jon
>>>
>>>
>>>
>>> On Monday, 15 February 2016 17:52:05 UTC, Slim Slam wrote:

 Hi Jon,

   Thanks so much for your reply.  I carefully followed the instructions 
 at this link to double the amount of winrm ram from 1 gig to 2gig:


 https://blogs.technet.microsoft.com/heyscriptingguy/2013/07/30/learn-how-to-configure-powershell-memory/

   That solved the out-of-memory problem on Windows Server 2012, but for 
 Windows Server 2008R2, I'm getting the same result as before.
 I did a full Windows Update and restart. The MaxMemoryPerShellMB shows 
 as 2048m. But still the same results. The
 output (shown above in my original posting) is done with -vv, btw. 
  I looked through the event logs and couldn't find
 anything for winrm that would explain things.

   Do you think I need to manually apply that patch somehow? Is there an 
 easy way to tell if I need to apply it or not? (sorry, I'm not a Windows 
 expert).

 Thanks,

 J


 On Monday, February 15, 2016 at 5:40:58 AM UTC-6, J Hawkesworth wrote:
>
> Bit of a guess but I wonder if you are hitting a quota limit in the 
> winrm configuration on your windows machine?
>
> MaxMemoryPerShellMB  looks the most likely - see 
> https://msdn.microsoft.com/en-us/library/windows/desktop/ee309367(v=vs.85).aspx
>  
>
> Unpatched Server 2008 R2 had a bug that mis-set the quotas which makes 
> me think that might explain the difference - bug detailed here: 
> https://social.technet.microsoft.com/Forums/windows/en-US/51810d3b-6236-44f8-99fd-10f004ad8002/winrm-quotas-setting-ignored-since-kb2506143?forum=w7itproinstall
>
> To debug.. you could try running with -vv to get full 
> stdout/stderr from when the compile runs.
> Also check windows event logging for winrm / winrs to see if winrm is 
> reporting any errors.
>
> If the quota size is the problem, I have read somewhere, -sorry can't 
> find the link now  - that you can't reconfigure winrm remotely so you 
> might 
> have to workaround changing the quota settings if that is in fact the 
> problem.  If it can't be done in the configure ansible for remoting 
> script 
> then might be possible by creating a scheduled task.
>
> Hope this helps,
>
> Jon
>
>
>
>
>
>
> On Monday, 15 February 2016 05:40:06 UTC, Slim Slam wrote:
>>
>> I'm using the Ansible "raw" module to compile a Java app on Windows 
>> Server 2008 and 2012. Both have the Oracle 64-bit Java 8 JDK. Windows 
>> Server 2008 has Powershell 3 and
>> Windows Server 2012 has Powershell 4.  These servers are the stock 
>> Windows AMIs running on AWS.
>>
>> On Windows Server 2012, it almost completes but always eventually 
>> bombs out with:
>>
>> error occurred during error reporting (null), id 0xc005]", "", "#", 
>> "# There is insufficient memory for the Java Runtime Environment to 
>> continue.", "# 

[ansible-project] Re: Bootstrapping FreeBSD with Ansible 2.0: RAW module does not work anymore?

2016-02-17 Thread Johannes Kastl
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi everyone,

as I got no responses, I'll keep the full quote.

No one provisioning FreeBSD machines anymore? Or is this working for
everybody else, but not for me?

Thanks,
Johannes

On 10.02.16 Johannes Kastl wrote:
> Hi everyone,
> 
> I found some nice articles how to bootstrap FreeBSD machines
> with ansible, as they lack a python install by default. Seems 
> bootstrapping pkg and installing python seems to be enough.
> 
> http://lampros.chaidas.com/index.php?controller=post=view_
po
>
> 
st=56
> https://blog.codeways.org/ansible-freebsd/ 
> https://docs.ansible.com/ansible/intro_bsd.html
> 
> But when using these kind of commands with ansible 2.0 from a
> OSX machine, the command always hangs. When killing the process
> on the freebsd machine, I get output similar to this:
> 
>> ansible -vvv -k -u root XYZ -m raw -a 'env
>> ASSUME_ALWAYS_YES=YES /usr/sbin/pkg bootstrap -f' SSH password:
>>  ESTABLISH CONNECTION FOR USER: root on PORT 22 TO
>> freebsdmitnat
> [...]
>>  EXEC /usr/sbin/pkg bootstrap -f XYZ | FAILED | rc=143 >> 
>> The package management tool is not yet installed on your
>> system. Do you want to fetch and install it now? [y/N]:
>> Beendet
> 
> Apparently the ASSUME_ALWAYS_YES variable does not get set, and
> thus the commands ask for confirmation (last two lines of
> output). When calling the whole 'env ... -f' command on the
> freebsd machine, this works like a charm.
> 
> I also tried using root, using a user via sudo or su, but each
> time the same behaviour.
> 
> Question: Is this a (known) regression with ansible 2.0 or
> earlier? All the articles are a little bit old, maybe this has
> changed in the meantime?
> 
> Anyone having a solution?
> 
> Setting ansible_shell_type to csh via host_vars/group_vars/...
> does not work.
> 
> Thanks in advance,
> 
> Johannes
> 

-BEGIN PGP SIGNATURE-
Version: GnuPG v2
Comment: Using GnuPG with SeaMonkey - http://www.enigmail.net/

iEYEARECAAYFAlbExJgACgkQzi3gQ/xETbLaiwCeLD5tEIWGXd8Y3IRgT4M8Zbh0
cC4An0vjf/QG+QcES2TrmkaHiiNNct+Q
=5E3Y
-END PGP SIGNATURE-

-- 
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.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/56C4C49D.3040907%40ojkastl.de.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] Template inheritance.

2016-02-17 Thread Roger Gomez
Hello everyone,
I'm trying to work with Jinja2 template inheritance and I'm seeing this 
issue.
#playbook.yml

---
- name: Template inheritance test
  hosts: localhost
  tasks:
  - template:
 src=child.j2
 dest=~/test.cfg

#child.j2

{% extends "base.j2" %}
This is from the original 
{% block my_block %}
{% endblock %}
This is from the original too

#base.j2

this should not be in the output.
{% block my_block %}
This should be in the output
{% endblock %}
this should not be in the output either.

After I run the playbook:

cat test.cfg
this should not be in the output.
this should not be in the output either.

I was expecting to see:

This is from the original 
This should be in the output
This is from the original too

What I'm missing here?
Thanks.

-- 
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.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/640f36f3-7a9f-4b30-b213-d628c33d2157%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] Templates and inheritance

2016-02-17 Thread Roger Gomez
Hi @Kirk Byers,
I'm trying to work with Jinja2 template inheritance and I'm seeing this 
issue.
_playbook.yml_
```
---
- name: Template inheritance test
  hosts: localhost
  tasks:
  - template:
 src=child.j2
 dest=~/test.cfg
```
_child.j2_
```
{% extends "base.j2" %}
This is from the original 
{% block my_block %}
{% endblock %}
This is from the original too
```
_base.j2_
```
this should not be in the output.
{% block my_block %}
This should be in the output
{% endblock %}
this should not be in the output either.
```
After I run the playbook:
```
cat test.cfg
this should not be in the ouput.
this should not be in the output either.
```
I was expecting to see:
```
This is from the original 
This should be in the output
This is from the original too
```
What I'm missing here?
Thanks.

-- 
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.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/3be6c25a-0e47-4fa9-a564-994004e801aa%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] Re: win_package arguments format

2016-02-17 Thread Gerald Spencer
When the appropriate command line format for the reference file is 
supplied, the installer creates a setup.txt in the installers directory 
with various other information. Unfortunately, using the an absolute path 
with forward or back slashes does not appear to work for the ansible 
arguments as no setup.txt is created.

 
On Wednesday, February 17, 2016 at 9:40:58 AM UTC-8, Trond Hindenes wrote:
>
> Your pathing for "setup.iss" is probably wrong. PowerShell takes a 
> "dot-backslash" approach when using the shell interactively, but that 
> doesn't mean you should do the same when supplying absolute/relative paths 
> to the ansible module. Also, PowerShell supports forward slashes, so feel 
> free to use them instead, so you don't have to escape them.
>
> I would assume you would use something like:
>
> - name: install software
>   win_package:
> path: "C:/Users/UserName/Desktop/Software/setup.exe"
> product_id: {guid}
> arguments: '-s -f1 "C:/Users/UserName/Desktop/Software/setup.iss" ' 
> (i added a space between the last double-quote and single-quote just for 
> clarification. Should probably be removed in prod)
>
>
> On Wednesday, February 17, 2016 at 6:35:17 PM UTC+1, Gerald Spencer wrote:
>>
>> After further poking around after the win_package is parsed out to the 
>> windows machine. Every backslash that is entered into the arguments is 
>> doubled for the $complex_args variable in the powershell script that is ran 
>> on the windows machine. 
>>
>> So 
>>
>>- "-s -f1".\setup.iss" becomes "-s -f1".\\setup.iss" 
>>- "-s -f1".\\setup.iss" becomes "-s -f1".setup.iss" 
>>- "-s -f1"C:\\Users\\UserName\\Desktop\\Software\\setup.iss" becomes 
>>"-s -f1"C:UsersUserNameDesktopSoftwaresetup.iss"" 
>>
>> I even set an enviroment variable for the full path of setup.iss and 
>> tried to invoke it with 
>>
>>- "-s -f1\'$env:referenceFilePath\' " ( \' in order to escape the 
>>single quote required to evaluate a variable in a double quote of a .ps1)
>>
>> Unfortunately, this did not work with win_package. Though it did work 
>> when I created a quick script on the local machine for testing. It seems to 
>> me that the win_package parses the argument string in an odd way. 
>>
>

-- 
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.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/2d40008e-cf1b-4abf-b539-2509e6f1ebc3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] Re: win_package arguments format

2016-02-17 Thread Trond Hindenes
Your pathing for "setup.iss" is probably wrong. PowerShell takes a 
"dot-backslash" approach when using the shell interactively, but that 
doesn't mean you should do the same when supplying absolute/relative paths 
to the ansible module. Also, PowerShell supports forward slashes, so feel 
free to use them instead, so you don't have to escape them.

I would assume you would use something like:

- name: install software
  win_package:
path: "C:/Users/UserName/Desktop/Software/setup.exe"
product_id: {guid}
arguments: '-s -f1 "C:/Users/UserName/Desktop/Software/setup.iss" ' (i 
added a space between the last double-quote and single-quote just for 
clarification. Should probably be removed in prod)


On Wednesday, February 17, 2016 at 6:35:17 PM UTC+1, Gerald Spencer wrote:
>
> After further poking around after the win_package is parsed out to the 
> windows machine. Every backslash that is entered into the arguments is 
> doubled for the $complex_args variable in the powershell script that is ran 
> on the windows machine. 
>
> So 
>
>- "-s -f1".\setup.iss" becomes "-s -f1".\\setup.iss" 
>- "-s -f1".\\setup.iss" becomes "-s -f1".setup.iss" 
>- "-s -f1"C:\\Users\\UserName\\Desktop\\Software\\setup.iss" becomes 
>"-s -f1"C:UsersUserNameDesktopSoftwaresetup.iss"" 
>
> I even set an enviroment variable for the full path of setup.iss and tried 
> to invoke it with 
>
>- "-s -f1\'$env:referenceFilePath\' " ( \' in order to escape the 
>single quote required to evaluate a variable in a double quote of a .ps1)
>
> Unfortunately, this did not work with win_package. Though it did work when 
> I created a quick script on the local machine for testing. It seems to me 
> that the win_package parses the argument string in an odd way. 
>

-- 
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.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/493d29f5-a9cd-4e5c-928d-2c1d6174b585%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] Re: win_package arguments format

2016-02-17 Thread Gerald Spencer
After further poking around after the win_package is parsed out to the 
windows machine. Every backslash that is entered into the arguments is 
doubled for the $complex_args variable in the powershell script that is ran 
on the windows machine. 

So 

   - "-s -f1".\setup.iss" becomes "-s -f1".\\setup.iss" 
   - "-s -f1".\\setup.iss" becomes "-s -f1".setup.iss" 
   - "-s -f1"C:\\Users\\UserName\\Desktop\\Software\\setup.iss" becomes "-s 
   -f1"C:UsersUserNameDesktopSoftwaresetup.iss"" 
   
I even set an enviroment variable for the full path of setup.iss and tried 
to invoke it with 

   - "-s -f1\'$env:referenceFilePath\' " ( \' in order to escape the single 
   quote required to evaluate a variable in a double quote of a .ps1)
   
Unfortunately, this did not work with win_package. Though it did work when 
I created a quick script on the local machine for testing. It seems to me 
that the win_package parses the argument string in an odd way. 

-- 
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.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/9b1cad32-c52a-48be-8810-7fd8fae498d1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] Re: win_package arguments format

2016-02-17 Thread Gerald Spencer
And yes on ansible 2.0.0.2

On Wednesday, February 17, 2016 at 9:15:34 AM UTC-8, Gerald Spencer wrote:
>
> Unfortunately, the installshield requires the quotes around the 
> referencefile path following the -f1 switch. 
>
> On Wednesday, February 17, 2016 at 8:17:49 AM UTC-8, J Hawkesworth wrote:
>>
>> Are you using Ansible 2.0.0.2?  
>>
>> I suggest trying to do away with the quotes if at all possible, even if 
>> you wind up with a full path to the setup.iss
>>
>> arguments: "-s -f1 C:\\Users\\UserName\\Desktop\\Software\\setup.exe"
>>
>> Jon
>> On Wednesday, 17 February 2016 11:29:02 UTC, Gerald Spencer wrote:
>>>
>>> Attempting to silently install a package using a response file and the 
>>> appropriate command line. 
>>>
>>> The command I need to run is:
>>>
>>>- .\setup.exe -s f1".\setup.iss"
>>>
>>>
>>> What I need to enter into arguments is:
>>>
>>> - name: install software
>>>   win_package:
>>> path: "C:\\Users\\UserName\\Desktop\\Software\\setup.exe"
>>> product_id: {guid}
>>> arguments: "-s -f1".\setup.iss""
>>> 
>>> I am unable to get the double quotes to pass through it seems. I've 
>>> tried various formats such as:
>>>
>>>- ' "-s -f1".\setup.iss"" '
>>>- ' -s -f1".\setup.iss" '
>>>- "-s -f1'.\setup.iss' " 
>>>
>>>
>>> Help?
>>>
>>

-- 
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.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/4600aa49-0559-44e6-b46d-0c627c4e7066%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] Re-using "register" variable in multiple tasks

2016-02-17 Thread Dimitri Yioulos
I have the following play in a playbook:

- hosts: talk
  gather_facts: false

  tasks:
- name: win update
  win_updates:
category: 
['SecurityUpdates','CriticalUpdates','Updates','Tools','DefinitionUpdates','UpdateRollups']
  register: reboot_hint

I'd like to re-use reboot_hint in additional plays in the playbook via 
"when", but the playbook ultimately fails after the first "when", as in:

- hosts: talk
  gather_facts: false

  tasks:
- name: start Lyris services
  win_service: name={{ item }} state=started start_mode=auto
  with_items: ["ListManager", "LyrisAlert"]
  when: (lyris_hint.rc == 0) and (reboot_hint.reboot_required == true) 
# ie, the ListManager service is installed and reboot is required

- hosts: admin2
  gather_facts: false
  sudo: yes

  tasks:
- nagios: action=downtime minutes=10 author="Dimitri Yioulos" 
service=host host={{item}}
  with_items:
 - talk
  when: reboot_hint.reboot_required == true
  delegate_to: admin2
- nagios: action=downtime minutes=20 author="Dimitri Yioulos" 
service=all host={{item}}
  with_items:
 - talk
  when: reboot_hint.reboot_required == true
  delegate_to: admin2
  tags:
 - nagios_downtime

- hosts: talk
  gather_facts: false

  tasks:
- name: reboot server
  raw: 'cmd /c shutdown /r /t 0'
  when: reboot_hint.reboot_required == true

This is another of my Ansible 101 questions; help making it work is 
appreciated!

-- 
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.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/74e39e47-3ee6-432f-ad67-0ee94fa0f03f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] Re: win_package arguments format

2016-02-17 Thread 'J Hawkesworth' via Ansible Project
Are you using Ansible 2.0.0.2?  

I suggest trying to do away with the quotes if at all possible, even if you 
wind up with a full path to the setup.iss

arguments: "-s -f1 C:\\Users\\UserName\\Desktop\\Software\\setup.exe"

Jon
On Wednesday, 17 February 2016 11:29:02 UTC, Gerald Spencer wrote:
>
> Attempting to silently install a package using a response file and the 
> appropriate command line. 
>
> The command I need to run is:
>
>- .\setup.exe -s f1".\setup.iss"
>
>
> What I need to enter into arguments is:
>
> - name: install software
>   win_package:
> path: "C:\\Users\\UserName\\Desktop\\Software\\setup.exe"
> product_id: {guid}
> arguments: "-s -f1".\setup.iss""
> 
> I am unable to get the double quotes to pass through it seems. I've tried 
> various formats such as:
>
>- ' "-s -f1".\setup.iss"" '
>- ' -s -f1".\setup.iss" '
>- "-s -f1'.\setup.iss' " 
>
>
> Help?
>

-- 
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.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/130896bb-b1d3-4502-b32d-8ef83f98ff70%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ansible-project] Templating JSON to send with uri

2016-02-17 Thread David Resnick
"{{ lookup('template','add-datasource.json') | from_json }}" worked.

Thanks for responding so quickly; I didn't notice the replies because 
notifications weren't enabled.

- David

On Wednesday, February 10, 2016 at 5:52:34 PM UTC+2, Brian Coca wrote:
>
> The JSON from the template (w/o filters) will be 'typed' by Ansible into a 
> Python data structure, but if it has to_json it will be kept as string 
> bypassing the typing. The from_json will convert it to a Python data 
> structure before Ansible attempts to type it.
>
>
>

-- 
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.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/3ab620a8-76d6-4462-988c-a312da1ff4a3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] Re: Ec2 Ami

2016-02-17 Thread Jarren Oliphint
I actually figured this out, 



On Wednesday, February 17, 2016 at 5:29:03 AM UTC-6, Jarren Oliphint wrote:
>
> I am trying to create a simple playbook and having issues understanding 
> the key value I need. Currently my goal is to do this.
>
> 1.) Get a list of instances either by a tag or running.
> 2.) Register this list and gather the facts of the instances with the 
> ec2_remote_facts module
> 3.) Create an ami of all instances it finds with that tag or running 
> 4.) the name of the ami will need to be the private ip of instance.
>
> Here Is my code so far, but can't figure out the correct variables.
> http://pastebin.com/G78irCWH
>
> I apologize in advance if this not the correct place to ask this question.
>
>

-- 
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.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/8e61350d-9c45-4913-b517-e8d4b92a69d9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ansible-project] Dynamic Inventory

2016-02-17 Thread govindaraj
Sorry, it's the UUID of the machine. Any way we can have it to write IP
address?

 "mesos_masters": [
"b9d2e61e-0653-4a1f-a472-c5f15a017eae",
"ca8c9fc7-337f-4f92-baac-7fe41f6475ce",
"a904e509-b4b1-479e-8137-17bb30b400c9"
  ],


On Tue, Feb 16, 2016 at 7:35 PM, govindaraj 
wrote:

> Hi Matt,
>
> How can i force openstack.py script to write IPv4 address? For some reason
> the JSON file has IPv6 address.
>
>   "mesos_masters": [
> "b9d2e61e-0653-4a1f-a472-c5f15a017eae",
> "ca8c9fc7-337f-4f92-baac-7fe41f6475ce",
> "a904e509-b4b1-479e-8137-17bb30b400c9"
>   ],
>
> I tried the below and it worked
>
> ansible-playbook jenkins_mesos_master.yml -i openstack.py --limit
> a904e509-b4b1-479e-8137-17bb30b400c9 --check
>
> PLAY
> ***
>
> TASK [setup]
> ***
> ok: [a904e509-b4b1-479e-8137-17bb30b400c9]
>
> Thanks,
> Govind
>
> On Tue, Feb 16, 2016 at 7:25 PM, govindaraj 
> wrote:
>
>> Hi Matt,
>>
>> Here is the output from running openstack.py --list. Took a snippet of it.
>>
>>
>>   "interface_ip": "96.119.246.10",
>>   "key_name": "ssd-xplat",
>>   "metadata": {
>> "cluster_name": "jenkins_mesos_master",
>> "group": "mesos_masters",
>> "master_count": "3",
>> "myid": "3"
>>   },
>>
>>
>> $ ansible-playbook jenkins_mesos_master.yml -i openstack.py --limit
>> 96.119.246.10 --check
>> ERROR! Specified --limit does not match any hosts
>>
>>
>> Here is my jenkins_mesos_master.yml playbook
>>
>> - hosts: *mesos_masters *  (should this be the group name that i need to
>> use? )
>>   serial: "50%"
>>   become: yes
>>   become_method: sudo
>>   roles:
>> - vmsetup
>> - mesos_master
>>
>>
>>
>> On Tue, Feb 16, 2016 at 5:18 PM, Matt Martz  wrote:
>>
>>> Effectively ansible is calling that inventory like `./openstack.py
>>> --list`
>>>
>>> You would need to inspect the output to see what is available.
>>>
>>> You are specifying a hosts entry of `jenkins_mesos_slave_prod`, so the
>>> dynamic inventory would need to return that group for it to be used.
>>>
>>> On Tue, Feb 16, 2016 at 4:12 PM, govindaraj 
>>> wrote:
>>>
 Thanks Matt.

 How do i execute this dynamic inventory against my playbook? When i
 tried the below it says no hosts matches.

 #ansible-playbook jenkins_mesos_slave.yml -i openstack.py --limit
 jmesosslv-cmce-02p.sys.comcast.net

 Here is my playbook. How can i ensure my playbook can run against this
 dynamic inventory file?

  #vi jenkins_mesos_slave.yml
 - hosts: jenkins_mesos_slave_prod
   become: yes
   become_method: sudo
   roles:
 - vmsetup
 - mesos_slave

 On Tue, Feb 16, 2016 at 5:07 PM, Matt Martz  wrote:

> The dynamic inventory scripts are supposed to be used in place of a
> ini formatted inventory.
>
> Instead of using `-i /path/to/ini/inventory`  you would use `-i
> /path/to/openstack.py`
>
> To make that possible, the `openstack.py` file needs to be marked as
> executable.
>
> On Tue, Feb 16, 2016 at 4:05 PM, Govindaraj Venkatesan <
> govindaraj@gmail.com> wrote:
>
>> Hi,
>>
>> Is there any script that we can use to construct dynamic inventory
>> file for Openstack?
>>
>> I downloaded the script but it gives a JSON output. Does anyone have
>> a script to convert JSON to update a inventory file with list of IP 
>> address?
>> You can download the latest version of the OpenStack inventory script
>> at:
>> https://raw.githubusercontent.com/ansible/ansible/devel/contrib/inventory/openstack.py
>>
>> Thanks,
>> Govind
>>
>> --
>> 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.com.
>> To post to this group, send email to ansible-project@googlegroups.com
>> .
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/ansible-project/b038f3e7-7e79-4348-9464-0271f815459f%40googlegroups.com
>> 
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
> --
> Matt Martz
> @sivel
> sivel.net
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "Ansible Project" group.
> To unsubscribe from this topic, visit
> 

[ansible-project] Re: galaxy import: "Waiting to start..."

2016-02-17 Thread Chris Houseknecht
The task runner was restarted and imports are working again. 

--chris


On Wednesday, February 17, 2016 at 11:29:03 AM UTC, Roger Gomez wrote:
>
> I'm still experiencing this issue, any idea when is going to be resolved.
>
> On Wednesday, February 10, 2016 at 8:38:03 AM UTC-5, nusenu wrote:
>>
>> Hi, 
>>
>> an hour after importing a new role [1] it still says: 
>>
>> Waiting to start..." 
>> in "View Role Import Details". 
>>
>> How long does it usually take to import a role? 
>>
>> thanks! 
>>
>>
>> [1] nusenu/ansible-relayor 
>>
>>

-- 
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.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/3ee78d2c-9a63-4e24-9591-5dfdc2e44baf%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] Re: activate all ec2 instance store (ephemeral drive)

2016-02-17 Thread Roy
This doesn't happen automatically. 
 
>From what I know is, we need to explicitly tell to activate all instance 
stores (ephemeral drive) available for the instance.

-- 
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.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/1e458f38-eb23-44ac-93dd-d7937d09a2c4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] Re: galaxy import status: waiting to start

2016-02-17 Thread Chris Houseknecht
Looks like your role imported.  I assume this is it: 
 https://galaxy.ansible.com/rvichery/nuage-vsc-installer/

We had some problems with the import process overnight, but they have been 
resolved.  I've been monitoring and imports are working as expected. The 
import should (and is currently) starting almost immediately. 

If you see that the import process is taking an inordinate amount of time 
to get started, please open an issue at Galaxy Issues 
.  And please know, that we are 
working to improve the stability of the import process (see issue #113 
). New code and config 
changes should (fingers crossed) make it into production with the 2.0.1 
release on 2/26. 

Chris Houseknecht
@chouseknecht
Lead Galaxy Engineer
RedHat | Ansible



On Wednesday, February 17, 2016 at 11:29:03 AM UTC, Rémi Vichery wrote:
>
> Hello,
>
> I tried to import a new role  (nuage-vsc-installer)  in galaxy some 
> minutes ago but the status is still "waiting to start". When I try to 
> access the role I receive a 404 error.
>
> How long does it take to import the role ?
>
> Thanks
>

-- 
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.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/826d9892-378e-4711-a2c8-ef699642ac25%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] Ansible Playbooks using

2016-02-17 Thread Isa Baboo
Hi

We are currently testing out Ansible and want to use it in our environment. 
However we only going to use it to manage JBoss (not OS, not DB ) just 
JBoss. Now we notice most of the examples and best practices differentiate 
vars and roles by technology eg . Webserver , Database etc.  In out case we 
want to differentiate by environment DEV INT QA etc. 

This is our setup:

Dir structure:

hosts (in this file all my host are grouped into int dev qa)
main.jboss.yml

/host_vars

/roles/jboss/tasks
./roles/jboss/tasks/install.java.yml
./roles/jboss/tasks/stop.jboss.yml
./roles/jboss/tasks/main.configure.domain.yml
./roles/jboss/tasks/configure.OFV.yml
./roles/jboss/tasks/install.jboss.yml
./roles/jboss/tasks/configure.domain.ldap.yml
./roles/jboss/tasks/patch.jboss.yml
./roles/jboss/tasks/start.jboss.yml
./roles/jboss/tasks/set.java.home.yml
./roles/jboss/tasks/restart.jboss.yml
./roles/jboss/tasks/configure.domain.server.groups.yml
./roles/jboss/tasks/configure.host.yml

./group_vars/dev.yml
./group_vars/int.yml
./group_vars/qa.yml


So when we run our main play book *main.jboss.yml *it uses include to ran 
all the tasks in roles/jboss/tasks/* 
This does the job and works well, However after reading a bit more it seems 
this is not best practice since we calling playbooks in playbooks and not 
really roles even though it is in the roles Directory. 

Is this method fine? any suggestions ?


NB: Things we would like to do:
1. Run same playbook on different environments
2. Be able to run plays by themselves E.g ( restart jboss) 
 

-- 
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.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/fcfd469f-c1c1-4e94-baa8-161496ab6b5b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] Re: Ansible Role dependencies After Role

2016-02-17 Thread Alexey Vazhnov
Ansible tasks and roles must be idempotent. If your role can override 
something, I think it's the wrong way.

On Wednesday, February 3, 2016 at 5:25:35 PM UTC+5, ProfHase wrote:
>
> Hello,
>
> how do I declare a role dependency which is executed after the role, e.g. :
>
> After every execution of role A, role B is executed
>
> According to this ons:
>
> http://docs.ansible.com/ansible/playbooks_roles.html#roles
>
> the roles in 'dependencies' are executed before.
>
> The Background:
> My Role A starts an installer that always overrides the certificates. I 
> also got a certificate deployment role Role B which should always be called 
> after role A.
>

-- 
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.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/3556b8cb-83f2-4aab-b14a-ec99e86ca4b2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] win_package arguments format

2016-02-17 Thread Gerald Spencer
Attempting to silently install a package using a response file and the 
appropriate command line. 

The command I need to run is:

   - .\setup.exe -s f1".\setup.iss"


What I need to enter into arguments is:

- name: install software
  win_package:
path: "C:\\Users\\UserName\\Desktop\\Software\\setup.exe"
product_id: {guid}
arguments: "-s -f1".\setup.iss""

I am unable to get the double quotes to pass through it seems. I've tried 
various formats such as:

   - ' "-s -f1".\setup.iss"" '
   - ' -s -f1".\setup.iss" '
   - "-s -f1'.\setup.iss' " 


Help?

-- 
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.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/2c3be6d6-20f7-4cc4-a47a-9c2a02092eaf%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] Re: digital_ocean_domain fails on updates

2016-02-17 Thread Andrei Lukovenko
Hello,

It is definitely a 
bug. https://github.com/ansible/ansible-modules-core/pull/3051

On Friday, February 12, 2016 at 3:17:59 PM UTC+1, Jimmy Boykin wrote:
>
> Hello,
>
> I think I discovered a bug.
>
> Under all circumstances digital_ocean_domain will fail when the subdomain 
> (name) already exist:
>
> fatal: [x.sample.com]: FAILED! => {"changed": false, "failed": true, 
> "msg": "'Domain' object has no attribute 'id'"}
>
> If just a name and ip address is provided, the record is created 
> successfully the first time. Subsequent runs of the playbook generate the 
> above error. I have also tried providing an id or droplet_id with every 
> request with the same behavior.
>
> Any guidance would be appreciated!
>
> Thanks,
> Jimmy
>
>

-- 
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.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/2e5addce-392b-4132-9037-950d99098041%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] galaxy import status: waiting to start

2016-02-17 Thread Rémi Vichery
Hello,

I tried to import a new role  (nuage-vsc-installer)  in galaxy some minutes 
ago but the status is still "waiting to start". When I try to access the 
role I receive a 404 error.

How long does it take to import the role ?

Thanks

-- 
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.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/436ade92-815a-446f-9fc3-b17c473a4b6d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.