[ansible-project] Re: Processing sleeps as long as the SSH timeout is

2015-09-23 Thread tma0286
Fixed with this 
commit: 
https://github.com/ansible/ansible/commit/2898e000a0b993d5c4445c04c713f6f857ea88e1
 

>
>  

-- 
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/53e90026-bb26-4e42-9e10-4197320ee8ef%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ansible-project] Delegation of plays

2015-09-23 Thread Tony Yarusso
Sounds like we'll need to a) rework our inventory a bit, and b) wait
for v2.0 for that to work, but could be an option.

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


[ansible-project] How to iterate over nested lists with lineinfile?

2015-09-23 Thread Joanna Delaporte
I am trying to build a hash of users from a csv file. I am stuck on this 
last step, where the playbook just hangs:

   - name: print user details into hash
 lineinfile: 'dest=~csit-ansible/files/auto_students.yml
 line="{{ item }}"
 state=present'
 with_items:
  - "  username: {{ item[0] }}"
  - "firstname: {{ item[1] }}"
  - "lastname: {{ item[2] }}"
  - "studentid: {{ item[3] }}"
  - "dob: {{ item[4] }}"
 with_nested:
  - "{{ usernames.stdout_lines }}"
  - "{{ firstnames.stdout_lines }}"
  - "{{ lastnames.stdout_lines }}"
  - "{{ studentids.stdout_lines }}"
  - "{{ dobs.stdout_lines }}"


Earlier in the playbook, I register the values like so:
   - name: print all usernames to stdout
 shell: awk -F ':' '{print $1}' ~csit-ansible/files/sortedu${date}.csv
 register: usernames

   - name: print all firstnames to stdout
 shell: awk -F ':' '{print $2}' ~csit-ansible/files/sortedu${date}.csv
 register: firstnames

   - name: print all lastnames to stdout
 shell: awk -F ':' '{print $3}' ~csit-ansible/files/sortedu${date}.csv
 register: lastnames

   - name: print all studentids to stdout
 shell: awk -F ':' '{print $4}' ~csit-ansible/files/sortedu${date}.csv
 register: studentids

   - name: print all dobs to stdout
 shell: awk -F ':' '{print $5}' ~csit-ansible/files/sortedu${date}.csv
 register: dobs

-- 
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/86472bd9-5936-4acd-a744-19a309faac35%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] Error while building docker image

2015-09-23 Thread Darvin Denmian
Hi guys,

I'm facing a weird problem when trying to build a docker image,
this is the basic workflow:

1) I successfully build a docker image called "accounts-skeleton"

...
- name: "Accounts: building Accounts Skeleton image"
  docker_image:
path: /tmp/
name: accounts-skeleton
tag: latest
state: present
  tags:
- containers
- accounts-skeleton

# docker images
REPOSITORY  TAG IMAGE IDCREATED
VIRTUAL SIZE
accounts-skeleton   latest  c227713a63402 hours ago
790.9 MB

2) and then I try to create a second image using the image
"accounts-skeleton",
as follows:

...
- name: "Accounts: building Accounts Base image"
  docker_image:
path: /home/accounts/current/
name: accounts-base
tag: latest
state: present
  when: deploy is defined
  tags:
- containers
- accounts-base

but when I execute the playbook the following error message appears:

TASK: [accounts | Accounts: building Accounts Base image]
*
failed: [192.168.1.170] => {"changed": true, "failed": true, "image_id":
null}
msg: Error: Error: image library/accounts-skeleton:latest not found
Log:Step 0 : FROM accounts-skeleton

Do you guys have some idea of what is going on?

Thanks in advance.

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ansible-project+unsubscr...@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CAKz6g-15r1aaiYZOeC80hAhr0z1qNWYu9R6V6PeJ2wUv7FyS_g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ansible-project] Delegation of plays

2015-09-23 Thread Brian Coca
it seems you should be able to still run directly by using each
ansible host as a jumphost. If not, ansible-pull might be a better
option here.


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


Re: [ansible-project] how to install pip2.7 packages with ansible.

2015-09-23 Thread Brian Coca
use the executable option of the module to specify the pip2.7 over the
default pip.

On Wed, Sep 23, 2015 at 1:40 PM, Roy  wrote:
> Hi,
>
>We have Centos 6.5 with python2.6 as default and python2.7 also on it.
>
> So how do we install python packages for pip2.7 ?
>
> There is no module name pip2.7 in ansible.
>
> any help here ?
>
> --
> 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/2ebbb141-4c1a-426d-9215-b3b601dcab9f%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.



