Issue 1:
Currently, the meta/main.yml file in roles supports controlling whether duplicate dependencies will be allowed based on the allow_duplicates field at the root level. However, it's possible that some dependencies should not be duplicated, while others within the same file should be.

Implementation: allow_duplicates could remain at the root level, while allow_duplicate could be passed in each dependency block to override the root setting.

Use case: A role to install an application from a git repo depends on nginx and PHP, and so is dependent upon the 'webserver' role. If a server runs more than one application, webserver itself should not be loaded again.

However, another 'application_release' role may be responsible for following a long series of steps to install an application, such as cloning/updating it from git, running make, copying this release into a new folder, symlinking a 'current_release' folder to the new release, deleting old releases, etc. This role is appropriate for application-specific roles to load more than once, with different variables to control the git repo, version, application name, etc.

In the above, one would require the 'webserver' dependency to not be duplicated, but the 'appliaction_release' role be duplicated as often as other roles require it.

Issue 2:
ISSUE TYPE

Bug Report

COMPONENT NAME

aci_ap but I guess similar for other aci_* modules

ANSIBLE VERSION

ansible 2.4.2.0
config file = /home/dhamann/ddsdnlab.at/ansible_aci_buildout/ansible.cfg
configured module search path = [u'/home/dhamann/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
ansible python module location = /usr/local/lib/python2.7/dist-packages/ansible
executable location = /usr/local/bin/ansible
python version = 2.7.12 (default, Nov 20 2017, 18:23:56) [GCC 5.4.0 20160609]

CONFIGURATION

DEFAULT_STDOUT_CALLBACK(/home/dhamann/ddsdnlab.at/ansible_aci_buildout/ansible.cfg) = skippy
RETRY_FILES_ENABLED(/home/dhamann/ddsdnlab.at/ansible_aci_buildout/ansible.cfg) = False

OS / ENVIRONMENT

N/A

SUMMARY

aci_ap module will fail for parameters contianing quotes (double or single)

STEPS TO REPRODUCE

- name: Add Application Network Profile
tags:
- network
- application
- anp
- test
aci_ap:
host: "{{ apic_hostname }}"
username: "{{ apic_username }}"
password: "{{ apic_password }}"
validate_certs: false
ap: legacy
tenant: SDNLAB
description: This ANP contains "legacy" networks
state: present
delegate_to: localhost

EXPECTED RESULTS

Now that I think about it I'm not sure if this is even feasible to fix in Ansible, but since I already started with this bug report, please let me know what you think. It seems to me that APIC does not accept quotes (even properly escaped) in json payload. Should the aci modules therefore remove quotes from strings it passes on to APIC?

ACTUAL RESULTS

fatal: [apic.ddsdnlab.at -> localhost]: FAILED! => {
"changed": false,
"config": {
"fvAp": {
"attributes": {
"descr": "This ANP contains \"legacy\" networks"
}
}
},
"error_code": "801",
"error_text": "property descr of uni/tn-SDNLAB/ap-legacy failed validation for value 'This ANP contains \"legacy\" networks'",
"existing": [
{
"fvAp": {
"attributes": {
"descr": "This ANP contains legacy networks",
"dn": "uni/tn-SDNLAB/ap-legacy",
"name": "legacy",
"nameAlias": "",
"ownerKey": "",
"ownerTag": "",
"prio": "unspecified"
}
}
}
],
"filter_string": "?rsp-prop-include=config-only",
"imdata": [
{
"error": {
"attributes": {
"code": "801",
"text": "property descr of uni/tn-SDNLAB/ap-legacy failed validation for value 'This ANP contains \"legacy\" networks'"
}
}
}
],
"invocation": {
"module_args": {
"ap": "legacy",
"description": "This ANP contains \"legacy\" networks",
"host": "apic.ddsdnlab.at",
"hostname": "apic.ddsdnlab.at",
"method": null,
"password": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER",
"protocol": "https",
"state": "present",
"tenant": "SDNLAB",
"timeout": 30,
"use_proxy": true,
"use_ssl": true,
"username": "apic:Local\\\\ansible",
"validate_certs": false
}
},
"method": "POST",
"msg": "Request failed: 801 property descr of uni/tn-SDNLAB/ap-legacy failed validation for value 'This ANP contains \"legacy\" networks'",
"proposed": {
"fvAp": {
"attributes": {
"descr": "This ANP contains \"legacy\" networks",
"name": "legacy"
}
}
},
"response": "HTTP Error 400: Bad Request",
"status": 400,
"totalCount": "1",
"url": "https://apic.ddsdnlab.at/api/mo/uni/tn-[SDNLAB]/ap-[legacy].json"
}