[ansible-project] Re: looking for script to create custom vpc with public and private subnet and deploy rds on private subnet

2018-05-04 Thread Arbab Nazar
Please use this as 
reference: https://github.com/arbabnazar/ansible-aws-roles, hope you will 
get all the desired information

On Friday, May 4, 2018 at 3:08:33 AM UTC+5, karthick selvam wrote:
>
> ---
> - hosts: all
>   connection: local
>   gather_facts: no
>   tasks:
>   - ec2_vpc:
> state: present
> cidr_block: 172.22.0.0/16
> resource_tags: { "Environment":"Development" }
> subnets:
>   - cidr: 172.22.1.0/24
> az: ap-south-1a
> resource_tags: { "Environment":"Dev", "Tier" : "Web" }
>   - cidr: 172.22.2.0/24
> az: ap-south-1b
> resource_tags: { "Environment":"Dev", "Tier" : "App" }
> internet_gateway: True
> route_tables:
>   - subnets:
>   - 172.22.1.0/24
> routes:
>   - dest: 0.0.0.0/0
> gw: igw
> region: ap-south-1
> register: vpc
>

-- 
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/19fd7b91-f2dc-4145-befd-b0fd3574e9c2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] AWS dynamic inventory not working - on ONE account

2018-05-04 Thread Karl Auer
I manage multiple AWS accounts. On all but one, I can use the ec2.py 
dynamic inventory script.

On that one account, the inventory is always empty:

kauer@kt:~/dev/ansible$ scripts/ec2.py --list
{
  "_meta": {
"hostvars": {}
  }
}

So authentication to AWS works. There are definitely running instances in 
the account. The user I am authenticating has has full administrative 
access.

Does anyone have any idea why this doesn't work on just this one AWS 
account?

Regards, K.


-- 
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/4ebf5d79-d4c3-4242-800d-17a37db5fa8b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ansible-project] ansible playbook become-method not working

2018-05-04 Thread Brian Coca
It is the same password, it is just asking for the 'default/current'
become method, you can ignore the display and we have changed it to
the neutral 'become' in recent versions.


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


Re: [ansible-project] CLI "choco install rsat" works win_chocolatey install rsat fails

2018-05-04 Thread Jordan Borean
No idea on that, looks like an issue in the install script for the rsat 
package. You can try to just become an existing user and not SYSTEM account 
like so

- win_chocolatey:
name: rsat
state: present
  vars:
ansible_become: yes
ansible_become_method; runas
ansible_become_user: '{{ ansible_user }}'
ansible_become_pass: '{{ ansible_password }}'

I don't have a Windows 10 box to test out but both this and becoming the 
System account worked fine on a Server 2016 machine for me.

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/f74a6c2f-0dda-42c7-b4fd-5307c2c0f956%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ansible-project] CLI "choco install rsat" works win_chocolatey install rsat fails

2018-05-04 Thread Jordan Borean
Yep, looks like we should update the docs to be correct, you can just do *- 
win_shell: whoami* to test it out.

-- 
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/7186c7bb-d5b1-4eb3-a342-e4e9488420a6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ansible-project] "ERROR: Cannot process argument transformation on parameter 'url64bit'. Cannot convert value to type System.String.",

2018-05-04 Thread Bob Tanner
Cannot seem to win!

chocolatey_msu:
  - rsat

- name: Install host specific msu (choco)
  win_chocolatey:
name: "{{ item }}"
state: "present"
  when:
- host_chocolatey_msu is defined
  with_items:
  - "{{ host_chocolatey_msu }}"
  vars:
ansible_become: yes
ansible_become_method: runas
ansible_become_user: SYSTEM


