[ansible-project] ansible setup subcall to lsblk timing out on Xen mount

2016-09-08 Thread Michael Bubb
Using this version of Ansible


ansible --version
ansible 2.1.1.0
  config file = /etc/ansible/ansible.cfg
  configured module search path = Default w/o overrides
[



On a Softlayer VM 

Linux staging 2.6.32-573.8.1.el6.x86_64 #1 SMP Tue Nov 10 18:01:38 UTC 2015 
x86_64 x86_64 x86_64 GNU/Linux


with these mount points 



[root@staging ~]# lsblk
NAMEMAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
xvdc202:32   0  150G  0 disk
└─xvdc1 202:33   0  150G  0 part /opt
xvda202:00   25G  0 disk
├─xvda1 202:10  256M  0 part /boot
└─xvda2 202:20 24.8G  0 part /
xvdb202:16   02G  0 disk
└─xvdb1 202:17   02G  0 part [SWAP]


The setup play in a previously working playbook failed like this



[setup]
fatal: [staging]: FAILED! => {"changed": false, "cmd": "/bin/lsblk -ln 
--output UUID /dev/xvda1", "failed": true, "msg": "Traceback (most recent 
call last):\n  File 
\"/tmp/ansible_a4NBhA/ansible_modlib.zip/ansible/module_utils/basic.py\", 
line 2093, in run_command\ncmd = subprocess.Popen(args, **kwargs)\n 
 File \"/usr/lib64/python2.6/subprocess.py\", line 642, in __init__\n   
 errread, errwrite)\n  File \"/usr/lib64/python2.6/subprocess.py\", line 
1223, in _execute_child\ndata = _eintr_retry_call(os.read, 
errpipe_read, 1048576)\n  File \"/usr/lib64/python2.6/subprocess.py\", line 
462, in _eintr_retry_call\nreturn func(*args)\n  File 
\"/tmp/ansible_a4NBhA/ansible_modlib.zip/ansible/module_utils/facts.py\", 
line 101, in _handle_timeout\nraise 
TimeoutError(error_message)\nTimeoutError: Timer expired\n", "rc": 257}



I confirmed with an adhoc ansible setup





ansible staging -m setup
staging | FAILED! => {
"changed": false,
"cmd": "/bin/lsblk -ln --output UUID /dev/xvda1",
"failed": true,
"msg": "Traceback (most recent call last):\n  File 
\"/tmp/ansible_HuNPPI/ansible_modlib.zip/ansible/module_utils/basic.py\", 
line 2093, in run_command\ncmd = subprocess.Popen(args, **kwargs)\n 
 File \"/usr/lib64/python2.6/subprocess.py\", line 642, in __init__\n   
 errread, errwrite)\n  File \"/usr/lib64/python2.6/subprocess.py\", line 
1223, in _execute_child\ndata = _eintr_retry_call(os.read, 
errpipe_read, 1048576)\n  File \"/usr/lib64/python2.6/subprocess.py\", line 
462, in _eintr_retry_call\nreturn func(*args)\n  File 
\"/tmp/ansible_HuNPPI/ansible_modlib.zip/ansible/module_utils/facts.py\", 
line 101, in _handle_timeout\nraise 
TimeoutError(error_message)\nTimeoutError: Timer expired\n",
"rc": 257
}


On the server itself this command worked fine


/bin/lsblk -ln --output UUID /dev/xvda1

And there was no obvious issues in syslogs



I then ran this and it worked


ansible staging -m setup -a 'gather_subset=network'
staging | SUCCESS => {
"ansible_facts": {




Then I unmouned and remounted /boot (/dev/xvda1). The subcall then  failed 
on /dev/xvdc1

A reboot of the machine fixed the issue.


I am curious why the Ansible call to lsblk did not work but the native call 
did.

-- 
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/3383fd35-fbe2-40c2-a0b4-321e35474972%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] ansible fact for aix

2016-09-08 Thread hzj...@foxmail.com
hello,all

the result from   executing  fact module on aix  doesnot meet my need,  
 

I want to add some additional thing into the fact, like vg and pv info,  how 
can i get it done? thank u 

-- 
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/2016090908475170168930%40foxmail.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] with_nested and when condition

2016-09-08 Thread Adam Shantz
I'm trying to write a play that allows for me to only build certain 
directories conditionally while using the with_nested.

