vars_prompt and playbook includes in our attempt to share "clever" playbooks

Hello all,

In our quest to always trying to better share our playbooks we came up with this structure:

  • common
    /playbooks/
    system_update.yml
    /debian_6.0.7_x86_64/
    system_update.yml
    roles/

    /redhat_5.7_x86_64/

/redhat_5.1_x86_64/

…other playbooks

Here is the content of the first “system_update.yml” :

system_update.yml

here’s what I would do instead.

I’d first start a play that calls group by, then I would move my update logic into roles.

Then you can have simple stuff like:

  • hosts: all
    roles:

  • grouper

  • hosts: CentOS-6
    roles:

  • centos_6_config

  • hosts: CentOS-5
    roles:

  • centos_5_config

And your structure is just the standard roles best practices stuff.

Should be a lot easier IMHO.

Hello Michael,

So much easier that way !! Thanks !

The prompt “bug” still remains though.

What’s the prompt bug?