"stdout_lines": [
"Chocolatey v0.10.10",
"Installing the following packages:",
"rsat",
"By installing you accept licenses for the packages.",
"[NuGet] Installing 'RSAT 2.1'.",
"[NuGet] Successfully installed 'RSAT 2.1'.",
"",
"RSAT v2.1 [Approved]",
"rsat package files install completed. Performing other installation 
steps.",
"VERBOSE: Exporting function 'Format-FileSize'.",
"VERBOSE: Exporting function 'Get-ChecksumValid'.",
"VERBOSE: Exporting function 'Get-ChocolateyUnzip'.",
"VERBOSE: Exporting function 'Get-ChocolateyWebFile'.",
"VERBOSE: Exporting function 'Get-EnvironmentVariable'.",
"VERBOSE: Exporting function 'Get-EnvironmentVariableNames'.",
"VERBOSE: Exporting function 'Get-FtpFile'.",
"VERBOSE: Exporting function 'Get-OSArchitectureWidth'.",
"VERBOSE: Exporting function 'Get-PackageParameters'.",
"VERBOSE: Exporting function 'Get-PackageParametersBuiltIn'.",
"VERBOSE: Exporting function 'Get-ToolsLocation'.",
"VERBOSE: Exporting function 'Get-UACEnabled'.",
"VERBOSE: Exporting function 'Get-UninstallRegistryKey'.",
"VERBOSE: Exporting function 'Get-VirusCheckValid'.",
"VERBOSE: Exporting function 'Get-WebFile'.",
"VERBOSE: Exporting function 'Get-WebFileName'.",
"VERBOSE: Exporting function 'Get-WebHeaders'.",
"VERBOSE: Exporting function 'Install-BinFile'.",
"VERBOSE: Exporting function 'Install-ChocolateyDesktopLink'.",
"VERBOSE: Exporting function 'Install-ChocolateyEnvironmentVariable'.",
"VERBOSE: Exporting function 'Install-ChocolateyExplorerMenuItem'.",
"VERBOSE: Exporting function 'Install-ChocolateyFileAssociation'.",
"VERBOSE: Exporting function 'Install-ChocolateyInstallPackage'.",
"VERBOSE: Exporting function 'Install-ChocolateyPackage'.",
"VERBOSE: Exporting function 'Install-ChocolateyPath'.",
"VERBOSE: Exporting function 'Install-ChocolateyPinnedTaskBarItem'.",
"VERBOSE: Exporting function 'Install-ChocolateyPowershellCommand'.",
"VERBOSE: Exporting function 'Install-ChocolateyShortcut'.",
"VERBOSE: Exporting function 'Install-ChocolateyVsixPackage'.",
"VERBOSE: Exporting function 'Install-ChocolateyZipPackage'.",
"VERBOSE: Exporting function 'Install-Vsix'.",
"VERBOSE: Exporting function 'Set-EnvironmentVariable'.",
"VERBOSE: Exporting function 'Set-PowerShellExitCode'.",
"VERBOSE: Exporting function 'Start-ChocolateyProcessAsAdmin'.",
"VERBOSE: Exporting function 'Test-ProcessAdminRights'.",
"VERBOSE: Exporting function 'Uninstall-BinFile'.",
"VERBOSE: Exporting function 
'Uninstall-ChocolateyEnvironmentVariable'.",
"VERBOSE: Exporting function 'Uninstall-ChocolateyPackage'.",
"VERBOSE: Exporting function 'Uninstall-ChocolateyZipPackage'.",
"VERBOSE: Exporting function 'Update-SessionEnvironment'.",
"VERBOSE: Exporting function 'Write-ChocolateyFailure'.",
"VERBOSE: Exporting function 'Write-ChocolateySuccess'.",
"VERBOSE: Exporting function 'Write-FileUpdateLog'.",
"VERBOSE: Exporting function 'Write-FunctionCallLogMessage'.",
"VERBOSE: Exporting alias 'Get-ProcessorBits'.",
"VERBOSE: Exporting alias 'Get-OSBitness'.",
"VERBOSE: Exporting alias 'Get-InstallRegistryKey'.",
"VERBOSE: Exporting alias 'Generate-BinFile'.",
"VERBOSE: Exporting alias 'Add-BinFile'.",
"VERBOSE: Exporting alias 'Start-ChocolateyProcess'.",
"VERBOSE: Exporting alias 'Invoke-ChocolateyProcess'.",
"VERBOSE: Exporting alias 'Remove-BinFile'.",
"VERBOSE: Exporting alias 'refreshenv'.",
"VERBOSE: Loading module from path 
'C:\\ProgramData\\chocolatey\\extensions\\chocolatey-core\\chocolatey-core.psm1'.",
"VERBOSE: Exporting function 'Get-UninstallRegistryKey'.",
"VERBOSE: Exporting function 'Get-AppInstallLocation'.",
"VERBOSE: Exporting function 'Get-AvailableDriveLetter'.",
"VERBOSE: Exporting function 'Get-EffectiveProxy'.",
"VERBOSE: Exporting function 'Get-PackageCacheLocation'.",
"VERBOSE: Exporting function 'Get-PackageParameters'.",
"VERBOSE: Exporting function 'Get-WebContent'.",
"VERBOSE: Exporting function 'Register-Application'.",
"VERBOSE: Importing function 'Get-AppInstallLocation'.",
"VERBOSE: Importing function 'Get-AvailableDriveLetter'.",
"VERBOSE: Importing 

Re: [ansible-project] CLI "choco install rsat" works win_chocolatey install rsat fails

2018-05-04 Thread Bob Tanner
I am attempting to re-open 
https://github.com/ansible/ansible/issues/39384#issuecomment-384756704 


--
Bob Tanner   Clash of Clan Tag: #LUJ2CPU
Follow me on Facebook  and Twitter 
!  Clash Royale Tag: #2Q98YPC

-- 
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/741F8D8E-E253-4957-9FEF-316ABCFF03AE%40tanners.org.
For more options, visit https://groups.google.com/d/optout.


signature.asc
Description: Message signed with OpenPGP


[ansible-project] Re: CLI "choco install rsat" works win_chocolatey install rsat fails

2018-05-04 Thread bob
Still having problems installing .msu's with win_chocolatey.

chocolatey_msu:
  - rsat

- name: Install msu (choco)
  win_chocolatey:
name: "{{ item }}"
state: "present"
  when:
- chocolatey_msu is defined
  with_items:
  - "{{ chocolatey_msu }}"
  become: yes
  become_method: runas
  become_user: SYSTEM
  tags: win_chocolatey


TASK [win_chocolatey : Install msu (choco)] 

An exception occurred during task execution. To see the full traceback, use 
-vvv. The error was: + FullyQualifiedErrorId : Win32Exception
failed: [surface02.corp] (item=rsat) => {"changed": false, "item": "rsat", 
"msg": "Exception calling \"RunAsUser\" with \"7\" argument(s): \"LogonUser 
failed (The user name or password is incorrect, Win32ErrorCode 1326)\""}

The full traceback is:
Exception calling "RunAsUser" with "7" argument(s): "LogonUser failed (The 
user name or password is incorrect,
Win32ErrorCode 1326)"
At line:1083 char:9
+ $result = [Ansible.BecomeUtil]::RunAsUser($username, $passwor ...
+ ~
+ CategoryInfo  : NotSpecified: (:) [], 
MethodInvocationException
+ FullyQualifiedErrorId : Win32Exception


failed: [surface02.corp] (item=rsat) => {
"changed": false,
"item": "rsat",
"msg": "Exception calling \"RunAsUser\" with \"7\" argument(s): 
\"LogonUser failed (The user name or password is incorrect, Win32ErrorCode 
1326)\""
}