Here's my variable dictionary:

routers:
  router1:
hostname: adam
  router2:
hostname: steve


Here's my play:

- name: create dirs for swiftmq
  file:
state: directory
path: "{{app_path}}/{{item[1]}}/{{item[0]}}"
follow: yes
owner: inpho
group: inpho
mode: 0755
  when:
- item[0].hostname == ansible_hostname
  with_nested:
- "{{routers}}"
- [ 'config', 'deploy', 'jmsapp', 'log', 'store', 'trace' ]



So, my desired behavior is that it would only create the directories when 
absible_hostname=adam or ansible_hostname=steve.


I get the following error:


fatal: [xxx]: FAILED! => {"failed": true, "msg": "The conditional check 
'item[0].hostname == ansible_hostname' failed. The error was: error while 
evaluating conditional (item[0].hostname == ansible_hostname): 'unicode object' 
has no attribute 'hostname'\n\nThe error appears to have been in 'xxx': line 
33, column 3, but may\nbe elsewhere in the file depending on the exact syntax 
problem.\n\nThe offending line appears to be:\n\n\n- name: create dirs for 
xxx\n  ^ here\n"}



Is it possible to use a when condition in conjunction with with_nested?  If so, 
how do I reference children of the items in the conditional?  I've tried it a 
bunch of ways & can't seem to figure it out.


Thanks in advance!


Adam

-- 
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/bb6fb40f-5955-48b4-98ba-a98044160a17%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


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

2016-09-08 Thread James Cammarata
Hi John,

Our roadmaps have been posted here since 2.1:
https://github.com/ansible/ansible/blob/devel/ROADMAP.rst

Was there something else to which you were referring?

James Cammarata

Ansible Lead/Sr. Principal Software Engineer
Ansible by Red Hat
twitter: @thejimic, github: jimi-c

On Thu, Sep 8, 2016 at 1:43 PM,  wrote:

>
>
> On Wednesday, August 31, 2016 at 2:25:23 PM UTC-4, James Cammarata wrote:
>>
>> Hi all, we're happy to announce that RC2 for 2.1.2 is now available for
>> testing.
>>
>
> Any chance the road map that was promised in the 2.1 release announcement
> will be made available soon?  We are trying to upgrade our playbooks from
> 1.9.4 to 2.1.2 and I'd hate to see 2.2 come out soon afterwords and require
> yet another migration effort.
>
> TIA
>
> JOHN PEACOCK
> senior software build and release engineer
>
> --
> 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/abcaa553-2cc9-4706-baac-9b6c3636e49e%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/CAMFyvFijnJy89vCKQZPixBhp16Pa9kv9LTbd5CyOTnK%3DnqWp-w%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


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

2016-09-08 Thread jpeacock


On Wednesday, August 31, 2016 at 2:25:23 PM UTC-4, James Cammarata wrote:
>
> Hi all, we're happy to announce that RC2 for 2.1.2 is now available for 
> testing.
>

Any chance the road map that was promised in the 2.1 release announcement 
will be made available soon?  We are trying to upgrade our playbooks from 
1.9.4 to 2.1.2 and I'd hate to see 2.2 come out soon afterwords and require 
yet another migration effort.

TIA

JOHN PEACOCK
senior software build and release engineer

-- 
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/abcaa553-2cc9-4706-baac-9b6c3636e49e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ansible-project] Ansible Facts For Additional IP Address On the Interface

2016-09-08 Thread Kai Stian Olstad

On 08. sep. 2016 19:07, Janis Orlovs wrote:

Hello,

I'm strugling with the additional IP address fact for Ansible

