Re: [ansible-project] How to create multiple folders with loop in ansible

2015-10-03 Thread Igor Cicimov
You have typo here register: dies it shoild be: register: dirs -- 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

Re: [ansible-project] How to create multiple folders with loop in ansible

2015-10-03 Thread Evgen Morokin
As it was described in my previous post ;-), but anyway thanks for the note. On Saturday, October 3, 2015 at 11:25:08 PM UTC-4, Igor Cicimov wrote: > > You have typo here > > register: dies > > it shoild be: > > register: dirs > > -- You received this message because you are subscribed to the

Re: [ansible-project] How to create multiple folders with loop in ansible

2015-10-02 Thread Evgen Morokin
Hello Deborah, Please find screenshot attached with some explanations, hope it will help. Sincerely, Evgen On Friday, October 2, 2015 at 5:53:07 AM UTC-4, DEBORAH

Re: [ansible-project] How to create multiple folders with loop in ansible

2015-10-02 Thread Evgen Morokin
Hello Deborah, Please find screenshot attached with some explanations, hope it will help. Sincerely, Evgen On Friday, October 2, 2015 at 5:53:07 AM UTC-4,

Re: [ansible-project] How to create multiple folders with loop in ansible

2015-10-01 Thread David Karban
Hi Deborah, use with_items: - name: Creating multiple tomcat instance file: dest=/var/lib/tomcat-instance{{ item }} state=directory with_items: - 1 - 2 - 3 Or, maybe better way with_sequence: - name: Creating multiple tomcat instance file: dest=/var/lib/tomcat-instance{{ item

[ansible-project] How to create multiple folders with loop in ansible

2015-10-01 Thread DEBORAH AKUOKO
I am trying to create multiple directories with different names e.g tomacat-1, tomcat-2 etc.. But i want to do this in the form of a loop. Kindly help me with the yaml syntax. this is what i tried - name: Creating multiple tomcat instance file: dest=/var/lib/tomcat-instance{1..3}

Re: [ansible-project] How to create multiple folders with loop in ansible

2015-10-01 Thread DEBORAH AKUOKO
I want it to loop because, assuming i'm creating 1000 instances, it will be inconvenient to do it one by one. So I wish to know how to insert variables which specific the number to create or assign as port. Thanks On Thu, Oct 1, 2015 at 3:47 PM, DEBORAH AKUOKO < ewurama.minka.aku...@gmail.com>

Re: [ansible-project] How to create multiple folders with loop in ansible

2015-10-01 Thread Evgen Morokin
Hi, you can do something like: - name: create dirs file: dest=/tmp/tomcat-instance{{ item }} state=directory with_sequence: start=1 end=3 register: dies - debug: var=dirs.results - name: do something with tomcat shell: echo "sudo tomcat-instance1-create -p {{ 8080 +