[ansible-project] Download multiple files from S3

2018-02-06 Thread Suporter
How can i download multiple files from same bucket, can we use wildcard for 
this? i am confused a bit
  -  name: Download from S3
 s3:
   profile: iupdate
   region: ap-southeast-1
   bucket: reareses
   object: sdaces/{{item}}
   with_fileglob: "*.zip"
   dest: "/home/ec2-user/sd/froms3"
   mode: get



-- 
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/72b2876a-8886-4da8-af7b-3fcf84e4ecb0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] Re: requests-credssp and credentials encryprion at first hop.

2018-02-06 Thread Jeremie Levy
I've checked the eventlog and it appears that ansible was trying to become 
root instead of the username from the vars.
I've dig again here to find some examples of become and i found one of your 
answers: 
https://groups.google.com/forum/#!searchin/ansible-project/windows$20become%7Csort:date/ansible-project/g205HMIEjws/tYYMEzlSBQAJ

Bottom line, it's working like that - and using the -K flag @ command line.
---
- hosts: windows
gather_facts: no
tasks:
- name: Check Visual studio Code file
win_stat:
path: \\some\dfs\path\VSCodeSetup-1.8.1.exe
register: result
state: present
become: yes
become_method: runas
become_user: ansible@domain

Thank you Jordan!

On Tuesday, February 6, 2018 at 2:11:30 PM UTC+2, Jeremie Levy wrote:
>
> Also Tried
> ---
> - hosts: windows
> gather_facts: no
> vars:
> - username: ansible@DOMAIN
> - password: password
> become_method: runas
> tasks:
> - name: Check Visual studio Code file
> win_stat:
> path: \\some\dfs\path\VSCodeSetup-1.8.1.exe
> register: result
> state: present
> become: yes
>
> And got:
>
> ansible-playbook 2.5.0 (devel 575e9e9294) last updated 2018/02/06 08:39:18 
> (GMT +300)   
>   config file = /ansible/scripts/ansible.cfg  
> 
>   configured module search path = 
> [u'/home/ansible/.ansible/plugins/modules', 
> u'/usr/share/ansible/plugins/modules']
>   ansible python module location = /ansible/scripts/ansible/lib/ansible
> 
>   executable location = /ansible/scripts/ansible/bin/ansible-playbook  
> 
>   python version = 2.7.12 (default, Dec  4 2017, 14:50:18) [GCC 5.4.0 
> 20160609]  
> Using /ansible/scripts/ansible.cfg as config file  
> 
> setting up inventory plugins  
>
> Parsed /scripts/windows-inventory.yml inventory source with yaml plugin
> 
> Loading callback plugin default of type stdout, v2.0 from 
> /ansible/scripts/ansible/lib/ansible/plugins/callback/default.pyc
>
>
>
>
>  WINRM STDERR
>  WINRM CLOSE SHELL: 
> AC3CF2B5-A044-43DF-A24B-53DB23624226
> The full traceback is:
> Exception calling "RunAsUser" with "7" argument(s): "LogonUser failed (The 
> user name or password is incorrect,
> Win32ErrorCode 1326)"
> At line:1062 char:9
> + $result = [Ansible.BecomeUtil]::RunAsUser($username, $passwor ...
> + ~
> + CategoryInfo  : NotSpecified: (:) [], 
> MethodInvocationException
> + FullyQualifiedErrorId : Win32Exception
>
>
> fatal: [hasgappqba2303.domain]: FAILED! => {
> "changed": false,
> "failed": true,
> "msg": "Exception calling \"RunAsUser\" with \"7\" argument(s): 
> \"LogonUser failed (The user name or password is incorrect, Win32ErrorCode 
> 1326)\""
> }
>
>
>
>
> On Tuesday, February 6, 2018 at 12:45:31 PM UTC+2, Jeremie Levy wrote:
>>
>> Win_package is working fine locally. I'm downloading all the SW i need 
>> and install them locally
>> win_stat:
>> TASK [Check Visual studio Code file] 
>> ***
>> task path: /ansible/scripts/win_stat.yaml:4
>> Using module file 
>> /usr/lib/python2.7/dist-packages/ansible/modules/windows/win_stat.ps1
>> Using module file 
>> /usr/lib/python2.7/dist-packages/ansible/modules/windows/win_stat.ps1
>>  ESTABLISH WINRM CONNECTION FOR USER: ansible@
>> domain on PORT 5986 TO hasgappqba2302.domain
>>  ESTABLISH WINRM CONNECTION FOR USER: ansible@
>> domain on PORT 5986 TO hasgappqba2303.domain
>> creating Kerberos CC at /tmp/tmpMi3utN
>> creating Kerberos CC at /tmp/tmpUIFzBS
>> calling kinit for principal ansible@domain
>> calling kinit for principal ansible@domain
>> kinit succeeded for principal ansible@domain
>>  WINRM CONNECT: transport=kerberos endpoint=
>> https://hasgappqba2302.domain:5986/wsman
>> kinit succeeded for principal ansible@domain
>>  WINRM CONNECT: transport=kerberos endpoint=
>> https://hasgappqba2303.domain:5986/wsman
>>  WINRM OPEN SHELL: 
>> FA267E6D-94C1-4BF1-AD41-75900BCC25DC
>>  WINRM OPEN SHELL: 
>> 47C7EA5A-202C-4560-B54B-B614A3C8B9C7
>> EXEC (via pipeline wrapper)
>> EXEC (via pipeline wrapper)
>>  WINRM EXEC 'PowerShell' ['-NoProfile', 
>> '-NonInteractive', '-ExecutionPolicy', 'Unrestricted', '-']
>>  WINRM EXEC 'PowerShell' ['-NoProfile', 
>> '-NonInteractive', '-ExecutionPolicy', 'Unrestricted', '-']
>>  WINRM RESULT u'> "{"changed":false,"st", err "Test-Path : Access i">'
>>  WINRM STDOUT 
>> 

