Somewhat new to Ansible Roles and I can't sort it out in my head how to do
this.

I have a situation where I need to upgrade 2 target devices from software
code v1 -> v2 and once that is completed on both devices, then upgrade the
devices from from software code v2 -> v3

The role I have is structured like this

    - { role: "init", when: (upgrade_success == true | bool) }
    - { role: "pre-upgrade", when: (upgrade_success == true | bool) }
    - { role: "upgrade", when: (upgrade_success == true | bool) }
    - { role: "post-upgrade", when: (upgrade_success == true | bool) }

I have a variable defined 'ISO_IMAGE_1' that installs the v2 software and
this role completes normally for the upgrade from v1 -> v2

What I would like to do is re-use this same role roles above for upgrading
from v2 -> v3 and when this role is run a 2nd time, I'd like to pass the
variable 'ISO_IMAGE_2'.

2 questions
==============================
1. Should I re-use the same roles above and just have the variable
ISO_IMAGE2 passed to it?
     (if so, how do I pass the ISO_IMAGE2 variable to this to only be used
once the v1->v2 install completes?)

2. Should I make additional roles for the v2->v3 software upgrade?

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CAA92%3DYO7A8p2fqbt__R%3DJZUKHnCup4pjirwUff-5hnB%2BLxdcOQ%40mail.gmail.com.

Reply via email to