I’m attempting to write a role that uses the gluster_volume module. All is well right up until I try to specify an ‘options’ parameter. According to the documentation, I’m to use “a dictionary/hash with options/settings for the volume”. The example given is as follows:
I’ve matched that syntax in my playbook, and all I get is a complaint from Ansible about quoting. I’ve tried just about every variation of quoting I can think of: single, double, double-double, escaped, etc… The closest I (think) have gotten is by specifying the options as a variable, then single-quoting the expansion:
Well, apparently I hadn’t tried everything yet. I was able to get a successful run by including the options parameter in the creation task, rather than keeping them separate. I also had to double-quote the expansion in my playbook, and single-quote the integers in my variable dictionary:
I’m afraid I can’t offer much in the way of advice, Chris. I decided not to continue my oVirt/GlusterFS experiment, and deleted the roles & playbooks I had written. Your syntax certainly seems to match what worked for me. You might want to try it without “folding-style” (>), though. Knowing how cranky the gluster_volume module is about formatting, I wouldn’t be surprised if that’s causing a problem.
Sorry I can’t be of more assistance. Good luck! Let us know when you get it sorted.