Issue 1:
Issue Type: Feature Idea

Ansible Version: 1.6.2

Environment: Ubuntu 12.04

Summary:

I would like the ability to have a dependent role's status re-evaluated each time it is called. That way, if a dependent role is called multiple times (e.g by different dependent roles), it won't get skipped.

Steps To Reproduce:

When developing a set of roles for apache, I've run into this issue:

https://groups.google.com/forum/#!topic/Ansible-project/xcjUnfFKK6A

The basic setup of these roles is 4 different roles for apache:

apache2 - this is the base role that contains the apache2 config, installs and configures apache

apache2-php - this role adds mod_php, php.ini, etc

apache2-ssl - this role adds an SSL certificate and forces all traffic to SSL

apache2-all - includes all of the above

This is nice because some servers only need a subset of this functionality, so I can just include the appropriate features as needed. I've bundled these together using role dependencies, e.g apache2-php/meta/main.yml contains the following:

dependencies:
- { role: apache2 }

This is nice because then I need to only maintain the apache template file in a single location, inside of the apache2 role, and just set variables in the other roles if I want to add/change content on it.

This works well, except that in order for the variables to be overridden and included together at the correct point, I have this situation in the apache2-ssl meta/main.yml files:

dependencies:
- { role: apache2-php, when: include_php == True }
- { role: apache2, when: include_php == False }

I would like to be able to add a variable that allows resetting the dependent role's status, e.g

dependencies:
- { role: apache2-php, when: include_php == True }
- { role: apache2, reset_dependents: True, when: include_php == False }

Expected Results:

The problem is that if include_php == False, then the first role dependency (apache2-php), is skipped. What seems to be happening is it recursively marks everything in the apache2 role as skipped as well, including the handler I use to reload apache after updating the config. Then, when it arrives at the second role dependency (apache2), it skips executing any of the handlers in the apache2 role even if they are NOTIFIED because they were marked as skipped previously.

Would it be possible to add a variable that would reset a role so that whether or not it should be skipped is evaluated each time it is called (similar to the existing allow_duplicates variable)?

Actual Results:

The apache2 handler that reloads the apache config is skipped (when called via the apache2 depedent role above), even if there are changes because it was already marked as skipped by the dependent apache2-php call (which was skipped).

Issue 2:
ISSUE TYPE

Feature Idea

COMPONENT NAME

vmware

ANSIBLE VERSION

ansible 2.5.0 (devel 466e1b289b) last updated 2018/01/26 10:22:19 (GMT +200)

SUMMARY

There is currently a module called vmware_resource_pool to create a new VMware resource pool. A VM can subsequently be assigned to the newly created resource pool by using the resource_pool option of the vmware_guest module.

It is also possible to assign a VM to a "VM and Template" folder using the folder option of the vmware_guest module. There appears however to be no way to also create such a "VM and Template" folder using the Ansible VMware cloud modules. This means that this is a manual step that has to be performed using the VMware user interface or needs to be automated through some other means.

I propose adding a new module called vmware_vm_folder in order to create a new "VM and Template" folder so that this can also be automated before placing a number of VMs inside the newly created folder using a playbook.