apigee / henchman

Orchestration and Automation tool
BSD 2-Clause "Simplified" License
109 stars 19 forks source link

When using "include" module, it expects the all the variable defined in library file to be present in the local playbook. #56

Open baskaran-md opened 9 years ago

baskaran-md commented 9 years ago

library/edge.yaml

name: "Prepare Instances for Edge Installation"
sudo: true
vars:
  openjdk: "java-1.7.0-openjdk"
  edge_install_dir: "/opt/apigee"

hosts:
  - mgmt

tasks: 
  - name: Stop iptables
    shell: cmd="service iptables stop"  

  - name: Install openjdk
    yum: name="{{ vars.openjdk }}" state=present

edge-management.yaml

name: "Install Management Server"
sudo: true
vars:
  edge_install_dir: "/opt/apigee"
  profile: "edge-management-server"

hosts:
  - mgmt

tasks: 
  - include: "apigee-edge/edge-gateway.yaml"

Here the openjdk variable is not getting picked when it is defined in library/edge.yaml. It expects the variable to be defined in edge-management.yaml

jlin21 commented 9 years ago

Calling an include in tasks expects the included task.yaml to be in the format of

name: filler
tasks:
   -list
jlin21 commented 9 years ago

@baskaran-md Still need a vars section in included task.yaml s?

baskaran-md commented 9 years ago

this seems a valid request. however i am not blocked of this.