"ansible_eth0_1": {
"active": true,
"device": "eth0_1",
"ipv4": {
"address": "192.168.10.2",

Playbook says that eth0_1.ipv4.address is undefined variable.

What you can suggest for these variables?


You have forgotten ansible_ in front of the variable.

--
Kai Stian Olstad

--
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/ed30eb15-ac53-85e0-5c09-43bd63cd1b3f%40olstad.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] Re: Spin Up Jenkins on AWS instance

2016-09-08 Thread rup
Sometimes it's a matter of timing.  If it's sporadically happening, perhaps 
the ssh connection isn't happening within the 10 second default used by 
Ansible.  To override this default you need to specify in your config file.

On Wednesday, September 7, 2016 at 2:33:54 PM UTC-6, Liora Milbaum wrote:
>
> I can provision the ec2 instance but the setup task fails with the message:
> fatal: [54.166.83.128]: UNREACHABLE! => {"changed": false, "msg": "Failed 
> to connect to the host via ssh.", "unreachable": true}
>
> Any idea how to fix/troubleshoot this issue?
>
> I am newbie to Ansible.
>
> Thanks,
> Liora
>

-- 
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/dba6fdc6-d228-48ab-8013-0afe30aaa8ef%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] Re: Baremetal provisioning on Windows Hyper-V

2016-09-08 Thread Matt Davis
Not really- I just talk with a lot of users at conferences and hear from 
our product folks about customer wishes... Determining our official stance 
on DSC is the biggest/most frequent thing I hear on the module side these 
days, so that will likely happen in 2.3 timeframe (whether we ship some 
version of what Trond's been doing with DSC "in the box" or something 
else). We were blocked on Microsoft re-releasing the downlevel WMF5 
installer long enough that it didn't make it for the 2.2 roadmap. 

A lot of little one-off "would be nice if I could XYZ" or enhancements to 
existing modules. Domain setup/management has been a pretty common one- we 
have a bunch of stuff we built for customers that just needs to be cleaned 
up (/support added for pre-2012 maybe). Fair number of requests for SQL 
Server stuff- *hoping* to build that on the new .NET Core SQL client so we 
could use the same module for Windows/Linux clients, since Microsoft's SQL 
client will generally be better supported than an existing native Python 
open source client. 

On Thursday, September 8, 2016 at 9:10:44 AM UTC-7, Mike Fennemore wrote:
>
> Is there an official list of things folks are clamouring for in terms of 
> windows modules Matt?

-- 
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/31e06be3-c3e5-47cd-b23b-2f8f3c4d73ae%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] Ansible Facts For Additional IP Address On the Interface

2016-09-08 Thread Janis Orlovs
Hello,

I'm strugling with the additional IP address fact for Ansible


"ansible_eth0_1": {
"active": true, 
"device": "eth0_1", 
"ipv4": {
"address": "192.168.10.2", 



Playbook says that eth0_1.ipv4.address is undefined variable.

What you can suggest for these variables?

-- 
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/a46751bf-7994-40fb-9f76-020f0490cfe0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ansible-project] Re: Do dynamic inventories support command line arguments?

2016-09-08 Thread Josh Smift
MM> As of now, the recommended way to provide configuration to an
MM> inventory script is either via configuration file, or via environment
MM> variables.
MM>
MM> As of now, there is no way to pass arguments directly to a dynamic
MM> inventory script.

We've done things like this by having a default 'hosts' wrapper script
that calls our dynamic inventory script, and then other wrapper scripts
that call the dynamic inventory script with arguments, so you can add
'--inventory other-wrapper' or prefix 'ANSIBLE_HOSTS=other-wrapper' to get
the other wrapper, which passes along the command line argument.

If you want to be able to specify an arbitrary argument on the command
line on the fly, that won't work; but if you've got a few typical
command-line arguments you want to pass, something like this can work.

  -Josh (j...@care.com)

(apologies for the automatic corporate disclaimer that follows)

This email is intended for the person(s) to whom it is addressed and may 
contain information that is PRIVILEGED or CONFIDENTIAL. Any unauthorized use, 
distribution, copying, or disclosure by any person other than the addressee(s) 
is strictly prohibited. If you have received this email in error, please notify 
the sender immediately by return email and delete the message and any 
attachments from your system.

-- 
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/22481.36395.478370.729312%40gargle.gargle.HOWL.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] Re: Baremetal provisioning on Windows Hyper-V

2016-09-08 Thread Mike Fennemore
Is there an official list of things folks are clamouring for in terms of 
windows modules Matt?

-- 
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/c988624e-8798-4450-b780-db686377f0da%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] Re: Baremetal provisioning on Windows Hyper-V

2016-09-08 Thread Mike Fennemore
Is there an official list of things folks are clamouring for in terms of 
windows modules Matt?

-- 
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/d3be3c09-b89d-4a6c-8223-f21dbb4de64f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] Re: Auth issue in script using Azure Powershell

