Skip to content

Variable: include

Misat11 edited this page May 9, 2020 · 4 revisions

include

This variable link other file to place where is it.

Yaml:

- include: [loader]:[variable with data]@<file>
# Example usage
- include: yml:[email protected] 
- include: :[email protected]
- include: shop.yml
- include: [email protected]
# Short variant:
- @shop.yml
- @shop.csv
- @yml:[email protected]

You don't have to specify loader but when you have another extension than is normal you need it.

Note that you can't do this:

- include: file
  stack: STONE # this will be ignored

You must do this:

- include: file
- stack: STONE # stack can't have same hyphen as definition

Groovy:

inventory {
  // include '[loader]:[variable with data]@<file>'
  // Example usage
  include 'yml:[email protected]'
  item('...') {
    include ':[email protected]'
  }
  include 'shop.yml'
  include '[email protected]'
}
Clone this wiki locally