Commit 1e9f2d2b by ansible

Start Using Roles in Playbook

1 parent 1d1863f9
---
- hosts: 03_apimanager
become: true
tasks:
- include_role:
name: directory
vars:
app_name: apimanager
- name: Create "API Manager" Folder Structure
file:
path: "{{ item.path }}"
owner: "{{ item.owner }}"
group: "{{ item.owner }}"
state: directory
with_items:
- { owner: root, path: /opt/stack }
\ No newline at end of file
- name: Create "DMA" Folder Structure
file:
path: "{{ item.path }}"
owner: "{{ item.owner }}"
group: "{{ item.owner }}"
state: directory
with_items:
- { owner: root, path: /opt/stack/dma/conf }
- { owner: root, path: /home/chroot/wdftp }
- { owner: root, path: /data }
- { owner: wildfly, path: /upload }
- { owner: wildfly, path: /archive }
- { owner: wildfly, path: /dmaimg }
- { owner: wildfly, path: /dmatmp }
\ No newline at end of file
- name: Create Application Folder Structure based on Application Name
import_tasks: apimanager.yml
when: app_name == 'apimanager'
- import_tasks: dma.yml
when: app_name == 'dma'
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!