2016-09-08 Thread Matt Davis
Hard to say without taking apart the Azure cmdlets, but I'd suspect they're 
internally trying to use a Windows credential cache, which has always been 
a no-go for me under a WinRM session (though IIRC it fails loudly when you 
try). 

Some of the stuff that will likely land in Ansible 2.3 may help (become 
support, various other tricks for escaping WinRM's restrictions), but not 
sure what to tell you meantime. Maybe ask the Azure folks why their cmdlets 
don't work under WinRM...

On Tuesday, September 6, 2016 at 10:38:26 AM UTC-7, Barney Sowood wrote:
>
> Hi, 
>
> I've got a powershell script that I'm currently invoking using the 
> script module - assuming I can get this working I'll probably turn it 
> into a module, but I need to get over some issues first. 
>
> The purpose of the script is to configure Azure Online Backup on an on 
> premise Windows Server. The script is working fine when run from an 
> interactive powershell prompt. 
>
> The script is getting passed some credentials, a resource group and a 
> backup vault name. 
>
> It invokes Add-AzureRmAccount (which suceeds) and then 
> Get-AzureRMBackupVault which also succeeds (and returns the backup vault 
> info). So clearly auth to Azure is working correctly. 
>
> The next step is running Get-AzureRMBackupVaultCredentials which 
> downloads a credential file to the local filesystem to be passed to 
> Start-OBRegistration. That step works fine when the script is run 
> interactively, but when the script is run by Ansible it fails with "The 
> specified network password is not correct". 
>
> I'm guessing that for some reason Get-AzureRMBackupVaultCredentials 
> authenticates to Azure in a different way than the other Azure 
> Powershell scripts and that is in some way incompatible with (or 
> disallowed from) Powershell Remote Sessions. 
>
> A slight punt of doing 'Enable-WSManCredSSP -Role "Client" 
> -DelegateComputer "*"' but that didn't help.. 
>
> Has anyone had any similar experiences with using the Azure Powershell 
> cmdlets in a script run by Ansible? 
>
> I realise this is probably verging on more of a powershell vs Ansible 
> question.. 
>
> There may be a way to do the equivalent of 
> Get-AzureRMBackupVaultCredentials via the Azure API - I'll have a look 
> at that if I can't resolve this issue. 
>
> Script is below if anyone wants to try it, it assumes an existing 
> Resource Group, Vault and the Azure Recovery Services client installed. 
>
> thanks, 
>
> Barney. 
>
> -- 
>   Barney Sowood 
>   bar...@sowood.co.uk 
>
> param( 
> [Parameter(Mandatory=$True)] 
> [string]$Username=$null, 
>
> [Parameter(Mandatory=$True)] 
> [string]$Password=$null, 
>
> [Parameter(Mandatory=$True)] 
> [string]$ResourceGroup=$null, 
>
> [Parameter(Mandatory=$True)] 
> [string]$VaultName=$null, 
>
> [Parameter(Mandatory=$True)] 
> [string]$EncryptionPassphrase=$null 
> ) 
>
> $ErrorActionPreference = "Stop" 
>
> # Login to Azure 
> $securePassword = ConvertTo-SecureString $Password -AsPlainText -Force 
> $azureCreds = New-Object 
> System.Management.Automation.PSCredential($Username, $securePassword) 
> Add-AzureRmAccount -Credential $azureCreds 
>
> # Get the backup vault 
> $backupVault = Get-AzureRMBackupVault –ResourceGroupName $ResourceGroup 
> –Name $VaultName 
>
> # Download backup creds 
> $credsFilename = Get-AzureRMBackupVaultCredentials -Vault $backupVault 
> -TargetLocation $env:TMP 
>
> # Register host 
> $creds = $env:TMP + "\" + $credsFilename 
> Start-OBRegistration -VaultCredentials $creds -Confirm:$false 
>
> # Cleanup creds 
> Remove-Item -Force $creds 
>
> # Set encryption passphrase 
> ConvertTo-SecureString -String $EncryptionPassphrase -AsPlainText -Force 
> | Set-OBMachineSetting 
>
>

-- 
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/4718100c-4dec-495e-a234-441501cb0107%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] Re: Ansible on Windows w/o administrator privileges possible?

2016-09-08 Thread Matt Davis
(typical cases only need the "read" and "execute" permission)