Re: [ansible-project] Using Ansible per directory instead of per host

2018-02-06 Thread Brian Coca
Just use a loop that traverses per plugin + per dir.

- hosts: wordpress_servers
tasks:
   - copy: src=files/plugins/{{item.1}} dest={{ item|join('/')}}
 loop: '{{ list_of_dirs|zip(list_of_plugins)}}'

^ pseudo code, but very similar to what you can do

-- 
--
Brian Coca

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ansible-project+unsubscr...@googlegroups.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/CACVha7cqPnfrevg3QqqFcEh0yddt_oSFwdnR7pe7FDU5AP3EwQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] Using Ansible per directory instead of per host

2018-02-06 Thread Emmanuel Jaep
I know it will sound a bit strange but I wonder if there is a way to use 
Ansible per directory instead of per host.

Our current use case is the following: the same application (here 
WordPress) is deployed into multiple folders onto the same host (probably a 
very common scenario at a hosting provider).

We want to manage the configuration of all the instances in a 'smart' way 
(hence the idea of using Ansible). for instance, the same file (plugin) 
should be copied into the same subfolders of the instances.

This could be very easily achieved if all instances were hosted on 
different hosts, but I can find a way to achieve this in different folders 
on the same host.

Is that completely stupid? Any insight will be greatly 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/133e7897-6462-4278-bec0-19b72a0eb333%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ansible-project] 'service' should succeed to stop a service, even if non-existant (and spelling issues)

2018-02-06 Thread Matt Martz
We have had many discussions about this in the past, and just recently made
a decision about it in our core team meeting.

We intend on keeping the current behavior, but to get your expected outcome
you should either used `failed_when` or `ignore_errors` to allow that to
succeed when the service is missing.  In 2.5 you can also make use of the
`service_facts` module to use in determining if you need to stop that
service.

https://github.com/ansible/community/issues/291#issuecomment-360274948
https://meetbot.fedoraproject.org/teams/ansible_core_meeting/ansible_core_meeting.2018-01-30-19.00.log.html
https://meetbot.fedoraproject.org/teams/ansible_core_meeting/ansible_core_meeting.2018-01-30-19.00.html


On Tue, Feb 6, 2018 at 12:08 PM, Kevin Burton  wrote:

> Right now if you stop a service which isn't installed you get an error.
>
> service: name=kube-apiserver state=stopped
>
>
> .. if the kube-apiservice service isn't installed it will just fail.
>
> It shouldn't fail.  It's 'stopped' which is the same as not existing in a
> way.
>
> I need this for un-installation of software.
>
> I want an idempotent script that stops all the services, removes the
> packages, and removes the config files.
>
> Right now I can't do this as ansible isn't idempotent for some operations.
>
> I reported a bug for this and it was rejected because there could be a
> spelling error in the name.
>
> Which is somewhat true.
>
> but then what about this?
>
> - apt: name=kubernetes-server state=absent
>
>
> that will succeed if you have a spelling error in the name.
>
> So let's be consistent here? Which one is it?
>
> Perhaps we need some more states to resolve this?
>
> Maybe an 'absent' on 'service' which will 'stop' the service?  the only
> problem is that it's not 'absent' at that point.
>
>
>
> --
> [image: 1_Primary_logo_on_transparent_268x67.png]
>
> Affordable, scalable, and managed Elasticsearch and Cassandra clusters
> deployed on bare metal.
>
> Kevin Burton
> Founder/CEO Scalefastr 
> Location: *San Francisco, CA*
>
> --
> 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/CADKGWzs6nDTWExPE8vtVrb9RwWeh2
> xyabtRxVoruSiGBJwbYDQ%40mail.gmail.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/CAD8N0v9gTwiP4ApJUmkVB%2Bv0nDRe7gCdy4BeLJy2zbS-b0sBEQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ansible-project] 'service' should succeed to stop a service, even if non-existant (and spelling issues)

2018-02-06 Thread Kai Stian Olstad
On Tuesday, 6 February 2018 19.08.31 CET Kevin Burton wrote:
> 
> Right now if you stop a service which isn't installed you get an error.
> 
> service: name=kube-apiserver state=stopped
> 
> .. if the kube-apiservice service isn't installed it will just fail.
> 
> It shouldn't fail.  It's 'stopped' which is the same as not existing in a
> way.

I guess you can't stop something that doesn't exist, so in that sense it makes 
sense.


> I need this for un-installation of software.
> 
> I want an idempotent script that stops all the services, removes the
> packages, and removes the config files.
> 
> Right now I can't do this as ansible isn't idempotent for some operations.

You have a lot of what to tell Ansible what you expect, one of them is 
failed_when.

- service: name=kube-apiserver state=stopped
  failed_when: false

So yes, you can do it with Ansible right now.


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


[ansible-project] 'service' should succeed to stop a service, even if non-existant (and spelling issues)

2018-02-06 Thread Kevin Burton
Right now if you stop a service which isn't installed you get an error.

service: name=kube-apiserver state=stopped


.. if the kube-apiservice service isn't installed it will just fail.

It shouldn't fail.  It's 'stopped' which is the same as not existing in a
way.

I need this for un-installation of software.

I want an idempotent script that stops all the services, removes the
packages, and removes the config files.

Right now I can't do this as ansible isn't idempotent for some operations.

I reported a bug for this and it was rejected because there could be a
spelling error in the name.

Which is somewhat true.

but then what about this?

- apt: name=kubernetes-server state=absent


that will succeed if you have a spelling error in the name.

So let's be consistent here? Which one is it?

Perhaps we need some more states to resolve this?

Maybe an 'absent' on 'service' which will 'stop' the service?  the only
problem is that it's not 'absent' at that point.



-- 
[image: 1_Primary_logo_on_transparent_268x67.png]

Affordable, scalable, and managed Elasticsearch and Cassandra clusters
deployed on bare metal.

Kevin Burton
Founder/CEO Scalefastr 
Location: *San Francisco, CA*

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


Re: [ansible-project] How to loop over result and retry in the same task?

2018-02-06 Thread Brian Coca
you cannot loop over the results of your task that is generating those
results, you CAN loop over the results of one task in a second task.





-- 
--
Brian Coca

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ansible-project+unsubscr...@googlegroups.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/CACVha7dP%2B-Wa6wnNKEBZTTnPcNJS7Odj0MfVPPwOPNJ6%3DWmQsg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ansible-project] --limit [exclusive, inclusive] not working as expected

2018-02-06 Thread Brian Coca
The range is inclusive.


-- 
--
Brian Coca

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ansible-project+unsubscr...@googlegroups.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/CACVha7eVy_ws4AkBnt%3DYAcDu9cTopUvoKX0b9Ds4rDeSGhc-jA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] Switch config template