-- 
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/CAJ5XC8kWArM3b-7300Nqu7F2%2B8Lw8AE%2BwkM0fnjCOf1NO-9uog%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] how to install pip2.7 packages with ansible.

2015-09-23 Thread Roy
Hi,

   We have Centos 6.5 with python2.6 as default and python2.7 also on it.
 
So how do we install python packages for pip2.7 ?

There is no module name pip2.7 in ansible.

any help here ?

-- 
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/2ebbb141-4c1a-426d-9215-b3b601dcab9f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ansible-project] Howto Trigger an action based on the result of a previous action and pull in data from a dictionary

2015-09-23 Thread Brian Coca
It might be easier to just run:

- getent: database=passwd

and then make the users conditional on:

-  user: name=item.value.name state=present  ...
   when: item.value.name in getent_passwd


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


[ansible-project] Re: windows winrm environment does not allow some kinds of execution

2015-09-23 Thread Ben Cohen
It's here if you want to take a look ...  I'll try and make any changes
needed ...

https://github.com/ansible/ansible-modules-extras/pull/1007

On Tuesday, September 22, 2015, J Hawkesworth <
j.r.hawkeswo...@googlemail.com> wrote:

> Thank you. Looking forward to seeing your PR.
>
> Jon
>
> --
> 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/1af89200-fce7-4d52-b51d-ba56584c7e3a%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/CABUBibtsPYh9yh14af11UzriGTTATUfO3seg0n7G_sO7PT0w%3DA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ansible-project] {"failed": true} msg: Failed to lock apt for exclusive operation FATAL: all hosts have already failed -- aborting

2015-09-23 Thread Brian Coca
unless you are running as root I would expect this error, you might
want to uncomment #sudo: True


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


[ansible-project] {"failed": true} msg: Failed to lock apt for exclusive operation FATAL: all hosts have already failed -- aborting

2015-09-23 Thread DEBORAH AKUOKO
I get the error   ({"failed": true} msg: Failed to lock apt for exclusive 
operationFATAL: all hosts have already failed -- aborting)

as specified in the subject each time i run my playbook. 

But i can successfully ssh into the remote host 


this is the content of my playbook

- hosts: 172.30.0.12
  roles:
  - java
  - tomcat
#  sudo: True
  vars:
tomcat_version: 7
java_version: 7
tomcat_jmxremote_enable: true
tomcat_jmxremote_port: 10003

Kindly help me figure this 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/75d25c24-1cf2-454d-a9ca-2b89b3620974%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] GCE module: How to tranfer public key to newly created instance?

2015-09-23 Thread Gert


I just started using Ansible with the GCE module.

I can create a new GCE instance (test-host-01) just fine, but when I add a play 
to configure a role (a galaxy role I imported to install oracle java) I get an 
error:

GATHERING FACTS *** 
fatal: [test-host-01] => SSH Error: Permission denied (publickey).
while connecting to 10.240.6.208:22
It is sometimes useful to re-run the command using -, which prints SSH 
debug output to help diagnose the issue.

I am running ansible as user "ansible" and I guess that my SSH public key is 
not transferred to the newly created instance, but I have no idea how to do 
that from the playbook, and cannot find any documentation on this.

Any suggestions welcome.

Here is my playbook (which is based on the example at 
http://docs.ansible.com/ansible/gce_module.html#examples

_

- name: Create new test host
  hosts: localhost
  connection: local
  gather_facts: no

  vars:
service_account_email: 
141243166259-frlfsl1h4gg713q1chbqe323ld5no...@developer.gserviceaccount.com
pem_file: /home/user/.ssh/ansible-gce.pem
project_id: my-project-id
machine_type: f1-micro
image: ubuntu-1404-trusty-v20150909a
zone: europe-west1-b
diskSizeGb: 40

  tasks:

   - name: Create disk
 gce_pd:
 size_gb: 40
 name: test-host-01
 zone: "{{ zone }}"
 image: "{{ image }}"
 mode: READ_WRITE
 service_account_email: "{{ service_account_email }}"
 pem_file: "{{ pem_file }}"
 project_id: "{{ project_id }}"
   - name: Create and launch instance
 gce:
 instance_names: test-host-01
 machine_type: "{{ machine_type }}"
 zone: "{{ zone }}"
 service_account_email: "{{ service_account_email }}"
 pem_file: "{{ pem_file }}"
 project_id: "{{ project_id }}"
 disks: test-host-01
 register: gce
   - name: Waiting for port 22 to become available
 local_action: wait_for host=test-host-01 port=22 delay=10 timeout=60 
state=started
 with_items: "{{gce.instance_data}}"
 sudo: false

- name: Configure instance
  hosts: test-host-01
  sudo: true
  roles:
- ansiblebit.oracle-java

-- 
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/b2ac6719-e05f-40f9-b517-a3e82b8447aa%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] replacing ini content