On Thursday, September 8, 2016 at 8:47:45 AM UTC-7, Matt Davis wrote:
>
> Yes, it's absolutely possible. Usually the limiting factor on a default 
> install is the WinRM listener ACL- you can see/alter this via:
>
> winrm configSDDL default
>
> and add the necessary users/groups (or add the existing Windows Remote 
> Management group).
>
> On Wednesday, September 7, 2016 at 1:33:54 PM UTC-7, 
> alv2...@googlemail.com wrote:
>>
>> Hello,
>>
>> Is it possible to use a non-administrator user to run Ansible against 
>> Windows hosts and if yes, how?
>>
>> I've used ``invoke-command -computername localhost -credential ansible 
>> -scriptblock {$env:computername}`` to test inside Powershell, which works 
>> fine only if the Ansible user is Administrator.
>>
>> What did not help it:
>>
>> * Add user to Windows Remote management group
>> * Add user to Windows Remote management and WinRMRemoteWMIUsers__ group
>>
>> Test target is this SRV2012R2 vagrant box: 
>> https://atlas.hashicorp.com/mwrock/boxes/Windows2012R2
>>
>> Regards
>> Avaro Aleman
>>
>

-- 
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/5362c7fd-0c42-4c8b-b870-538137978914%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ansible-project] Re: Do dynamic inventories support command line arguments?

2016-09-08 Thread Matt Martz
You don't.  As of now, the recommended way to provide configuration to an
inventory script is either via configuration file, or via environment
variables.

As of now, there is no way to pass arguments directly to a dynamic
inventory script.

On Thu, Sep 8, 2016 at 1:59 AM, 'Nirav Radia' via Ansible Project <
ansible-project@googlegroups.com> wrote:

> @esco real : The question remains the same. How to pass a command line
> argument to that wrapper script then?
>
> On Tuesday, 27 October 2015 22:43:06 UTC+5:30, esco real wrote:
>>
>> You could use some wrapper script(s) as inventory source for that..
>>
> --
> 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/80481788-6952-4cb8-90be-459b6d629b9e%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 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/CAD8N0v-OUYRuZvx%3DC2b0fghq-CCAX6dOdb3egfZ8JUzndBbaSA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] Re: Ansible on Windows w/o administrator privileges possible?

2016-09-08 Thread Matt Davis
Yes, it's absolutely possible. Usually the limiting factor on a default 
install is the WinRM listener ACL- you can see/alter this via:

winrm configSDDL default

and add the necessary users/groups (or add the existing Windows Remote 
Management group).

On Wednesday, September 7, 2016 at 1:33:54 PM UTC-7, alv2...@googlemail.com 
wrote:
>
> Hello,
>
> Is it possible to use a non-administrator user to run Ansible against 
> Windows hosts and if yes, how?
>
> I've used ``invoke-command -computername localhost -credential ansible 
> -scriptblock {$env:computername}`` to test inside Powershell, which works 
> fine only if the Ansible user is Administrator.
>
> What did not help it:
>
> * Add user to Windows Remote management group
> * Add user to Windows Remote management and WinRMRemoteWMIUsers__ group
>
> Test target is this SRV2012R2 vagrant box: 
> https://atlas.hashicorp.com/mwrock/boxes/Windows2012R2
>
> Regards
> Avaro Aleman
>

-- 
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/041bde07-8819-463e-bf7a-b331a60400cd%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] Re: Baremetal provisioning on Windows Hyper-V

2016-09-08 Thread Matt Davis
I've still not heard a single request for it other than your initial one, 
so it's not really high on our list of "things folks are clamoring for"...

