Hello all, I just discovered ansible recently and I can't seem to find any documentation on accessing data similar to puppet hiera. My project currently builds a vagrant development box using puppet based on a bunch of configuration in yaml.
Here is a sample yaml file: https://github.com/protobox/protobox/blob/master/data/vagrant/common.yaml-dist The goal would be to use a similar yaml file to dynamically install apache, nginx, php, add virtualhosts, etc. With puppet I can use hiera to easily lookup if nginx exists in the config and loop through and run the necessary code. I am kind of at a loss as to how this could possibly work in ansible. Also, some generic pysodocode: if $nginx_yaml['install'] == 1 { $nginx_yaml['virtualhosts'].each |host| { # add virtualhost for each host } } In ansible I checked out loops and conditionals so would it be something like: - name: "install virtualhosts" command: /bin/cp something {{ item.name }} with_items: external_data['virtualhosts'] when: external_data['install'] == 1 Thanks for any advice, I love the thought of using ansible and everything it stands for! -- 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. For more options, visit https://groups.google.com/groups/opt_out.