1.. Document meta
2
3:orphan:
4
5.. Anchors
6
7.. _ansible_collections.inspur.sm.edit_vlan_module:
8
9.. Anchors: short name for ansible.builtin
10
11.. Anchors: aliases
12
13
14
15.. Title
16
17inspur.sm.edit_vlan -- Set vlan information.
18++++++++++++++++++++++++++++++++++++++++++++
19
20.. Collection note
21
22.. note::
23    This plugin is part of the `inspur.sm collection <https://galaxy.ansible.com/inspur/sm>`_.
24
25    To install it use: :code:`ansible-galaxy collection install inspur.sm`.
26
27    To use it in a playbook, specify: :code:`inspur.sm.edit_vlan`.
28
29.. version_added
30
31.. versionadded:: 0.1.0 of inspur.sm
32
33.. contents::
34   :local:
35   :depth: 1
36
37.. Deprecated
38
39
40Synopsis
41--------
42
43.. Description
44
45- Set vlan information on Inspur server.
46
47.. Aliases
48
49
50.. Requirements
51
52
53.. Options
54
55Parameters
56----------
57
58.. raw:: html
59
60    <table  border=0 cellpadding=0 class="documentation-table">
61        <tr>
62            <th colspan="2">Parameter</th>
63            <th>Choices/<font color="blue">Defaults</font></th>
64                        <th width="100%">Comments</th>
65        </tr>
66                    <tr>
67                                                                <td colspan="2">
68                    <div class="ansibleOptionAnchor" id="parameter-host"></div>
69                    <b>host</b>
70                    <a class="ansibleOptionLink" href="#parameter-host" title="Permalink to this option"></a>
71                    <div style="font-size: small">
72                        <span style="color: purple">string</span>
73                                                                    </div>
74                                                        </td>
75                                <td>
76                                                                                                                                                            </td>
77                                                                <td>
78                                            <div>Specifies the DNS host name or address for connecting to the remote device over the specified transport.  The value of host is used as the destination address for the transport.</div>
79                                                        </td>
80            </tr>
81                                <tr>
82                                                                <td colspan="2">
83                    <div class="ansibleOptionAnchor" id="parameter-interface_name"></div>
84                    <b>interface_name</b>
85                    <a class="ansibleOptionLink" href="#parameter-interface_name" title="Permalink to this option"></a>
86                    <div style="font-size: small">
87                        <span style="color: purple">string</span>
88                                                 / <span style="color: red">required</span>                    </div>
89                                                        </td>
90                                <td>
91                                                                                                                            <ul style="margin: 0; padding: 0"><b>Choices:</b>
92                                                                                                                                                                <li>eth0</li>
93                                                                                                                                                                                                <li>eth1</li>
94                                                                                                                                                                                                <li>bond0</li>
95                                                                                    </ul>
96                                                                            </td>
97                                                                <td>
98                                            <div>Set interface_name.</div>
99                                                        </td>
100            </tr>
101                                <tr>
102                                                                <td colspan="2">
103                    <div class="ansibleOptionAnchor" id="parameter-password"></div>
104                    <b>password</b>
105                    <a class="ansibleOptionLink" href="#parameter-password" title="Permalink to this option"></a>
106                    <div style="font-size: small">
107                        <span style="color: purple">string</span>
108                                                                    </div>
109                                                        </td>
110                                <td>
111                                                                                                                                                            </td>
112                                                                <td>
113                                            <div>Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_PASSWORD</code> will be used instead.</div>
114                                                        </td>
115            </tr>
116                                <tr>
117                                                                <td colspan="2">
118                    <div class="ansibleOptionAnchor" id="parameter-provider"></div>
119                    <b>provider</b>
120                    <a class="ansibleOptionLink" href="#parameter-provider" title="Permalink to this option"></a>
121                    <div style="font-size: small">
122                        <span style="color: purple">dictionary</span>
123                                                                    </div>
124                                                        </td>
125                                <td>
126                                                                                                                                                            </td>
127                                                                <td>
128                                            <div>A dict object containing connection details.</div>
129                                                        </td>
130            </tr>
131                                        <tr>
132                                                    <td class="elbow-placeholder"></td>
133                                                <td colspan="1">
134                    <div class="ansibleOptionAnchor" id="parameter-provider/host"></div>
135                    <b>host</b>
136                    <a class="ansibleOptionLink" href="#parameter-provider/host" title="Permalink to this option"></a>
137                    <div style="font-size: small">
138                        <span style="color: purple">string</span>
139                                                                    </div>
140                                                        </td>
141                                <td>
142                                                                                                                                                            </td>
143                                                                <td>
144                                            <div>Specifies the DNS host name or address for connecting to the remote device over the specified transport.  The value of host is used as the destination address for the transport.</div>
145                                                        </td>
146            </tr>
147                                <tr>
148                                                    <td class="elbow-placeholder"></td>
149                                                <td colspan="1">
150                    <div class="ansibleOptionAnchor" id="parameter-provider/password"></div>
151                    <b>password</b>
152                    <a class="ansibleOptionLink" href="#parameter-provider/password" title="Permalink to this option"></a>
153                    <div style="font-size: small">
154                        <span style="color: purple">string</span>
155                                                                    </div>
156                                                        </td>
157                                <td>
158                                                                                                                                                            </td>
159                                                                <td>
160                                            <div>Specifies the password to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_PASSWORD</code> will be used instead.</div>
161                                                        </td>
162            </tr>
163                                <tr>
164                                                    <td class="elbow-placeholder"></td>
165                                                <td colspan="1">
166                    <div class="ansibleOptionAnchor" id="parameter-provider/username"></div>
167                    <b>username</b>
168                    <a class="ansibleOptionLink" href="#parameter-provider/username" title="Permalink to this option"></a>
169                    <div style="font-size: small">
170                        <span style="color: purple">string</span>
171                                                                    </div>
172                                                        </td>
173                                <td>
174                                                                                                                                                            </td>
175                                                                <td>
176                                            <div>Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_USERNAME</code> will be used instead.</div>
177                                                        </td>
178            </tr>
179
180                                <tr>
181                                                                <td colspan="2">
182                    <div class="ansibleOptionAnchor" id="parameter-username"></div>
183                    <b>username</b>
184                    <a class="ansibleOptionLink" href="#parameter-username" title="Permalink to this option"></a>
185                    <div style="font-size: small">
186                        <span style="color: purple">string</span>
187                                                                    </div>
188                                                        </td>
189                                <td>
190                                                                                                                                                            </td>
191                                                                <td>
192                                            <div>Configures the username to use to authenticate the connection to the remote device. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_USERNAME</code> will be used instead.</div>
193                                                        </td>
194            </tr>
195                                <tr>
196                                                                <td colspan="2">
197                    <div class="ansibleOptionAnchor" id="parameter-vlan_id"></div>
198                    <b>vlan_id</b>
199                    <a class="ansibleOptionLink" href="#parameter-vlan_id" title="Permalink to this option"></a>
200                    <div style="font-size: small">
201                        <span style="color: purple">integer</span>
202                                                                    </div>
203                                                        </td>
204                                <td>
205                                                                                                                                                            </td>
206                                                                <td>
207                                            <div>The Identification for VLAN configuration(2-4094).</div>
208                                                        </td>
209            </tr>
210                                <tr>
211                                                                <td colspan="2">
212                    <div class="ansibleOptionAnchor" id="parameter-vlan_priority"></div>
213                    <b>vlan_priority</b>
214                    <a class="ansibleOptionLink" href="#parameter-vlan_priority" title="Permalink to this option"></a>
215                    <div style="font-size: small">
216                        <span style="color: purple">integer</span>
217                                                                    </div>
218                                                        </td>
219                                <td>
220                                                                                                                                                            </td>
221                                                                <td>
222                                            <div>The priority for VLAN configuration(1-7).</div>
223                                                        </td>
224            </tr>
225                                <tr>
226                                                                <td colspan="2">
227                    <div class="ansibleOptionAnchor" id="parameter-vlan_status"></div>
228                    <b>vlan_status</b>
229                    <a class="ansibleOptionLink" href="#parameter-vlan_status" title="Permalink to this option"></a>
230                    <div style="font-size: small">
231                        <span style="color: purple">string</span>
232                                                                    </div>
233                                                        </td>
234                                <td>
235                                                                                                                            <ul style="margin: 0; padding: 0"><b>Choices:</b>
236                                                                                                                                                                <li>enable</li>
237                                                                                                                                                                                                <li>disable</li>
238                                                                                    </ul>
239                                                                            </td>
240                                                                <td>
241                                            <div>Enable or disable vlan.</div>
242                                                        </td>
243            </tr>
244                        </table>
245    <br/>
246
247.. Notes
248
249
250.. Seealso
251
252
253.. Examples
254
255Examples
256--------
257
258.. code-block:: yaml+jinja
259
260
261    - name: Vlan test
262      hosts: ism
263      connection: local
264      gather_facts: no
265      vars:
266        ism:
267          host: "{{ ansible_ssh_host }}"
268          username: "{{ username }}"
269          password: "{{ password }}"
270
271      tasks:
272
273      - name: "Set vlan information"
274        inspur.sm.edit_vlan:
275          interface_name: "eth0"
276          vlan_status: "disable"
277          provider: "{{ ism }}"
278
279      - name: "Set vlan information"
280        inspur.sm.edit_vlan:
281          interface_name: "eth0"
282          vlan_status: "enable"
283          vlan_id: 2
284          vlan_priority: 1
285          provider: "{{ ism }}"
286
287
288
289
290.. Facts
291
292
293.. Return values
294
295Return Values
296-------------
297Common return values are documented :ref:`here <common_return_values>`, the following are the fields unique to this module:
298
299.. raw:: html
300
301    <table border=0 cellpadding=0 class="documentation-table">
302        <tr>
303            <th colspan="1">Key</th>
304            <th>Returned</th>
305            <th width="100%">Description</th>
306        </tr>
307                    <tr>
308                                <td colspan="1">
309                    <div class="ansibleOptionAnchor" id="return-changed"></div>
310                    <b>changed</b>
311                    <a class="ansibleOptionLink" href="#return-changed" title="Permalink to this return value"></a>
312                    <div style="font-size: small">
313                      <span style="color: purple">boolean</span>
314                                          </div>
315                                    </td>
316                <td>always</td>
317                <td>
318                                            <div>Check to see if a change was made on the device.</div>
319                                        <br/>
320                                    </td>
321            </tr>
322                                <tr>
323                                <td colspan="1">
324                    <div class="ansibleOptionAnchor" id="return-message"></div>
325                    <b>message</b>
326                    <a class="ansibleOptionLink" href="#return-message" title="Permalink to this return value"></a>
327                    <div style="font-size: small">
328                      <span style="color: purple">string</span>
329                                          </div>
330                                    </td>
331                <td>always</td>
332                <td>
333                                            <div>Messages returned after module execution.</div>
334                                        <br/>
335                                    </td>
336            </tr>
337                                <tr>
338                                <td colspan="1">
339                    <div class="ansibleOptionAnchor" id="return-state"></div>
340                    <b>state</b>
341                    <a class="ansibleOptionLink" href="#return-state" title="Permalink to this return value"></a>
342                    <div style="font-size: small">
343                      <span style="color: purple">string</span>
344                                          </div>
345                                    </td>
346                <td>always</td>
347                <td>
348                                            <div>Status after module execution.</div>
349                                        <br/>
350                                    </td>
351            </tr>
352                        </table>
353    <br/><br/>
354
355..  Status (Presently only deprecated)
356
357
358.. Authors
359
360Authors
361~~~~~~~
362
363- WangBaoshan (@ISIB-group)
364
365
366
367.. Parsing errors
368
369