On Monday, September 5, 2016 at 7:09:51 PM UTC-7, lars wrote:
>
> Hi Matt,
>
> Is there any update on this? If you supported provisioning vm on hyper v, 
> it would be very useful :)
>
> Thanks,
> Lars
>
> Den tirsdag den 8. marts 2016 kl. 17.03.47 UTC+1 skrev Matt Davis:
>
>> It's honestly not something we get asked about much. There aren't really 
>> many technical hurdles to doing so beyond, "we just don't have the modules 
>> for it". If somebody wanted to write one, there's a good chance we'd accept 
>> it, but with all the other improvements needed in Windows-land over the 
>> next few releases, I wouldn't expect to see Ansible/Red Hat building it 
>> anytime soon...
>>
>> -Matt
>>
>> On Tuesday, March 8, 2016 at 6:10:36 AM UTC-8, Bryn Ellis wrote:
>>>
>>> I'm very new to Ansible so please forgive me if I'm asking silly 
>>> questions.
>>>
>>> From what we've tested internally it seems that ansible nicely supports 
>>> provisioning of virtual machines on the VMware host.
>>>
>>> There seems to be no way of doing the same thing on Hyper-V 2012 though. 
>>>  This appears to be due to the lack of support by libvirt of this version 
>>> of Hyper-V (looks like libvirt supports Hyper-V 2008).
>>>
>>> I'm struggling to believe nobody out there in the ansible world is 
>>> provisioning to Hyper-V 2012 and hasn't hit this problem already.
>>>
>>> How do people provision VM's through ansible to Hyper-V 2012 please?
>>>
>>> Thanks in advance.
>>> Bryn
>>>
>>

-- 
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/780ec189-6b65-403c-be8f-ba5f74db4eac%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] Re: Do dynamic inventories support command line arguments?

2016-09-08 Thread 'Nirav Radia' via Ansible Project
@esco real : The question remains the same. How to pass a command line 
argument to that wrapper script then?

On Tuesday, 27 October 2015 22:43:06 UTC+5:30, esco real wrote:
>
> You could use some wrapper script(s) as inventory source for that..
>

-- 
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/80481788-6952-4cb8-90be-459b6d629b9e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] Aborting entire playbook when one host unreachable

2016-09-08 Thread Gustav Karlsson
Hi,

We are using an ansible (v 2.0.2) playbook for deployment of our webapp. A 
simplified example of what we are doing is: 

Play 1 - db
- Expand the database schema to support new version of the webapp.

Play 2 - appservers
- Deploy new version of the webapps as a rolling update.


The problem we are facing is that if Play 1 fails because the host is 
unreachable, Play 2 still executes, deploying new versions of the webapp 
using a schema not yet in the database. We would ideally abort the entire 
playbook when this happens, in effect canceling the deploy.  (Unreachable 
hosts currently happen very sporadically due to some unknown issue with the 
ssh-config or environment.)


Is there a way to abort the entire playbook (even hackish solutions)?
If not, is there a way to check the results from a previous play?
Is there a better way to solve this type of issue?

We have tried 'max_fail_percentage: 0', 'any_errors_fatal: true' and some 
more hackish solutions, but there just do not seem to be a way...


Thankful for any help here :)

Regards,
Gustav

-- 
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/212e5b04-4740-491d-bb58-4da1fbf73065%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] RE: Ansible cli argument from with ansible-play

2016-09-08 Thread Eric Marquez
I found the answer to my own question.
http://docs.ansible.com/ansible/playbooks_variables.html#passing-variables-on-the-command-line



From: ansible-project@googlegroups.com 
[mailto:ansible-project@googlegroups.com] On Behalf Of Eric Marquez
Sent: Thursday, September 8, 2016 7:12 AM
To: ansible-project (ansible-project@googlegroups.com) 

Subject: [ansible-project] Ansible cli argument from with ansible-play

Can somebody give me a pointer for using CLI commands with Ansible-Play.

I working with a group of network devices and I need to issue the same command 
to all of them to find a specific IP address in the arp table.  I would like to 
do something like the following:

Ansible-play myplay myip=10.10.0.1

Use that myip address in the Ansible-play as a jinja2 variable in my role.


- name: run show arp on remote devices

  eos_command:

commands: show arp {{ myip }}

provider "{{ cli }}"

-- 
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/BY2PR0301MB1958AF36C2742B5F5A483DE9DDFB0%40BY2PR0301MB1958.namprd03.prod.outlook.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] Ansible cli argument from with ansible-play

2016-09-08 Thread Eric Marquez
Can somebody give me a pointer for using CLI commands with Ansible-Play.

I working with a group of network devices and I need to issue the same command 
to all of them to find a specific IP address in the arp table.  I would like to 
do something like the following:

Ansible-play myplay myip=10.10.0.1

Use that myip address in the Ansible-play as a jinja2 variable in my role.


- name: run show arp on remote devices

  eos_command:

commands: show arp {{ myip }}

provider "{{ cli }}"