$ ansible --version
ansible 2.6.0 (devel 1c4448666e) last updated 2018/05/04 12:29:36 (GMT -500)
  config file = None
  configured module search path = 
[u'/Users/tanner/.ansible/plugins/modules', 
u'/usr/share/ansible/plugins/modules']
  ansible python module location = 
/Users/tanner/projects/ansible.git/ansible/lib/ansible
  executable location = 
/Users/tanner/projects/ansible.git/ansible/bin/ansible
  python version = 2.7.10 (default, Feb  7 2017, 00:08:15) [GCC 4.2.1 
Compatible Apple LLVM 8.0.0 (clang-800.0.34)]

-- 
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/3c27325f-be8e-42d3-ab3d-36878f4dd99f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] Re: recommended indent style for tasks

2018-05-04 Thread Varun Chopra
This is:

But later on, in the "Basics" header there's an alternate style, where each 
task item is indented a shift-width deeper then the "task:" keyword.

On Tuesday, May 1, 2018 at 5:07:09 PM UTC+5:30, Josef Fortier wrote:
>
> I'm modifying an EOL vim ansible plugin for my own use and am wondering 
> about indent style. In the Ansible Intro to Playbooks doc ( 
> http://docs.ansible.com/ansible/latest/user_guide/playbooks_intro.html ) 
> there are two separate styles on the same page:
>
> At the start of the doc, each task item has it's leading dash flush with 
> the "task:" keyword indent.
>
> But later on, in the "Basics" header there's an alternate style, where 
> each task item is indented a shift-width deeper then the "task:" keyword.
>
> Both seem to work with python's YAML parser.
>
> The second example appears to be slightly more common. Is there a 
> recommended style?
>
> Is there a more common/consensus style?
>

-- 
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/0bfc61f6-804f-46fe-918a-2307fb12c97c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ansible-project] Apache Karaf Output via Ansible

2018-05-04 Thread Bishwajit Samanta
I resolved the issue.. :)

On Fri 4 May, 2018, 17:24 Bishwajit Samanta, 
wrote:

> Hi Team,
>
> Is there any way to get the output of Karaf through ansible::
>
> If i am executing the below command::-
>
> # echo encrypt-text abcd | ./client ( I am getting the below output )
>
> 1249 [sshd-SshClient[6d78f375]-nio2-thread-2] WARN
> org.apache.sshd.client.keyverifier.AcceptAllServerKeyVerifier - Server at [/
> 0.0.0.0:8101, DSA, 06:33:3e:47:5a:e5:bd:c2:f0:cf:74:22:e9:86:b6:c6]
> presented unverified {} key: {}
> __ __  
>/ //_/ __ _/ __/
>   / ,<  / __ `/ ___/ __ `/ /_
>  / /| |/ /_/ / /  / /_/ / __/
> /_/ |_|\__,_/_/   \__,_/_/
>
>   Apache Karaf (3.0.2)
>
> Hit '' for a list of available commands
> and '[cmd] --help' for help on a specific command.
> Hit 'system:shutdown' to shutdown Karaf.
> Hit '' or type 'logout' to disconnect shell from current session.
>
> admin@root()> encrypt-text abcd
> Encrypted value : DpuQ5swhCfVv0PgBC/z3PA==
> admin@root()>
>
>
> The value i am looking for is DpuQ5swhCfVv0PgBC/z3PA==
>
>
> I am writing my playbook as :-
>
>
> - name: encrypting the password from karaf
>   shell: "echo encrypt-text abcd | ./client"
>   register: password_output
>
> - debug: var=password_output.stdout
>
>
> But it is throwing error, can anyone help me in getting resolved?
>
> --
> 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/b848b9ca-4b32-49ec-b008-9aa7b482a4d6%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/CAPkwwd1LfJnc8AYg%3D4w3zrVT3QUP%3DMEc6VNw0i1VHUU-a1sjwA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] Re: ansible replace with_items prepends the letter 'u'

2018-05-04 Thread expectant . sprite
I'm not sure what I was thinking but this has nothing to do with the 'u' - 
the code is working just as expected since these lines do not yet exist. 
What I needed to use was lineinfile, not replace. Changes highlighted below 
and it's working now.
 

