Reverse the order of nested templates. (#531)
authorJeff Wong <awole20@gmail.com>
Mon, 5 Apr 2021 16:13:53 +0000 (06:13 -1000)
committerGitHub <noreply@github.com>
Mon, 5 Apr 2021 16:13:53 +0000 (09:13 -0700)
commit0c263ec4ee4ff16a59655490fd18bad4c152de07
treeefdf378984afc6065629c46e2ba6a37af8071d0a
parent8c906824d2919cab06d4e23b671bce3fce15e7a3
Reverse the order of nested templates. (#531)

Reverses the order of nested template declaration.

This way templates that depend nested templates over the same
hook are ensured to run in the proper order.

Ensures consistency of run-order template includes, for both
base yml files, and nested template yml

eg:

base.yml
```
templates:
  - "templates/template1.yml"
hooks:
  after_code:
    - exec: cat "/tmp/file_made_from_template1.yml.txt"
```

template1.yml
```
templates:
  - "templates/template2.yml"
hooks:
  after_code:
    - exec: cat "/tmp/file_made_from_template2.yml.txt"
    - exec: echo "data from template1" > /tmp/file_made_from_template1.yml.txt
```

template2.yml
```
hooks:
  after_code:
    - exec: echo "data from template2" > /tmp/file_made_from_template2.yml.txt
```
launcher