Skip to content

Commit 8d26bda

Browse files
author
Bradley A. Thornton
authored
Merge pull request #1 from ansible-network/bt_change_examples
Change examples from nxos to myos
2 parents a781c67 + db1c114 commit 8d26bda

File tree

3 files changed

+17
-27
lines changed

3 files changed

+17
-27
lines changed

README.md

Lines changed: 14 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -43,27 +43,17 @@ See the `models` directory for an example.
4343

4444
### Examples
4545

46-
**Usage**
47-
```
48-
ansible-playbook -e parent=~/github/foo \
49-
-e structure=collection \
50-
-e collection_org=cidrblock \
51-
-e collection_name=foo \
52-
-e model=models/nxos/interfaces/nxos_interfaces.yml \
53-
site.yml
54-
```
55-
5646
**Collection directory layout**
5747

58-
- `network_os`: nxos
48+
- `network_os`: myos
5949
- `resource`: interfaces
6050

6151
```
6252
ansible-playbook -e parent=~/github/rm_example \
6353
-e structure=collection \
6454
-e collection_org=cidrblock \
6555
-e collection_name=my_collection \
66-
-e model=models/nxos/interfaces/nxos_interfaces.yml \
56+
-e model=models/myos/interfaces/myos_interfaces.yml \
6757
site.yml
6858
```
6959

@@ -76,15 +66,15 @@ ansible-playbook -e parent=~/github/rm_example \
7666
│   ├── inventory
7767
│   ├── modules
7868
│   │   ├── __init__.py
79-
│   │   └── nxos_interfaces.py
69+
│   │   └── myos_interfaces.py
8070
│   └── module_utils
8171
│   ├── __init__.py
8272
│   ├── network
8373
│   │   ├── argspec
8474
│   │   │   ├── base.py
8575
│   │   │   └── __init__.py
8676
│   │   └── __init__.py
87-
│   └── nxos
77+
│   └── myos
8878
│   ├── argspec
8979
│   │   ├── facts
9080
│   │   │   ├── facts.py
@@ -115,13 +105,13 @@ ansible-playbook -e parent=~/github/rm_example \
115105
```
116106
**Role directory layout**
117107

118-
- `network_os`: nxos
108+
- `network_os`: myos
119109
- `resource`: interfaces
120110

121111
```
122112
ansible-playbook -e parent=~/github/rm_example/roles/my_role \
123113
-e structure=role \
124-
-e model=models/nxos/interfaces/nxos_interfaces.yml \
114+
-e model=models/myos/interfaces/myos_interfaces.yml \
125115
site.yml
126116
```
127117

@@ -130,15 +120,15 @@ ansible-playbook -e parent=~/github/rm_example/roles/my_role \
130120
└── my_role
131121
├── library
132122
│   ├── __init__.py
133-
│   └── nxos_interfaces.py
123+
│   └── myos_interfaces.py
134124
└── module_utils
135125
├── __init__.py
136126
├── network
137127
│   ├── argspec
138128
│   │   ├── base.py
139129
│   │   └── __init__.py
140130
│   └── __init__.py
141-
└── nxos
131+
└── myos
142132
├── argspec
143133
│   ├── facts
144134
│   │   ├── facts.py
@@ -168,7 +158,7 @@ ansible-playbook -e parent=~/github/rm_example/roles/my_role \
168158

169159
**Using the collection layout**
170160

171-
Note: As of 3/25/2019, the following PR needs to be used:
161+
Note: As of 3/26/2019, the following PR needs to be used:
172162
```
173163
git clone [email protected]:ansible/ansible.git
174164
cd ansible
@@ -184,23 +174,23 @@ ln -s ~/github/rm_example ~/.ansible/collections/ansible_collections/cidrblock/m
184174

185175
`site.yml`
186176
```
187-
- hosts: eos101
177+
- hosts: myos101
188178
gather_facts: False
189179
tasks:
190-
- cidrblock.my_collection.nxos_interfaces:
180+
- cidrblock.my_collection.myos_interfaces:
191181
```
192182

193183
**Using the role layout**
194184

195185
`site.yml`
196186
```
197-
- hosts: eos101
187+
- hosts: myos101
198188
gather_facts: False
199189
roles:
200190
- my_role
201191
202-
- hosts: eos101
192+
- hosts: myos101
203193
gather_facts: False
204194
tasks:
205-
- nxos_interfaces:
195+
- myos_interfaces:
206196
```

models/nxos/interfaces/nxos_interfaces.yml renamed to models/myos/interfaces/myos_interfaces.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,17 @@ metadata:
44
status:
55
- preview
66
supported_by:
7-
- network
7+
- '<support_group>'
88
info:
9-
network_os: nxos
9+
network_os: myos
1010
resource: interfaces
1111
version_added: 2.8
1212
short_description: 'Manages <xxxx> attributes of <network_os> <resource>.'
1313
description:
1414
- Manages <xxxx> attributes of <network_os> <resource>.
1515
authors:
1616
- Ansible Network Engineer
17-
extends_documentation_fragment: ios
17+
extends_documentation_fragment: myos
1818
notes:
1919
- Tested against <network_os> <version>
2020

0 commit comments

Comments
 (0)