You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
570 B
20 lines
570 B
5 months ago
|
---
|
||
|
- name: Fetch adhoc playbooks
|
||
|
get_url:
|
||
|
url: "{{ playbook }}"
|
||
|
dest: "{{ '/opt/container_artifact/' + playbook|basename }}"
|
||
|
force: yes
|
||
|
mode: 0666
|
||
|
ignore_errors: yes
|
||
|
register: downloaded_plays
|
||
|
when:
|
||
|
- playbook is match("^(http|https|file)://.*")
|
||
|
|
||
|
- name: Execute playbooks
|
||
|
include_tasks: "{{ lookup('first_found', play_locations) }}"
|
||
|
vars:
|
||
|
play_locations:
|
||
|
- "{{ playbook }}"
|
||
|
- "{% if downloaded_plays.dest is defined %}{{ downloaded_plays.dest }}{% endif %}"
|
||
|
- "{{ config.defaults_dir + '/' + playbook|basename }}"
|