-- 
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/BY2PR0301MB1958C855560235CCD2941593DDFB0%40BY2PR0301MB1958.namprd03.prod.outlook.com.
For more options, visit https://groups.google.com/d/optout.
<>

[ansible-project] Re: lookup and default value

2016-09-08 Thread fanvalt
I did find out the way to bypass for the 2 cases:
 - set_fact: port='1'
   when: port.0 is not defined or port ==''


Le jeudi 8 septembre 2016 14:40:33 UTC+2, fanvalt a écrit :
>
> Hello,
>
> Is there a way to set a default value when using the lookup module for a 
> csv file.
>
> Case 1:
>
> Here is the csv file:
>
> OPENHRPORT;;
>
> I would like to set the '1' value if the value in the csv file is not 
> specified:
>
>vars:
>  - port: "{{ lookup('csvfile', 'OPENHRPORT file=vars/test.csv 
> delimiter=; col=1') | default('1') }}"
>tasks:
>  - debug: msg="port openhr {{ port }}"
>
>
> But it returns the port varibale set to blank or unset, I would like it 
> set to 1
> "msg": "port openhr "
>
>
> Case 2:
> the csv file has only one key set:
>
> OPENHRPORT;;
>
> And I want to lookup at another key and set a default value if the key is 
> not present in the csv file:
>vars:
>  - port: "{{ lookup('csvfile', 'OPDFT file=vars/test.csv delimiter=; 
> col=1') | default('1') }}"
>tasks:
>  - debug: msg="port openhr {{ port }}"
>
> But it returns in the list bracket , I would expect it set to 1 
>  "msg": "port openhr []"
>
> Could you give me any help on this lookup module and default value ?
>
> Regards,
>
>

-- 
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/1eba25c8-8374-49d9-9d86-b7bbf8aab724%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] Re: lookup and default value

2016-09-08 Thread fanvalt
I found out how to bypass the issue for case 1 by using:
- set_fact: port='1'
   when: port is not defined or port ==''

But it does not bypass the issue in case 2.
if port is [], empty list, what value of port should I test ?



Le jeudi 8 septembre 2016 14:40:33 UTC+2, fanvalt a écrit :
>
> Hello,
>
> Is there a way to set a default value when using the lookup module for a 
> csv file.
>
> Case 1:
>
> Here is the csv file:
>
> OPENHRPORT;;
>
> I would like to set the '1' value if the value in the csv file is not 
> specified:
>
>vars:
>  - port: "{{ lookup('csvfile', 'OPENHRPORT file=vars/test.csv 
> delimiter=; col=1') | default('1') }}"
>tasks:
>  - debug: msg="port openhr {{ port }}"
>
>
> But it returns the port varibale set to blank or unset, I would like it 
> set to 1
> "msg": "port openhr "
>
>
> Case 2:
> the csv file has only one key set:
>
> OPENHRPORT;;
>
> And I want to lookup at another key and set a default value if the key is 
> not present in the csv file:
>vars:
>  - port: "{{ lookup('csvfile', 'OPDFT file=vars/test.csv delimiter=; 
> col=1') | default('1') }}"
>tasks:
>  - debug: msg="port openhr {{ port }}"
>
> But it returns in the list bracket , I would expect it set to 1 
>  "msg": "port openhr []"
>
> Could you give me any help on this lookup module and default value ?
>
> Regards,
>
>

-- 
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/3fc7aac4-ec50-48ac-aaf2-8d7a723b7465%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] lookup and default value

2016-09-08 Thread fanvalt
Hello,

Is there a way to set a default value when using the lookup module for a 
csv file.

Case 1:

Here is the csv file:

OPENHRPORT;;

I would like to set the '1' value if the value in the csv file is not 
specified:

   vars:
 - port: "{{ lookup('csvfile', 'OPENHRPORT file=vars/test.csv 
delimiter=; col=1') | default('1') }}"
   tasks:
 - debug: msg="port openhr {{ port }}"


But it returns the port varibale set to blank or unset, I would like it set 
to 1
"msg": "port openhr "


Case 2:
the csv file has only one key set:

OPENHRPORT;;

And I want to lookup at another key and set a default value if the key is 
not present in the csv file:
   vars:
 - port: "{{ lookup('csvfile', 'OPDFT file=vars/test.csv delimiter=; 