2015-09-23 Thread Chris Edwards

I need to save a section from an ini file , copy a new version of the ini 
file and then replace the values.

for example








*[config]option1=value1option2=value2option3=value3[locations]location1=uklocation2=us*

save the config section, copy new ini file resulting in








*[config]option4=value4option5=value5option6=value6[locations]location1=francelocation2=china*

then replacing the config section with the original, ending up with








*[config]option1=value1option2=value2option3=value3[locations]location1=francelocation2=china*

-- 
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/d726f3e3-a35f-4ac2-ba88-1f755f86b1a8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] Sharing variable in action plugin

2015-09-23 Thread Ian Bytchek
I have a custom action plugin that launches a bunch of ec2 instances that 
receive custom user data. Within that data there is dynamic value that is 
unique per task but the same for all hosts inside that task. I can generate 
that value inside the action plugin for the first host, but can't figure 
out how to pass it to other hosts. I can save the value into a static 
variable, but then it would be the same for other tasks. I tried saving the 
value into inject and inject['hostvars'] but it gets lost between runs.

I came across this issue a few times before and it would be awesome if 
someone can explain how to properly handle global dynamic variables in 
plugins or else how? The general use case is generating configuration that 
is shared across all hosts in the task. Cheers.

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ansible-project+unsubscr...@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/16a48784-5cae-4168-84e2-dbed0e809736%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] Ansible connect to Windows instance through proxy

2015-09-23 Thread dnx101
Hello,

I'm using Amazon AWS to run instances. Both machines (linux and windows) 
can only reach internet through proxy and are on the same VPC. I can ping 
from one instance to another. Allowed all the traffic between these 
instances.
Used setup from
http://docs.ansible.com/ansible/intro_windows.html and fixes from 
https://github.com/ansible/ansible/issues/10294
Set the proxy for ansible playbook, set vars for group (ansible_ssh_user: 
Administrator, ansible_ssh_pass: SecretPasswordGoesHere, ansible_ssh_port: 
5986, ansible_connection: winrm), etc.

But can not get through error:

ESTABLISH WINRM CONNECTION FOR USER: Administrator on PORT 5986 TO xxx
WINRM CONNECT: transport=plaintext endpoint=https://xxx:5986/wsman
WINRM CONNECTION ERROR: 500 WinRMTransport. Tunnel connection failed: 403 
Forbidden
fatal: [xxx] => 500 WinRMTransport. Tunnel connection failed: 403 Forbidden

But I am able to successfully connect to windows instances when using 
public IP on instances, full access to the internet and no proxies... but 
it's not an option.

Can anyone suggest what I can be missing?

P.S. Using same settings (private ip, proxy, etc.) I have not problem 
running Ansible playbooks on other linux instances.

-- 
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/00969e84-a561-4906-8c1a-a5085b1c0efe%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] Howto Trigger an action based on the result of a previous action and pull in data from a dictionary

2015-09-23 Thread chris scott
Ok the scenario is I want to reset a users password on a system, but only 
if the user already exists. I cant find anyway to do this with existing 
modules, so I have reverted to a playbook. I'm not sure if my approach is 
fundamentally wrong but i can't get it to work at the moment.  


I use this sample dictionary. The accounts dont exist on the remote test 
system, so the idea is the adduser task doesn't trigger. However if it did 
it would giving me the desired password reset.

# cat .userlist.yml
grps:
  crabtree: {}
  crabtree2: {}
  ut: {}
  uts: {}
  utsb: {}
users:
  crabtree:
