Skip to content

Commit ed55214

Browse files
Merge pull request #43 from ansible-network/bt_prep_for_test_scaffolding
Prep for test scaffolding Reviewed-by: Bradley A. Thornton https://github.com/cidrblock
2 parents a9d79fc + 94a9353 commit ed55214

File tree

19 files changed

+14
-14
lines changed

19 files changed

+14
-14
lines changed

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,21 +21,21 @@ pip install jsonref
2121
```
2222

2323
```
24-
ansible-playbook -e parent=<parent> \
24+
ansible-playbook -e rm_dest=<destination for modules and module utils> \
2525
-e structure=role \
2626
-e model=<model> \
2727
site.yml
2828
```
2929
or
3030
```
31-
ansible-playbook -e parent=<parent> \
31+
ansible-playbook -e rm_dest=<destination for modules and module utils> \
3232
-e structure=collection \
3333
-e collection_org=<collection_org> \
3434
-e collection_name=<collection_name> \
3535
-e model=<model> \
3636
site.yml
3737
```
38-
- `parent`: The parent directory in which the files and directories should be placed
38+
- `rm_dest`: The directory in which the files and directories for the resource module and facts modules should be placed
3939
- `structure`: The directory layout to be generated (role|collection)
4040
- `role`: Generate a role directory layout
4141
- `collection`: Generate a collection directory layout
@@ -55,7 +55,7 @@ See the `models` directory for an example.
5555
- `resource`: interfaces
5656

5757
```
58-
ansible-playbook -e parent=~/github/rm_example \
58+
ansible-playbook -e rm_dest=~/github/rm_example \
5959
-e structure=collection \
6060
-e collection_org=cidrblock \
6161
-e collection_name=my_collection \
@@ -115,7 +115,7 @@ ansible-playbook -e parent=~/github/rm_example \
115115
- `resource`: interfaces
116116

117117
```
118-
ansible-playbook -e parent=~/github/rm_example/roles/my_role \
118+
ansible-playbook -e rm_dest=~/github/rm_example/roles/my_role \
119119
-e structure=role \
120120
-e model=models/myos/interfaces/myos_interfaces.yml \
121121
site.yml
@@ -262,7 +262,7 @@ def main():
262262
The tests rely on a role generated by the resource module builder. After changes to the resource module builder, the role should be regenerated and the tests modified and run as needed. To generate the role after changes:
263263

264264
```
265-
ansible-playbook -e parent=./rmb_tests/roles/my_role \
265+
ansible-playbook -e rm_dest=./rmb_tests/roles/my_role \
266266
-e structure=role \
267267
-e model=models/myos/interfaces/myos_interfaces.yml \
268268
site.yml

roles/init/tasks/main.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
- name: Ensure 'parent' variable is set (see README.md)
1+
- name: Ensure 'rm_dest' variable is set (see README.md)
22
assert:
3-
that: parent is defined
3+
that: rm_dest is defined
44

55
- name: Ensure 'structure' variable is set and one of 'role' or 'collection' (see README.md)
66
assert:
@@ -25,14 +25,14 @@
2525

2626
- name: "Create the {{ structure }} directory structure"
2727
file:
28-
path: "{{ parent }}/{{ item }}"
28+
path: "{{ rm_dest }}/{{ item }}"
2929
state: directory
3030
with_items: "{{ directories[structure] }}"
3131

32-
- name: Copy the license file to the parent directory
32+
- name: Copy the license file to the resource module destination directory
3333
copy:
3434
src: "{{ rm['LICENSE'] | default('gpl-3.0.txt') }}"
35-
dest: "{{ parent }}/LICENSE.txt"
35+
dest: "{{ rm_dest }}/LICENSE.txt"
3636

3737
- name: Ensure the 'collection_org' is set when 'structure' is set to collection
3838
assert:

0 commit comments

Comments
 (0)