2018-02-06 Thread Surjeet Singh
Hi All,

I am working to prepare config template for one of my on going project, 
where i have four type of devices to create template and push the config. i 
have made my strategy to how to deal with this.

now i want write my play book to check condition under the device_type  
variable and create config accordingly to device type let's say if it is 
core get the veritable from multiple dict(l2vlan,l3vlan,core_interfaces), 
same for access and others.

so my question,  is there any way to match variable. also tell the play 
book to look on multiple dict ?

regards/Surjeet 

-- 
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/2f3628bf-5b5f-4757-93c9-63960a142149%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] Re: requests-credssp and credentials encryprion at first hop.

2018-02-06 Thread Jeremie Levy
Also Tried
---
- hosts: windows
gather_facts: no
vars:
- username: ansible@DOMAIN
- password: password
become_method: runas
tasks:
- name: Check Visual studio Code file
win_stat:
path: \\some\dfs\path\VSCodeSetup-1.8.1.exe
register: result
state: present
become: yes

And got:

ansible-playbook 2.5.0 (devel 575e9e9294) last updated 2018/02/06 08:39:18 
(GMT +300)   
  config file = /ansible/scripts/ansible.cfg
  
  configured module search path = 
[u'/home/ansible/.ansible/plugins/modules', 
u'/usr/share/ansible/plugins/modules']
  ansible python module location = /ansible/scripts/ansible/lib/ansible

  executable location = /ansible/scripts/ansible/bin/ansible-playbook  

  python version = 2.7.12 (default, Dec  4 2017, 14:50:18) [GCC 5.4.0 
20160609]  
Using /ansible/scripts/ansible.cfg as config file  

setting up inventory plugins
 
Parsed /scripts/windows-inventory.yml inventory source with yaml plugin

Loading callback plugin default of type stdout, v2.0 from 
/ansible/scripts/ansible/lib/ansible/plugins/callback/default.pyc




 WINRM STDERR
 WINRM CLOSE SHELL: 
AC3CF2B5-A044-43DF-A24B-53DB23624226
The full traceback is:
Exception calling "RunAsUser" with "7" argument(s): "LogonUser failed (The 
user name or password is incorrect,
Win32ErrorCode 1326)"
At line:1062 char:9
+ $result = [Ansible.BecomeUtil]::RunAsUser($username, $passwor ...
+ ~
+ CategoryInfo  : NotSpecified: (:) [], 
MethodInvocationException
+ FullyQualifiedErrorId : Win32Exception


fatal: [hasgappqba2303.domain]: FAILED! => {
"changed": false,
"failed": true,
"msg": "Exception calling \"RunAsUser\" with \"7\" argument(s): 
\"LogonUser failed (The user name or password is incorrect, Win32ErrorCode 
1326)\""
}