comment: ''
group: crabtree
groups: crabtree,ut,uts,utsb
name: crabtree
password: 
$6$XaPMGsKF$1PThCIJDfpCbnWn/AB1uCox06k9ircsFJ8LFrCl1510E3toGJNmCye88PoEKLpxTrnpibKiGHsh0ff11apUWJ/
  crabtree2:
comment: ''
group: crabtree2
groups: crabtree2,ut,uts,utsb
name: crabtree2
password: 
$6$2CMAcCiX$v2sFL5VKJ/HTVoRsGPpOju1/gJXQxjiC55CLVcngspUyLs3X2hWpdIF1igMrBECDo9OdU.vnvtNdG/MJzD1tH0


The following doesnt work as the variable structure doesnt really help


# cat //usr/local/scripts/ansible/playbooks/reset_password2.yml
---
- hosts: all
  gather_facts: no
  vars_files:
  - ~/.userlist.yml

  tasks:
  - name: Is user on this system?
action: shell grep ^{{ item.value.name }} /etc/passwd
register: R_they
with_dict: users
changed_when: "R_they.rc == 0"
failed_when: "R_they.rc > 255"

  - name: Reset Password
action: user name={{ item.value.name }} state=present 
password={{item.value.password}} update_password=always 
comment="{{item.value.comment}}"
with_dict: users
when: R_they.{{ item.value.name }}.rc == 0


#


looking at it the other way around and cycling through the results is fine 
and I can match fine and I get the skips when the account doesnt exist. 
What I cant figure yet is how to pull the data from the dictionary in the 
action statement as I cant use the with_dict option at the same time as 
looping the results


  - name: Reset Password
#  
   action: user name=users['item.item.key']['name'] state=present 
password=users['item.item.key']['password']  update_password=always 
comment=users['item.item.key']['comment']

# 
with_items: R_they.results
when: item.rc == 0


Can anyone give me any pointers please?

-- 
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/0839891e-54a7-4219-a83d-b36504c2b988%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] Processing sleeps as long as the SSH timeout is

2015-09-23 Thread tma0286
I am not sure if this is a bug or an incompatibility.

Part1:
user@host:/sw> time ansible - targetServer01 -m ping
Using /sw/ansible/ansible.cfg as config file
Loaded callback minimal of type stdout, v2.0
 ESTABLISH SSH CONNECTION FOR USER: user
 SSH: EXEC ssh -C -vvv -o ControlMaster=auto -o 
ControlPersist=60s -o StrictHostKeyChecking=no -o 
KbdInteractiveAuthentication=no -o 
PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey 
-o PasswordAuthentication=no -o ConnectTimeout=30 -o 
ControlPath=/tmp/ansible-ssh-%h-%p-%r -tt targetServer01 (umask 22 && mkdir 
-p "$HOME/.ansible/tmp/ansible-tmp-1443023667.7-245295646620754" && echo 
"$HOME/.ansible/tmp/ansible-tmp-1443023667.7-245295646620754")


Part2:
 PUT /tmp/tmpjOMTij TO 
/home/user/.ansible/tmp/ansible-tmp-1443023667.7-245295646620754/ping
 SSH: EXEC scp -vvv -o ControlMaster=auto -o 
ControlPersist=60s -o StrictHostKeyChecking=no -o 
KbdInteractiveAuthentication=no -o 
PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey 
-o PasswordAuthentication=no -o ConnectTimeout=30 -o 
ControlPath=/tmp/ansible-ssh-%h-%p-%r /tmp/tmpjOMTij 
[targetServer01]:/home/user/.ansible/tmp/ansible-tmp-1443023667.7-245295646620754/ping
 ESTABLISH SSH CONNECTION FOR USER: user
 SSH: EXEC ssh -C -vvv -o ControlMaster=auto -o 
ControlPersist=60s -o StrictHostKeyChecking=no -o 
KbdInteractiveAuthentication=no -o 
PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey 
-o PasswordAuthentication=no -o ConnectTimeout=30 -o 
ControlPath=/tmp/ansible-ssh-%h-%p-%r -tt targetServer01 LANG=C 
LC_MESSAGES=C LC_CTYPE=C /usr/bin/python 
/home/user/.ansible/tmp/ansible-tmp-1443023667.7-245295646620754/ping; rm 
-rf "/home/user/.ansible/tmp/ansible-tmp-1443023667.7-245295646620754/" > 
/dev/null 2>&1
targetServer01 | SUCCESS => {
"changed": false,
"ping": "pong"
}