> ---
> - hosts: all
>   gather_facts: False
>   become: True
>   vars:
> text_for_EL6:
>   - { regexp: '^KexAlgorithms', line: 'KexAlgorithms 
> diffie-hellman-group-exchange-sha256' }
>   - { regexp: '^MACs', line: 'MACs hmac-sha2-512,hmac-sha2-256' }
>   - { regexp: '^Ciphers', line: 'Ciphers 
> aes256-ctr,aes192-ctr,aes128-ctr' }
> text_for_EL7:
>   - { regexp: '^KexAlgorithms', line: 'KexAlgorithms 
> curve25519-sha...@libssh.org,ecdh-sha2-nistp521,ecdh-sha2-nistp384,ecdh-sha2-nistp256,diffie-hellman-group-exchange-sha256'
>  
> }
>   - { regexp: '^Ciphers', line: 'Ciphers chacha20-poly1...@openssh.com
> ,aes256-...@openssh.com,aes128-...@openssh.com,aes256-ctr,aes192-ctr,aes128-ctr'
>  
> }
>   - { regexp: '^MACs', line: 'MACs hmac-sha2-512-...@openssh.com,
> hmac-sha2-256-...@openssh.com,umac-128-...@openssh.com
> ,hmac-sha2-512,hmac-sha2-256,umac-...@openssh.com' }
>
>   tasks:
>   - name: check and store ssh version
> shell: rpm -qa openssh
> register: ssh_version_result
>
>   - name: Set ciphers for EL6 - OpenSSL 5.3
> lineinfile:
>   backup: yes
>   path: /etc/ssh/sshd_config
>   regexp: '{{ item.regexp }}'
>   line: '{{ item.line }}'
> when: ssh_version_result.stdout.find('openssh-5') != -1
> with_items:
>   - "{{text_for_EL6}}"
> notify: restart sshd
>
>   - name: Set ciphers for EL7 - OpenSSL > 6.7
> lineinfile:
>   backup: yes
>   path: /etc/ssh/sshd_config
>   regexp: '{{ item.regexp }}'
>   line: '{{ item.line }}'
> when: ssh_version_result.stdout.find('openssh-7') != -1
> with_items:
>   - "{{text_for_EL7}}"
> notify: restart sshd
>
>   handlers:
>   - name: restart sshd
> service: name=sshd state=restarted
> ...
>

-- 
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/62adf586-438e-4543-8776-34253f18eb45%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ansible-project] Extract data from task in a variable

2018-05-04 Thread Kai Stian Olstad

On 04.05.2018 15:06, Uday Medhi wrote:

Hi,
This is a role i wrote which will get the IP addresses of the Hosts and
then copy a file from the ansible server to the host server.

- name: Seeking the host IP address
  shell: |
ifconfig eth0 | grep "inet addr" | cut -d ':' -f 2 | cut -d ' ' -f 
1

  register: ipv4_address
- debug: var=ipv4_address.stdout_lines

- name: Make the copy to CTM agents
  delegate_to: 127.0.0.1
  shell: sshpass -p 'xyz@123456' scp
/home/admin/schoolproject/deploy/Agent_{{ipv4_address.stdout_lines}}.zip
admin@{{ipv4_address.stdout_lines}}:/var/tmp/


You need to use ipv4_address.stdout not ipv4_address.stdout_lines.

By the way, if you gather facts, which is the default, you already have 
the ip in the variable {{ ansible_default_ipv4.address }}


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


Re: [ansible-project] ansible replace with_items prepends the letter 'u'

2018-05-04 Thread Toshio Kuratomi
Is it showing up in your sshd_config file or just in the display of what
each item was?

-Toshio

On Fri, May 4, 2018, 8:55 AM  wrote:

> I'm trying to use the replace module to update SSL ciphers and seem to be
> running into a Unicode issue.
>
> The code:
>
> ---
> - hosts: all
>   gather_facts: False
>   become: True
>   vars:
> text_for_EL6:
>   - { regexp: '^KexAlgorithms', line: 'KexAlgorithms
> diffie-hellman-group-exchange-sha256' }
>   - { regexp: '^MACs', line: 'MACs hmac-sha2-512,hmac-sha2-256' }
>   - { regexp: '^Ciphers', line: 'Ciphers
> aes256-ctr,aes192-ctr,aes128-ctr' }
> text_for_EL7:
>   - { regexp: '^KexAlgorithms', line: 'KexAlgorithms
> curve25519-sha...@libssh.org,ecdh-sha2-nistp521,ecdh-sha2-nistp384,ecdh-sha2-nistp256,diffie-hellman-group-exchange-sha256'
> }
>   - { regexp: '^Ciphers', line: 'Ciphers chacha20-poly1...@openssh.com
> ,aes256-...@openssh.com,aes128-...@openssh.com,aes256-ctr,aes192-ctr,aes128-ctr'
> }
>   - { regexp: '^MACs', line: 'MACs hmac-sha2-512-...@openssh.com,
> hmac-sha2-256-...@openssh.com,umac-128-...@openssh.com
> ,hmac-sha2-512,hmac-sha2-256,umac-...@openssh.com' }
>
>   tasks:
>   - name: check and store ssh version
> shell: rpm -qa openssh
> register: ssh_version_result
>
>   - name: Set ciphers for EL6 - OpenSSL 5.3
> replace:
>   backup: yes
>   path: /etc/ssh/sshd_config
>   regexp: '{{ item.regexp }}'
>   replace: '{{ item.line }}'
> when: ssh_version_result.stdout.find('openssh-5') != -1
> with_items:
>   - "{{text_for_EL6}}"
> notify: restart sshd
>
>   - name: Set ciphers for EL7 - OpenSSL > 6.7
> replace:
>   backup: yes
>   path: /etc/ssh/sshd_config
>   regexp: '{{ item.regexp }}'
>   replace: '{{ item.line }}'
> when: ssh_version_result.stdout.find('openssh-7') != -1
> with_items:
>   - "{{text_for_EL7}}"
> notify: restart sshd
>
>   handlers:
>   - name: restart sshd
> service: name=sshd state=restarted
> ...
>
> The result:
>
> $ ansible-playbook update_sshd_ciphers.yml --limit my_server
> SUDO password:
>
> PLAY [all]
> 
>
> TASK [check ssh versions]
> *
>  [WARNING]: Consider using yum, dnf or zypper module rather than running
> rpm
>
> changed: [my_server]
>
> TASK [Set ciphers for EL6 - OpenSSL 5.3]
> **
> skipping: [my_server] => (item={u'regexp': u'^KexAlgorithms', u'line':
> u'KexAlgorithms diffie-hellman-group-exchange-sha256'})
> skipping: [my_server] => (item={u'regexp': u'^MACs', u'line': u'MACs
> hmac-sha2-512,hmac-sha2-256'})
> skipping: [my_server] => (item={u'regexp': u'^Ciphers', u'line':
> u'Ciphers aes256-ctr,aes192-ctr,aes128-ctr'})
>
> TASK [Set ciphers for EL7 - OpenSSL > 6.7]
> 
> ok: [my_server] => (item={u'regexp': u'^KexAlgorithms', u'line':
> u'KexAlgorithms curve25519-sha...@libssh.org
> ,ecdh-sha2-nistp521,ecdh-sha2-nistp384,ecdh-sha2-nistp256,diffie-hellman-group-exchange-sha256'})
> ok: [my_server] => (item={u'regexp': u'^Ciphers', u'line': u'Ciphers
> chacha20-poly1...@openssh.com,aes256-...@openssh.com,
> aes128-...@openssh.com,aes256-ctr,aes192-ctr,aes128-ctr'})
> ok: [my_server] => (item={u'regexp': u'^MACs', u'line': u'MACs
> hmac-sha2-512-...@openssh.com,hmac-sha2-256-...@openssh.com,
> umac-128-...@openssh.com,hmac-sha2-512,hmac-sha2-256,umac-...@openssh.com
> '})
>
> PLAY RECAP
> 
> my_server  : ok=2changed=1unreachable=0
> failed=0
>
> I am not certain but I think the prepended 'u' is the problem.
>
> --
> 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
> 

[ansible-project] ansible replace with_items prepends the letter 'u'

2018-05-04 Thread expectant . sprite
I'm trying to use the replace module to update SSL ciphers and seem to be 
running into a Unicode issue. 

The code:

---
- hosts: all
  gather_facts: False
  become: True
  vars:
text_for_EL6:
  - { regexp: '^KexAlgorithms', line: 'KexAlgorithms 
diffie-hellman-group-exchange-sha256' }
  - { regexp: '^MACs', line: 'MACs hmac-sha2-512,hmac-sha2-256' }
  - { regexp: '^Ciphers', line: 'Ciphers 
aes256-ctr,aes192-ctr,aes128-ctr' }
text_for_EL7:
  - { regexp: '^KexAlgorithms', line: 'KexAlgorithms 
curve25519-sha...@libssh.org,ecdh-sha2-nistp521,ecdh-sha2-nistp384,ecdh-sha2-nistp256,diffie-hellman-group-exchange-sha256'
 
}
  - { regexp: '^Ciphers', line: 'Ciphers 
chacha20-poly1...@openssh.com,aes256-...@openssh.com,aes128-...@openssh.com,aes256-ctr,aes192-ctr,aes128-ctr'
 
}
  - { regexp: '^MACs', line: 'MACs 
hmac-sha2-512-...@openssh.com,hmac-sha2-256-...@openssh.com,umac-128-...@openssh.com,hmac-sha2-512,hmac-sha2-256,umac-...@openssh.com'
 
}

  tasks:
  - name: check and store ssh version
shell: rpm -qa openssh
register: ssh_version_result

  - name: Set ciphers for EL6 - OpenSSL 5.3
replace:
  backup: yes
  path: /etc/ssh/sshd_config
  regexp: '{{ item.regexp }}'
  replace: '{{ item.line }}'
when: ssh_version_result.stdout.find('openssh-5') != -1
with_items:
  - "{{text_for_EL6}}"
notify: restart sshd

  - name: Set ciphers for EL7 - OpenSSL > 6.7
replace:
  backup: yes
  path: /etc/ssh/sshd_config
  regexp: '{{ item.regexp }}'
  replace: '{{ item.line }}'
when: ssh_version_result.stdout.find('openssh-7') != -1
with_items:
  - "{{text_for_EL7}}"
notify: restart sshd

  handlers:
  - name: restart sshd
service: name=sshd state=restarted
...

The result:

$ ansible-playbook update_sshd_ciphers.yml --limit my_server
SUDO password:

PLAY [all] 


TASK [check ssh versions] 
*
 [WARNING]: Consider using yum, dnf or zypper module rather than running rpm

changed: [my_server]

TASK [Set ciphers for EL6 - OpenSSL 5.3] 
**
skipping: [my_server] => (item={u'regexp': u'^KexAlgorithms', u'line': 
u'KexAlgorithms diffie-hellman-group-exchange-sha256'})
skipping: [my_server] => (item={u'regexp': u'^MACs', u'line': u'MACs 
hmac-sha2-512,hmac-sha2-256'})
skipping: [my_server] => (item={u'regexp': u'^Ciphers', u'line': u'Ciphers 
aes256-ctr,aes192-ctr,aes128-ctr'})

TASK [Set ciphers for EL7 - OpenSSL > 6.7] 

ok: [my_server] => (item={u'regexp': u'^KexAlgorithms', u'line': 
u'KexAlgorithms 
curve25519-sha...@libssh.org,ecdh-sha2-nistp521,ecdh-sha2-nistp384,ecdh-sha2-nistp256,diffie-hellman-group-exchange-sha256'})
ok: [my_server] => (item={u'regexp': u'^Ciphers', u'line': u'Ciphers 
chacha20-poly1...@openssh.com,aes256-...@openssh.com,aes128-...@openssh.com,aes256-ctr,aes192-ctr,aes128-ctr'})
ok: [my_server] => (item={u'regexp': u'^MACs', u'line': u'MACs 
hmac-sha2-512-...@openssh.com,hmac-sha2-256-...@openssh.com,umac-128-...@openssh.com,hmac-sha2-512,hmac-sha2-256,umac-...@openssh.com'})

PLAY RECAP 

my_server  : ok=2changed=1unreachable=0failed=0

I am not certain but I think the prepended 'u' is the problem. 

-- 
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/2cd76763-1ad7-4aed-9143-ade59f9d649c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ansible-project] Re: Why playbook take wrong values for group variables?

2018-05-04 Thread Marcos Alano
Interesting. Could you show us what yours "hosts:" line on playbook.yml?
On Fri, May 4, 2018 at 10:43 AM Brian Coca  wrote:

> The `hosts:` keyword is only used to select which hosts get targeted,
> it has no influence on group membership, any host is ALWAYS a member
> of ALL the groups as defined in inventory, so the variables for a host
> always reflect ALL GROUPS.





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



-- 
Marcos H. Alano
Linux System Administrator
marcoshal...@gmail.com

-- 
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/CAO3Us%3D%3DPodJnVgY5-L_1L4K3x%2BsLznOCHtH6si7k4dfV4-q1gA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] ansible hosts file yaml errors DUO authentication

2018-05-04 Thread Tedley Meralus
 I added a new group in my hosts file in ansible and now when I try to ping 
I get this error. 

$ ansible book01 -m ping

[WARNING]:  * Failed to parse /etc/ansible/hosts with yaml plugin: Syntax 
Error while loading YAML.   The
error appears to have been in '/etc/ansible/hosts': line 55, column 1, but 
may be elsewhere in the file
depending on the exact syntax problem.  The offending line appears to be:  
 [content-management] ^ here
exception type:  exception: did not find 
expectedin
"", line 55, column 1

 [WARNING]:  * Failed to parse /etc/ansible/hosts with ini plugin: 
/etc/ansible/hosts:113: Expected
key=value host variable assignment, got: 10.2.8.124

 [WARNING]: Unable to parse /etc/ansible/hosts as an inventory source

 [WARNING]: No inventory was parsed, only implicit localhost is available

I thought there may have been something wrong with whitespaces involved but 
that doesnt seem to be 
the case and I feel a bit confused now. 

# snippet of playbook 

[ntp-servers]
book01 ansible_host=10.2.8.62
book02 ansible_host=10.2.8.61

[content-management]
cosmo ansible_host=172.16.120.222
phobos ansible_host=172.16.120.209

NOTE: this server is configured to use DUO 2FA authentication. The ansible 
user in duo is set to bypass mode so now authentication prompt will show up 
to interrupt ansibles ping request ( but I could be wrong and that could be 
another issue in itself) 

-- 
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/b8afb26b-d405-42dd-93f7-a86cd3c4efb7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] Extract data from task in a variable

2018-05-04 Thread Uday Medhi
Hi,
This is a role i wrote which will get the IP addresses of the Hosts and 
then copy a file from the ansible server to the host server.

- name: Seeking the host IP address
  shell: |
ifconfig eth0 | grep "inet addr" | cut -d ':' -f 2 | cut -d ' ' -f 1
  register: ipv4_address
- debug: var=ipv4_address.stdout_lines

- name: Make the copy to CTM agents
  delegate_to: 127.0.0.1
  shell: sshpass -p 'xyz@123456' scp 
/home/admin/schoolproject/deploy/Agent_{{ipv4_address.stdout_lines}}.zip 
admin@{{ipv4_address.stdout_lines}}:/var/tmp/


After running it, I am getting the error below.

fatal: [10.200.2.6 -> 127.0.0.1]: FAILED! => {"changed": true, "cmd": 
"sshpass -p 'xyz@123456' scp /home/admin/schoolproject/deploy/
*Agent_[u'10.200.2.6'].zip* admin@*[u'10.200.2.6']*:/var/tmp/", "delta": 
"0:00:00.925109", "end": "2018-05-04 18:16:52.188862", "msg": "non-zero 
return code", "rc": 1, "start": "2018-05-04 18:16:51.263753", "stderr": 
"ssh: Could not resolve hostname u10.200.2.6: Name or service not 
known\r\nlost connection", "stderr_lines": ["ssh: Could not resolve 
hostname u10.200.2.6: Name or service not known", "lost connection"], 
"stdout": "", "stdout_lines": []}


How do I remove the quotes and square bracket *[u' ] *from the variable ?



-- 
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/4b44b6a5-b4be-4351-9805-d5bce92395a1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] Re: Why playbook take wrong values for group variables?

2018-05-04 Thread Олег Боровых
hi Tony,
   i have no files at all:  
 /group_vars/all.yml
 /inventories/group_vars/all.yml
  and i try to put   "hosts: *group_B",  *but it not resole this issue.  
Playbook  apply changes to the servers from right group but, variables  it 
take from neighborhood group_vars/file.  

I have included ANSIBLE_DEBUG , and what i have found:

2018-05-03 15:23:23,663 p=129458 u=user | 129458 1525353803.66336: Loading 
data from /ansible/inventories/prod/group_vars/*group_B.yml* 

2018-05-03 15:23:23,663 p=129458 u=user | 129661 1525353803.66060: in run() 
- task 00505680-eccc-d94e-2b1b-00f4 

2018-05-03 15:23:23,664 p=129458 u=user | 129661 1525353803.66458: calling 
self._execute()

2018-05-03 15:23:23,665 p=129458 u=user | 129458 1525353803.66589: Loading 
data from /ansible/inventories/prod/group_vars/*group_A.yml*

*it is look like on playbook execution ansible scan all files with  
variables in folder group_vars which have variable "var_port", last will 
win.*



вторник, 1 мая 2018 г., 22:35:41 UTC+2 пользователь Tony Chia написал:
>
> Do you have the following files defined?
> /group_vars/group_A.yml
> /group_vars/group_B.yml
> /group_vars/all.yml
> /inventories/group_vars/all.yml
>
> also, maybe try using "hosts: *group_B" in *playbooks/playbook.yml 
> instead of "hosts:*all"*
>
>
> On Sunday, April 29, 2018 at 1:39:59 AM UTC-7, Олег Боровых wrote:
>>
>> Hi,
>> favorite 
>> 
>>
>> I have a problem with groups variables.
>>
>> Example: I have two inventory groups group_A and group_B, and also have 
>> the same name files in group_vars:
>>
>> inventories/ 
>>hosts.inv
>>  [group_A]
>>server1
>>server2
>>  [group_B]
>>server3
>>server4
>>  group_vars/
>>   group_A - file
>> var_port: 9001
>>   group_B - file
>> var_port: 9002 
>>
>> The problem is when i execute playbook :
>>
>>  ansible-playbook  playbooks/playbook.yml -i inventories/hosts.inv -l 
>> *group_B*
>>
>> playbook was executed for proper scope of servers (server3, server4) but 
>> it takes variables from group variables file group_A.
>>
>> expected result:var_port: 9002
>> in realty : var_port: 9001
>>
>> ansible 2.4.2.0
>>
>>  I can't understand what I am doing wrong?
>>
>> BR Oleg
>>
>

-- 
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/7ad3a6fe-2d5e-4d48-8454-056959ff6fae%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] Apache Karaf Output via Ansible

2018-05-04 Thread Bishwajit Samanta
Hi Team,

Is there any way to get the output of Karaf through ansible::

If i am executing the below command::-

# echo encrypt-text abcd | ./client ( I am getting the below output )

1249 [sshd-SshClient[6d78f375]-nio2-thread-2] WARN 
org.apache.sshd.client.keyverifier.AcceptAllServerKeyVerifier - Server at 
[/0.0.0.0:8101, DSA, 06:33:3e:47:5a:e5:bd:c2:f0:cf:74:22:e9:86:b6:c6] 
presented unverified {} key: {}
__ __  
   / //_/ __ _/ __/
  / ,<  / __ `/ ___/ __ `/ /_
 / /| |/ /_/ / /  / /_/ / __/
/_/ |_|\__,_/_/   \__,_/_/

  Apache Karaf (3.0.2)

Hit '' for a list of available commands
and '[cmd] --help' for help on a specific command.
Hit 'system:shutdown' to shutdown Karaf.
Hit '' or type 'logout' to disconnect shell from current session.

admin@root()> encrypt-text abcd
Encrypted value : DpuQ5swhCfVv0PgBC/z3PA==
admin@root()>


The value i am looking for is DpuQ5swhCfVv0PgBC/z3PA==


I am writing my playbook as :-


- name: encrypting the password from karaf 
  shell: "echo encrypt-text abcd | ./client"
  register: password_output

- debug: var=password_output.stdout 


But it is throwing error, can anyone help me in getting resolved?

-- 
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/b848b9ca-4b32-49ec-b008-9aa7b482a4d6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] Re: copying files stuck after 5th attempt

2018-05-04 Thread Jordan Borean
You are right that win_copy isn't very fast due to it running over WinRM 
but this issue has already been identified and fixed in 2.5 
https://github.com/ansible/ansible/pull/37964. If you update to either 
2.5.1 or 2.5.2 the issue will go away.

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/2d1f7cb7-b522-436b-bf26-11628db68a53%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] Re: Infoblox - nios_host_record issue

2018-05-04 Thread ADB101
OK,

Looks likes the way that InfoBlox as been setup and I need to add a "fixed 
address" rather than a host record.

Aidan

On Friday, May 4, 2018 at 10:57:44 AM UTC+1, ADB101 wrote:
>
> Hi all,
>
> I need to get IPs from an Infoblox server from an Ansible playbook. I am 
> successfully obtaining  the next IP address by using the nios_next_ip 
> lookup within the correct IP range. I am then using the "nios_host_record" 
> task to attempt to assign that IP in Infoblox. (Using Ansible 2.5.2)
>
>  - name: Get next available IP
> set_fact:
>  ipaddr: "{{ lookup('nios_next_ip', IPAM_RANGE, provider={'host': 
> 'ipam.mydomain', 'username': 'tower', 'password': 
> ss2_result.TOWER_IPAM|quote }) }}"
> connection: local
>
>   - debug: msg="{{ipaddr[0]}}"
>
>   - name: configure an ipv4 host record
> nios_host_record:
>   name: aidantest.mydomain
>   ipv4:
> - address: "{{ipaddr[0]}}"
>   state: present
>   provider:
> host: "ipam.mydomain"
> username: tower
> password: "{{ss2_result.TOWER_IPAM}}"
> connection: local
>
>
> However, all I am getting back from the task is: 
>
> "Client.Obap.Data.Conflict", "msg": "The action is not allowed. A parent 
> was not found.", "operation": "create_object", "type": "AdmConDataError"
>
> The slight complication is that the Infobox is only used to hold a range 
> of IPs and keep a record of what is allocated, it does not deal with DNS 
> etc (that's in Active Directory). I'm not sure if that has anything to do 
> with the error, but thought best to mention it!
>
> Has anyone got any ideas as to what I am doing wrong? I think I would have 
> to specify the IP range in the nios_host_record call (like I do in the 
> lookup) but I can't see a way..?
>
> Any assistance very much appreciated!
>
> Aidan
>

-- 
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/1fee59b5-cb62-424a-8b09-456c54ad99e8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] Re: copying files stuck after 5th attempt

2018-05-04 Thread Benny L.
Ok, as I read everywhere that winrm is not made for perfomance copy, I 
decided to go with win_get_url module and put the file to copy on the 
webserver. Everything seems pretty smooth and i keep loving ansible and the 
windows modules, even if i used to manage linux servers.

Am Freitag, 4. Mai 2018 11:36:00 UTC+2 schrieb Benny L.:
>
> Hello,
>
> I have following Problem on ansible 2.5.0. I try to copy a folder from my 
> ansible-server(debian) to a windows 10 client using winrm. the playbook 
> itself works pefectly. the problem is, that it has to copy to 20 machines 
> when running the playbook and it stucks after 5th machine. when re-running 
> the playbook the next 5 machines get there files and its stucks afterward. 
>
> the output after the copying from the 5 machines was fine looks like this:
>
> OSError: [Errno 2] No such file or directory: 
> '/root/.ansible/tmp/ansible-local-16474ZG5NC1/tmpbhEdPb'
> fatal: [MACHINE-IP-ADDRESS]: FAILED! => {
> "changed": true,
> "dest": "D:\\DESTPATH",
> "msg": "failed to create tmp zip file: [Errno 2] No such file or 
> directory: '/root/.ansible/tmp/ansible-local-16474ZG5NC1/tmpbhEdPb'",
> "operation": "folder_copy",
> "src": "/SOURCE/PATH/FOLDER"
> }
>
> can anyone help to make this working in one step?
>

-- 
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/ec19db14-1cd3-4600-9350-101d4769acb5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] Infoblox - nios_host_record issue

2018-05-04 Thread ADB101
Hi all,

I need to get IPs from an Infoblox server from an Ansible playbook. I am 
successfully obtaining  the next IP address by using the nios_next_ip 
lookup within the correct IP range. I am then using the "nios_host_record" 
task to attempt to assign that IP in Infoblox. (Using Ansible 2.5.2)

 - name: Get next available IP
set_fact:
 ipaddr: "{{ lookup('nios_next_ip', IPAM_RANGE, provider={'host': 
'ipam.mydomain', 'username': 'tower', 'password': 
ss2_result.TOWER_IPAM|quote }) }}"
connection: local

  - debug: msg="{{ipaddr[0]}}"

  - name: configure an ipv4 host record
nios_host_record:
  name: aidantest.mydomain
  ipv4:
- address: "{{ipaddr[0]}}"
  state: present
  provider:
host: "ipam.mydomain"
username: tower
password: "{{ss2_result.TOWER_IPAM}}"
connection: local


However, all I am getting back from the task is: 

"Client.Obap.Data.Conflict", "msg": "The action is not allowed. A parent 
was not found.", "operation": "create_object", "type": "AdmConDataError"

The slight complication is that the Infobox is only used to hold a range of 
IPs and keep a record of what is allocated, it does not deal with DNS etc 
(that's in Active Directory). I'm not sure if that has anything to do with 
the error, but thought best to mention it!

Has anyone got any ideas as to what I am doing wrong? I think I would have 
to specify the IP range in the nios_host_record call (like I do in the 
lookup) but I can't see a way..?

Any assistance very much appreciated!

Aidan

-- 
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/113f774e-75b1-4d35-81a8-cf180003b07f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] copying files stuck after 5th attempt

2018-05-04 Thread Benny L.
Hello,

I have following Problem on ansible 2.5.0. I try to copy a folder from my 
ansible-server(debian) to a windows 10 client using winrm. the playbook 
itself works pefectly. the problem is, that it has to copy to 20 machines 
when running the playbook and it stucks after 5th machine. when re-running 
the playbook the next 5 machines get there files and its stucks afterward. 

the output after the copying from the 5 machines was fine looks like this:

OSError: [Errno 2] No such file or directory: 
'/root/.ansible/tmp/ansible-local-16474ZG5NC1/tmpbhEdPb'
fatal: [MACHINE-IP-ADDRESS]: FAILED! => {
"changed": true,
"dest": "D:\\DESTPATH",
"msg": "failed to create tmp zip file: [Errno 2] No such file or directory: 
'/root/.ansible/tmp/ansible-local-16474ZG5NC1/tmpbhEdPb'",
"operation": "folder_copy",
"src": "/SOURCE/PATH/FOLDER"
}

can anyone help to make this working in one step?

-- 
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/abcd4f58-a877-424a-a333-1d2b821d6e09%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] ImportError: cannot import name callbacks

2018-05-04 Thread niraj pandey
I am getting the following error while using ansible module in my python 
script.

Traceback (most recent call last):
  File "./ansible_playbook.py", line 2, in 
from ansible import playbook, callbacks
ImportError: cannot import name callbacks


Python version:  2.7.10

Ansible module version 2.5.2 (
https://files.pythonhosted.org/packages/d8/5f/3e7d8243159ba831942b851891d8eeac04615323a91e8447365aa7311299/ansible-2.5.2.tar.gz
)


Thanks
Niraj

-- 
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/e00738dd-6c30-4236-84de-88a98908bc86%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ansible-project] Is there any open source GUI available for Ansible?

2018-05-04 Thread Dinesh Vashisht
Thank you Brian.

On Thu, May 3, 2018 at 6:46 PM, Brian Coca  wrote:

> https://github.com/ansible/awx
>
>
>
>
> --
> --
> Brian Coca
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "Ansible Project" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/
> topic/ansible-project/DplqDhtf5RM/unsubscribe.
> To unsubscribe from this group and all its topics, 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/CACVha7cSC9ps9NHhxkrCWUBS8z0%
> 2BXzY6%2Bb7eaKeHgiOeVzKDcQ%40mail.gmail.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/CACyQV1_3i3rHeeiXENb%3DJNuSZVMq0RP4PoGYGhTRaMCwJsDuBQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.