On Tuesday, February 6, 2018 at 12:45:31 PM UTC+2, Jeremie Levy wrote:
>
> Win_package is working fine locally. I'm downloading all the SW i need and 
> install them locally
> win_stat:
> TASK [Check Visual studio Code file] 
> ***
> task path: /ansible/scripts/win_stat.yaml:4
> Using module file 
> /usr/lib/python2.7/dist-packages/ansible/modules/windows/win_stat.ps1
> Using module file 
> /usr/lib/python2.7/dist-packages/ansible/modules/windows/win_stat.ps1
>  ESTABLISH WINRM CONNECTION FOR USER: ansible@
> domain on PORT 5986 TO hasgappqba2302.domain
>  ESTABLISH WINRM CONNECTION FOR USER: ansible@
> domain on PORT 5986 TO hasgappqba2303.domain
> creating Kerberos CC at /tmp/tmpMi3utN
> creating Kerberos CC at /tmp/tmpUIFzBS
> calling kinit for principal ansible@domain
> calling kinit for principal ansible@domain
> kinit succeeded for principal ansible@domain
>  WINRM CONNECT: transport=kerberos endpoint=
> https://hasgappqba2302.domain:5986/wsman
> kinit succeeded for principal ansible@domain
>  WINRM CONNECT: transport=kerberos endpoint=
> https://hasgappqba2303.domain:5986/wsman
>  WINRM OPEN SHELL: 
> FA267E6D-94C1-4BF1-AD41-75900BCC25DC
>  WINRM OPEN SHELL: 
> 47C7EA5A-202C-4560-B54B-B614A3C8B9C7
> EXEC (via pipeline wrapper)
> EXEC (via pipeline wrapper)
>  WINRM EXEC 'PowerShell' ['-NoProfile', 
> '-NonInteractive', '-ExecutionPolicy', 'Unrestricted', '-']
>  WINRM EXEC 'PowerShell' ['-NoProfile', 
> '-NonInteractive', '-ExecutionPolicy', 'Unrestricted', '-']
>  WINRM RESULT u' "{"changed":false,"st", err "Test-Path : Access i">'
>  WINRM STDOUT 
> {"changed":false,"stat":{"exists":false}}
>
>  WINRM STDERR Test-Path : Access is denied
> At line:91 char:5
> + If (Test-Path -Path $path)
> + ~
> + CategoryInfo  : PermissionDenied: 
> (\\some\dfs\path\j...Setup-1.8.1.exe:String) [Test-Path], UnauthorizedAc
>cessException
> + FullyQualifiedErrorId : 
> ItemExistsUnauthorizedAccessError,Microsoft.PowerShell.Commands.TestPathCommand
>
>
>
>  WINRM CLOSE SHELL: 
> 47C7EA5A-202C-4560-B54B-B614A3C8B9C7
> ok: [hasgappqba2303.domain] => {
> "changed": false,
> "stat": {
> "exists": false
> }
> }
>  WINRM RESULT u' "{"changed":false,"st", err "Test-Path : Access i">'
>  WINRM STDOUT 
> {"changed":false,"stat":{"exists":false}}
>
>  WINRM STDERR Test-Path : Access is denied
> At line:91 char:5
> + If (Test-Path -Path $path)
> + ~
> + CategoryInfo  

[ansible-project] Re: requests-credssp and credentials encryprion at first hop.

2018-02-06 Thread Jeremie Levy
Win_package is working fine locally. I'm downloading all the SW i need and 
install them locally
win_stat:
TASK [Check Visual studio Code file] 
***
task path: /ansible/scripts/win_stat.yaml:4
Using module file 
/usr/lib/python2.7/dist-packages/ansible/modules/windows/win_stat.ps1
Using module file 
/usr/lib/python2.7/dist-packages/ansible/modules/windows/win_stat.ps1
 ESTABLISH WINRM CONNECTION FOR USER: ansible@domain on 
PORT 5986 TO hasgappqba2302.domain
 ESTABLISH WINRM CONNECTION FOR USER: ansible@domain on 
PORT 5986 TO hasgappqba2303.domain
creating Kerberos CC at /tmp/tmpMi3utN
creating Kerberos CC at /tmp/tmpUIFzBS
calling kinit for principal ansible@domain
calling kinit for principal ansible@domain
kinit succeeded for principal ansible@domain
 WINRM CONNECT: transport=kerberos 
endpoint=https://hasgappqba2302.domain:5986/wsman
kinit succeeded for principal ansible@domain
 WINRM CONNECT: transport=kerberos 
endpoint=https://hasgappqba2303.domain:5986/wsman
 WINRM OPEN SHELL: 
FA267E6D-94C1-4BF1-AD41-75900BCC25DC
 WINRM OPEN SHELL: 
47C7EA5A-202C-4560-B54B-B614A3C8B9C7
EXEC (via pipeline wrapper)
EXEC (via pipeline wrapper)
 WINRM EXEC 'PowerShell' ['-NoProfile', 
'-NonInteractive', '-ExecutionPolicy', 'Unrestricted', '-']
 WINRM EXEC 'PowerShell' ['-NoProfile', 
'-NonInteractive', '-ExecutionPolicy', 'Unrestricted', '-']
 WINRM RESULT u''
 WINRM STDOUT 
{"changed":false,"stat":{"exists":false}}

 WINRM STDERR Test-Path : Access is denied
At line:91 char:5
+ If (Test-Path -Path $path)
+ ~
+ CategoryInfo  : PermissionDenied: 
(\\some\dfs\path\j...Setup-1.8.1.exe:String) [Test-Path], UnauthorizedAc
   cessException