real0m30.808s
user0m0.508s
sys 0m0.172s


Between Part1 and Part2 the processing stucks for the length of my SSH 
timeout.

I am using a git checkout from yesterday.

Any ideas?

-- 
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/20fab000-e7fc-4fc8-b814-15eb50773c4e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] Re: Traceback with ansible: AttributeError: 'module' object has no attribute '_vendor'

2015-09-23 Thread tma0286
This is fixed as hacking/env-setup or python setup.py egg_info was executed.

-- 
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/ca4bba3c-cc8e-4f85-a309-bea3d24a2ff2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ansible-project] Ansible Playbook Fact gathering fails on one Node

2015-09-23 Thread Dominik Bessler
I'm using version 1.9.2.

-- 
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/aaad50b8-160b-48a6-8d10-9e95e66922d9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] whether there is an analogue set_facts but keeping the difference between the plays

2015-09-23 Thread Алексей Гаврилов
whether there is an analogue set_facts but keeping the difference between 
the plays
register creates a structure, and I would be quite variable.

for what it is to me.
I have in the performance of the play there is a lot of roles with the same 
addictions and these are carried out according to several times resulting 
in no effective implementation of the play.

Using variables I want to make the role of roles executed once for all the 
play.

example

---
- hosts: mail_srv 
  remote_user: an
  sudo: yes

  roles:
- le9i0nx.base
- le9i0nx.zram
- le9i0nx.hp.dl320
- debops.users
- debops.console
- debops.ntp
- debops.sshd
- debops.secret
- debops.mysql
- le9i0nx.ssl_key
- le9i0nx.postfixadmin
- le9i0nx.roundcube
- le9i0nx.mailweb
- le9i0nx.dovecot

ansible/roles/debops.mysql/meta/main.yml
---
dependencies:
  - role: debops.secret
  - role: debops.ferm
ferm_input_list:
  - type: 'dport_accept'
dport: [ 'mysql' ]
saddr: '{{ mysql_mysqld_allow }}'
weight: '50'
filename: 'mysql_dependency_accept'
  - role: debops.tcpwrappers
tcpwrappers_allow:
  - daemon: 'mysqld'
client: '{{ mysql_mysqld_allow }}'
weight: '50'
filename: 'mysql_dependency_allow'
comment: 'Allow remote connections to MySQL server'

ansible/roles/le9i0nx.dovecot/meta/main.yml
---
dependencies:
  - role: debops.secret
  - role: debops.rsyslog
rsyslog_pools: [ '{{ rsyslog_pool_dovecot }}' ]
rsyslog_pool_dovecot:
enabled: True
name: '01-dovecot'
options: |
$template DynFileErr,
"/var/log/%HOSTNAME%/%programname%/%$YEAR%.%$MONTH%.%$DAY%.err"
if $programname == "dovecot" and $syslogfacility-text == "mail" 
and $syslogseverity-text == "err" then ?DynFileErr
& stop
  
$template DynFile,
"/var/log/%HOSTNAME%/%programname%/%$YEAR%.%$MONTH%.%$DAY%.log"
if $programname == "dovecot" then ?DynFile
& stop

  - role: debops.ferm
ferm_input_list:
  - type: 'dport_accept'
dport: [ 'pop3', 'pop3s','imap2','imaps','sieve' ]
accept_any: True
filename: 'dovecot_dependency_accept'
weight: '20'

-- 
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/7f611b89-0e76-47c8-bae2-66e934a03693%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] workaround to using a variable list of vars with include

2015-09-23 Thread Javeria Khan
Hi everyone,

I need to include a playbook which is essentially contains a set of 
inititalization tasks for any set of variables passed to it. Like so:


   1. - include: upstart_common_init.yml
   2.   vars:
   3. program_name: "{{ item.service_name }}"
   4. program_config_options: "--config-file /etc/xyz/{{
item.service_conf }}"
   5. system_user: "{{ system_user_name }}"
   6. system_group: "{{ system_group_name }}"
   7. service_home: "{{ system_home_folder }}"
   8.   with_items: some_services
   9.   when: >
   10. inventory_hostname in groups[item.service_group] and
   11. item.service_en == true
   12.   tags:
   13. - upstart-init
   
Where the some_services is a dictionary of services:

some_services:

 - { service_name: abc, service_en: True, service_conf: abc.ini, 
service_group: abc_group }

 - { service_name: def,  service_en: True, service_conf: def.ini, 
service_group: def_group }