col=1') | default('1') }}"
   tasks:
 - debug: msg="port openhr {{ port }}"

But it returns in the list bracket , I would expect it set to 1 
 "msg": "port openhr []"

Could you give me any help on this lookup module and default value ?

Regards,

-- 
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/0494e393-b5ea-496f-b037-19f68d5521ff%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] Re: Baremetal provisioning on Windows Hyper-V

2016-09-08 Thread Mike Fennemore
Ok will have to build a vmm box to test that. So far I have the 
functionality to create,delete,restart,start and shutdown VM's on a Hyper-V 
host.
I have the initial draft on https://github.com/mikef-nl/hyperv_guest . It 
will need additional testing before I'm happy it works fully. But thus far 
have been able to 
add and delete VM's on a Hyper-V host with no problem. Some extra error 
handling will need to follow and will probably end up creating a separate 
module for SCVMM following what the vmware modules have done.

On Tuesday, March 8, 2016 at 3:10:36 PM UTC+1, Bryn Ellis wrote:
>
> I'm very new to Ansible so please forgive me if I'm asking silly questions.
>
> From what we've tested internally it seems that ansible nicely supports 
> provisioning of virtual machines on the VMware host.
>
> There seems to be no way of doing the same thing on Hyper-V 2012 though. 
>  This appears to be due to the lack of support by libvirt of this version 
> of Hyper-V (looks like libvirt supports Hyper-V 2008).
>
> I'm struggling to believe nobody out there in the ansible world is 
> provisioning to Hyper-V 2012 and hasn't hit this problem already.
>
> How do people provision VM's through ansible to Hyper-V 2012 please?
>
> Thanks in advance.
> Bryn
>

-- 
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/ee8b8788-3a01-4e57-8d4d-00ba6f0e2859%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] Re: Baremetal provisioning on Windows Hyper-V

2016-09-08 Thread Mike Fennemore

On Thursday, September 8, 2016 at 10:36:01 AM UTC+2, Mike Fennemore wrote:
>
> Ok will have to build a vmm box to test that. So far I have the 
> functionality to create,delete,restart,start and shutdown VM's on a Hyper-V 
> host.
>
> On Thursday, September 8, 2016 at 7:59:20 AM UTC+2, lars wrote:
>>
>> Thanks for your reply. 
>>
>> I Use powershell now, and yes, it should connect to vmm.
>
>

-- 
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/854a7d23-b133-46d5-9b06-0d9a00e67816%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] Until is giving issues with ansible 2.1

2016-09-08 Thread Deepa Yr
Hi

Earlier we were using Ansible 2.0.1 where playbooks were running 
fine. Now upgraded to Ansible 2.1.1. Seeing issues with until module.

- name: Copy the file
  get_url:
headers: "{{ headers }}"
url: "{{ asset_repo_url }}/{{ file_path }}"
dest: "{{ file_dest }}"
checksum: md5:{{ file_md5 }}
  register: get_url_result
  until: "'OK' in get_url_result.msg or 'file already exists' in 
get_url_result.msg"
  ignore_errors: true

In this if until command is commented, then it runs fine. Can you please 
let me know how it should be used in Ansible 2.1.1 version.
Many thanks

Regards
Deepa

-- 
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/d109f887-41c3-4218-894b-730b62f56878%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] Re: Baremetal provisioning on Windows Hyper-V

2016-09-08 Thread Mike Fennemore
Ok will have to build a vmm box to test that. So far I have the 
functionality to create,delete,restart,start and shutdown VM's on a Hyper-V 
host.

On Thursday, September 8, 2016 at 7:59:20 AM UTC+2, lars wrote:
>
> Thanks for your reply. 
>
> I Use powershell now, and yes, it should connect to vmm.

-- 
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/d5585ff6-ee16-47e2-b8c6-06bb0aa65dde%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


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

2016-09-08 Thread nusenu


James Cammarata:
> Hi nusenu, I'll take a look at that again as we will be doing a RC3 for
> 2.1.2.
> 

thank you, looking forward to a version with a fix for this regression.
nusenu

-- 
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/3ba4d9d7-ef0a-5c06-08f9-5f9e025437c5%40openmailbox.org.
For more options, visit https://groups.google.com/d/optout.


signature.asc
Description: OpenPGP digital signature