Hi All,

I'm a new (and enthousiast !) user of ansible.
I'm trying to set up an automated way of handling the development 
environments of our team, using Ansible and some publicly available roles, 
in particular https://github.com/geerlingguy/ansible-role-mysql

I'm currently facing a problem that I can't solve, although I digged dozens 
of ressources (including of course the documentation...). I assume that I 
don't take the problem in the right way...

I use facts to define the projects wich need to be set up on the host : 
this file is in /etc/ansible/facts.d/config.fact on the host

{
  "vm_name": "myVM",
  "whoami": "Me",
  "environnementType": "lamp",
  "projects": [
          {
              "project_name": "myProject1",
              "projectType": "sf2"
          },
          {
              "project_name": "myProject2",
              "projectType": "sf1"
          }
      ]
}

And I want to loop other this data to create one database for each project.
The role waits for a variable called mysql_databases, containing a list of 
names.

...I can't achieve in any way to have a "with_items" loop to work : not in 
the "vars" section of my playbook, not in the "roles" section (I get an 
"Item not defined"), and the tasks are executed after the role.

Any help would be greatly appreciated : thank you 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 [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/9dc5937f-d54b-4655-a808-ede975084e7b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to