I know *with_items* isn't supported with *include* so i get:


   1. ERROR: [DEPRECATED]: include + with_items is a removed deprecated 
   feature, Please update your playbooks.
   

 What would be a reasonable way to implement the above block of code?

Thanks,
J

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ansible-project+unsubscr...@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/9e1ee2a6-cd05-4957-9ed6-12980e7d350e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] managing jenkins jobs?

2015-09-23 Thread Dick Davies
Hi all

been googling to no avail - I want to manage Jenkins with
Ansible, and have the basics for the master here:

 https://github.com/rasputnik/ansible-jenkins

Next step is to configure some plugins and global config;
this seems like it'd be a pretty common use case but although
some plugins have a separate config file, the majority of them
add stanzas to the main config.xml.

I can't see much to help me with managing 'fragments' of XML rather
than lineinfile (shudder). Has anyone had any success with this approach?

-- 
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/CAK5eLPThfEkzp%2BBkzH2fRNE-T6%2Bb53rkC5fypuAGAHH%2BqZiXJw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ansible-project] python project deployment & version

2015-09-23 Thread ProfHase
It would usually, but for the copy task as well as for the `install myapp` 
task i need to pass the filename to the pip module. setuptools always 
generates the filename as {{ package }}-{{ version }}.tar.gz

(Sorry for the late answer, had some troubles with google)

Am Donnerstag, 10. September 2015 16:54:32 UTC+2 schrieb Brian Coca:
>
> does state=latest not work? 
>
>
> -- 
> 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/1b373d5a-b33e-46ab-abea-5fdc881c8c60%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] Re: Setting fact name dynamically in set_fact?

2015-09-23 Thread Vikas Kumar
Hello Frank,

This 

 
is not exactly what do you want, but certainly can give you some pointers.

Regards,
Vikas

On Wednesday, 23 September 2015 10:07:54 UTC+10, Frank Perks wrote:
>
> Any ideas? This is really blocking me. 
>
> On Monday, September 21, 2015 at 7:49:13 PM UTC-4, Frank Perks wrote:
>>
>> I am trying to shrink ~30+ roles into a single role to drastically reduce 
>> the amount of duplicate and copy and pasted code into a single nice and 
>> neat role. One of the problems is each role sets a specifically named fact 
>> basically like: 
>>
>> ec2__foo
>>
>> What i want to do is this:
>>
>> set_fact:
>>   "{{ some var }}" : "{{ some value }}"
>>
>> The problem is that i can't seem to figure out how to do this. Now i know 
>> i could simply on the playbook task, copy the value into its corresponding 
>> var through set_fact. However a lot of the roles are run one after another, 
>> so that doesn't really work.
>>
>> I was thinking i could just setup redis and push the fact there 
>> temporarily, however that seems like a lot of work. 
>>
>

-- 
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/a2c0436e-457d-4de1-a7f1-fcb759e006ee%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] Re: Setting fact name dynamically in set_fact?

2015-09-23 Thread George Boobyer
This might provide some inspiration, where a vars file is templated and 
then included allowing dynamic variable names and values.
I think it would be 'more elegant' to build up an in memory YAML/JSON  as 
opposed to creating a file - but haven't got a good example - so hope this 
helps! and it may prompt some 'better' suggestions! ; )
https://groups.google.com/d/msg/ansible-project/X1Q93QOk6Ew/ZygP5rXmfEkJ

On Tuesday, September 22, 2015 at 12:49:13 AM UTC+1, Frank Perks wrote:
>
> I am trying to shrink ~30+ roles into a single role to drastically reduce 
> the amount of duplicate and copy and pasted code into a single nice and 
> neat role. One of the problems is each role sets a specifically named fact 
> basically like: 
>
> ec2__foo
>
> What i want to do is this:
>
> set_fact:
>   "{{ some var }}" : "{{ some value }}"
>
> The problem is that i can't seem to figure out how to do this. Now i know 
> i could simply on the playbook task, copy the value into its corresponding 
> var through set_fact. However a lot of the roles are run one after another, 
> so that doesn't really work.
>
> I was thinking i could just setup redis and push the fact there 
> temporarily, however that seems like a lot of work. 
>

-- 
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/8a852100-dd44-423d-b77b-c41ca30bb1a2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.