f5devcentral / ansible-role-f5_atc_deploy_declaration

Ansible role used to deploy declaratives to F5 Automated Tool Chain services: AS3, DO, and TS
Apache License 2.0
7 stars 11 forks source link

import_role does not work when used on multiple declarations #14

Open codygreen opened 4 years ago

codygreen commented 4 years ago

when leveraging tags in Ansible I need to use import_role so the tags propagate through the role. However, when you use import_role only the first declaration of atc_declaration_files is used for all subsequent calls. Example below of a subsequent call where the atc_declaration_file is still using the value from the first call (not show).


`- name: Prepare the AS3 Juice Shop application declaration from the template template: src: "{{ role_path }}/templates/{{ as3_juiceshop_template }}" dest: "{{ tmp_dir }}/{{ as3_juiceshop_declaration }}"


TASK [ltm : set AS3 Juice Shop Destination] **** task path: /home/azureuser/HCA/CM/roles/ltm/tasks/configure-big-ip.yml:89 ok: [hcademo-bigip-0-a3c3_fe76] => { "ansible_facts": { "as3_juice_shop": "/home/azureuser/HCA/CM/roles/ltm/files/tmp/as3-juiceshop-declaration.json" }, "changed": false } Read vars_file 'vault.yml'

TASK [ltm : debug] ***** task path: /home/azureuser/HCA/CM/roles/ltm/tasks/configure-big-ip.yml:93 ok: [hcademo-bigip-0-a3c3_fe76] => { "as3_juice_shop": "/home/azureuser/HCA/CM/roles/ltm/files/tmp/as3-juiceshop-declaration.json" } Read vars_file 'vault.yml'

TASK [f5devcentral.atc_deploy : Setup provider and varables] *** task path: /home/azureuser/HCA/CM/roles/f5devcentral.atc_deploy/tasks/main.yaml:3 ok: [hcademo-bigip-0-a3c3_fe76] => { "ansible_facts": { "atc_declaration_file": "/home/azureuser/HCA/CM/roles/ltm/files/tmp/as3-common-declaration.json", "atc_show": "base", "atc_show_hash": false, "atc_tenant": "", "provider": { "password": "xxxxxxxxxx", "server": "xxxxxxxxx", "server_port": 443, "user": "admin", "validate_certs": false } }, "changed": false }`