+ FullyQualifiedErrorId : 
ItemExistsUnauthorizedAccessError,Microsoft.PowerShell.Commands.TestPathCommand



 WINRM CLOSE SHELL: 
47C7EA5A-202C-4560-B54B-B614A3C8B9C7
ok: [hasgappqba2303.domain] => {
"changed": false,
"stat": {
"exists": false
}
}
 WINRM RESULT u''
 WINRM STDOUT 
{"changed":false,"stat":{"exists":false}}

 WINRM STDERR Test-Path : Access is denied
At line:91 char:5
+ If (Test-Path -Path $path)
+ ~
+ CategoryInfo  : PermissionDenied: 
(\\some\dfs\path\j...Setup-1.8.1.exe:String) [Test-Path], UnauthorizedAc
   cessException
+ FullyQualifiedErrorId : 
ItemExistsUnauthorizedAccessError,Microsoft.PowerShell.Commands.TestPathCommand



 WINRM CLOSE SHELL: 
FA267E6D-94C1-4BF1-AD41-75900BCC25DC
ok: [hasgappqba2302.domain] => {
"changed": false,
"stat": {
"exists": false
}
}
META: ran handlers
META: ran handlers

PLAY RECAP 
*
hasgappqba2302.domain : ok=2changed=0unreachable=0failed=0
hasgappqba2303.domain : ok=2changed=0unreachable=0failed=0


I am not sure how to use ansible_user variable, in the inventory file or 
the playbook ? 
fatal: [hasgappqba2303.domain]: FAILED! => {
"failed": true,
"msg": "Internal Error: this connection module does not support running 
commands via sudo"
}
With:
tasks:
- name: Check Visual studio Code file
win_stat:
path: \\some\dfs\path\VSCodeSetup-1.8.1.exe
register: result
state: present
become: yes
become_user: ansible

I've downloaded version 2.5 and this is the result i got...

Any direction?


On Tuesday, February 6, 2018 at 4:02:27 AM UTC+2, Jordan Borean wrote:
>
> What I would try so that we can narrow down the issue
>
> * Run win_package but set the path to a local path and see if that works
> * Run a win_stat of the network path executable and see if it sees the 
> file (exists is True)
> * Use the username/password options and set it to "{{ ansible_user }}" and 
> "{{ ansible_password }}" respectively as that will be used when copying the 
> file locally
> * If you are on Ansible 2.5 (or the devel branch), see if become works it 
> should run the module as you would when logged on locally
>
> Thanks
>
> Jordan
>

-- 
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/12aa9971-9c73-4152-9f75-602153ab7022%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] Re: Testing playbooks and roles between Ansible versions

2018-02-06 Thread Mike Fennemore
The other thought I had was to have ansible-lint and create rules related 
to the changelogs for each Ansible version.

On Tuesday, February 6, 2018 at 9:06:57 AM UTC+1, Mike Fennemore wrote:
>
> Hi all,
>
> So I have been looking at moving to later versions of Ansible (currently 
> way back on 2.1.4). Ideally I want to have an automated(or relatively 
> automated)
> way to work through all the internal roles and playbooks against different 
> versions of Ansible.
> Does anyone currently have this kind of workflow? My initial thought was 
> to have a CI solution to spin up containers/vm's and have it do test runs 
> (Molecule/Test-kitchen)
> or alternatively have each version of Ansible run in check mode to check 
> for any possible issues.
> The other issue then becomes getting this information out to log 
> processing (logstash perhaps?)
>
> Looking forward to hearing back.
>

-- 
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/db5f94a9-85f6-4390-bd43-1033f7a5c039%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] Testing playbooks and roles between Ansible versions

2018-02-06 Thread Mike Fennemore
Hi all,

So I have been looking at moving to later versions of Ansible (currently 
way back on 2.1.4). Ideally I want to have an automated(or relatively 
automated)
way to work through all the internal roles and playbooks against different 
versions of Ansible.
Does anyone currently have this kind of workflow? My initial thought was to 
have a CI solution to spin up containers/vm's and have it do test runs 
(Molecule/Test-kitchen)
or alternatively have each version of Ansible run in check mode to check 
for any possible issues.
The other issue then becomes getting this information out to log processing 
(logstash perhaps?)

Looking forward to hearing back.

-- 
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/090c1d26-775e-4041-a639-544bec5deb2d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.