1.. _arista.eos.eos_l3_interface_module:
2
3
4***************************
5arista.eos.eos_l3_interface
6***************************
7
8**(deprecated, removed after 2022-06-01) Manage L3 interfaces on Arista EOS network devices.**
9
10
11Version added: 1.0.0
12
13.. contents::
14   :local:
15   :depth: 1
16
17DEPRECATED
18----------
19:Removed in collection release after 2022-06-01
20:Why: Updated modules released with more functionality
21:Alternative: eos_l3_interfaces
22
23
24
25Synopsis
26--------
27- This module provides declarative management of L3 interfaces on Arista EOS network devices.
28
29
30
31
32Parameters
33----------
34
35.. raw:: html
36
37    <table  border=0 cellpadding=0 class="documentation-table">
38        <tr>
39            <th colspan="2">Parameter</th>
40            <th>Choices/<font color="blue">Defaults</font></th>
41            <th width="100%">Comments</th>
42        </tr>
43            <tr>
44                <td colspan="2">
45                    <div class="ansibleOptionAnchor" id="parameter-"></div>
46                    <b>aggregate</b>
47                    <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
48                    <div style="font-size: small">
49                        <span style="color: purple">list</span>
50                         / <span style="color: purple">elements=dictionary</span>
51                    </div>
52                </td>
53                <td>
54                </td>
55                <td>
56                        <div>List of L3 interfaces definitions. Each of the entry in aggregate list should define name of interface <code>name</code> and a optional <code>ipv4</code> or <code>ipv6</code> address.</div>
57                </td>
58            </tr>
59                                <tr>
60                    <td class="elbow-placeholder"></td>
61                <td colspan="1">
62                    <div class="ansibleOptionAnchor" id="parameter-"></div>
63                    <b>ipv4</b>
64                    <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
65                    <div style="font-size: small">
66                        <span style="color: purple">string</span>
67                    </div>
68                </td>
69                <td>
70                </td>
71                <td>
72                        <div>IPv4 address to be set for the L3 interface mentioned in <em>name</em> option. The address format is &lt;ipv4 address&gt;/&lt;mask&gt;, the mask is number in range 0-32 eg. 192.168.0.1/24</div>
73                </td>
74            </tr>
75            <tr>
76                    <td class="elbow-placeholder"></td>
77                <td colspan="1">
78                    <div class="ansibleOptionAnchor" id="parameter-"></div>
79                    <b>ipv6</b>
80                    <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
81                    <div style="font-size: small">
82                        <span style="color: purple">string</span>
83                    </div>
84                </td>
85                <td>
86                </td>
87                <td>
88                        <div>IPv6 address to be set for the L3 interface mentioned in <em>name</em> option. The address format is &lt;ipv6 address&gt;/&lt;mask&gt;, the mask is number in range 0-128 eg. fd5d:12c9:2201:1::1/64</div>
89                </td>
90            </tr>
91            <tr>
92                    <td class="elbow-placeholder"></td>
93                <td colspan="1">
94                    <div class="ansibleOptionAnchor" id="parameter-"></div>
95                    <b>name</b>
96                    <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
97                    <div style="font-size: small">
98                        <span style="color: purple">string</span>
99                         / <span style="color: red">required</span>
100                    </div>
101                </td>
102                <td>
103                </td>
104                <td>
105                        <div>Name of the L3 interface to be configured eg. ethernet1</div>
106                </td>
107            </tr>
108            <tr>
109                    <td class="elbow-placeholder"></td>
110                <td colspan="1">
111                    <div class="ansibleOptionAnchor" id="parameter-"></div>
112                    <b>state</b>
113                    <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
114                    <div style="font-size: small">
115                        <span style="color: purple">string</span>
116                    </div>
117                </td>
118                <td>
119                        <ul style="margin: 0; padding: 0"><b>Choices:</b>
120                                    <li>present</li>
121                                    <li>absent</li>
122                        </ul>
123                </td>
124                <td>
125                        <div>State of the L3 interface configuration. It indicates if the configuration should be present or absent on remote device.</div>
126                </td>
127            </tr>
128
129            <tr>
130                <td colspan="2">
131                    <div class="ansibleOptionAnchor" id="parameter-"></div>
132                    <b>ipv4</b>
133                    <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
134                    <div style="font-size: small">
135                        <span style="color: purple">string</span>
136                    </div>
137                </td>
138                <td>
139                </td>
140                <td>
141                        <div>IPv4 address to be set for the L3 interface mentioned in <em>name</em> option. The address format is &lt;ipv4 address&gt;/&lt;mask&gt;, the mask is number in range 0-32 eg. 192.168.0.1/24</div>
142                </td>
143            </tr>
144            <tr>
145                <td colspan="2">
146                    <div class="ansibleOptionAnchor" id="parameter-"></div>
147                    <b>ipv6</b>
148                    <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
149                    <div style="font-size: small">
150                        <span style="color: purple">string</span>
151                    </div>
152                </td>
153                <td>
154                </td>
155                <td>
156                        <div>IPv6 address to be set for the L3 interface mentioned in <em>name</em> option. The address format is &lt;ipv6 address&gt;/&lt;mask&gt;, the mask is number in range 0-128 eg. fd5d:12c9:2201:1::1/64</div>
157                </td>
158            </tr>
159            <tr>
160                <td colspan="2">
161                    <div class="ansibleOptionAnchor" id="parameter-"></div>
162                    <b>name</b>
163                    <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
164                    <div style="font-size: small">
165                        <span style="color: purple">string</span>
166                    </div>
167                </td>
168                <td>
169                </td>
170                <td>
171                        <div>Name of the L3 interface to be configured eg. ethernet1</div>
172                </td>
173            </tr>
174            <tr>
175                <td colspan="2">
176                    <div class="ansibleOptionAnchor" id="parameter-"></div>
177                    <b>provider</b>
178                    <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
179                    <div style="font-size: small">
180                        <span style="color: purple">dictionary</span>
181                    </div>
182                </td>
183                <td>
184                </td>
185                <td>
186                        <div><b>Deprecated</b></div>
187                        <div>Starting with Ansible 2.5 we recommend using <code>connection: network_cli</code>.</div>
188                        <div>Starting with Ansible 2.6 we recommend using <code>connection: httpapi</code> for eAPI.</div>
189                        <div>This option will be removed in a release after 2022-06-01.</div>
190                        <div>For more information please see the <a href='../network/user_guide/platform_eos.html'>EOS Platform Options guide</a>.</div>
191                        <div><hr/></div>
192                        <div>A dict object containing connection details.</div>
193                </td>
194            </tr>
195                                <tr>
196                    <td class="elbow-placeholder"></td>
197                <td colspan="1">
198                    <div class="ansibleOptionAnchor" id="parameter-"></div>
199                    <b>auth_pass</b>
200                    <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
201                    <div style="font-size: small">
202                        <span style="color: purple">string</span>
203                    </div>
204                </td>
205                <td>
206                </td>
207                <td>
208                        <div>Specifies the password to use if required to enter privileged mode on the remote device.  If <em>authorize</em> is false, then this argument does nothing. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_AUTH_PASS</code> will be used instead.</div>
209                </td>
210            </tr>
211            <tr>
212                    <td class="elbow-placeholder"></td>
213                <td colspan="1">
214                    <div class="ansibleOptionAnchor" id="parameter-"></div>
215                    <b>authorize</b>
216                    <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
217                    <div style="font-size: small">
218                        <span style="color: purple">boolean</span>
219                    </div>
220                </td>
221                <td>
222                        <ul style="margin: 0; padding: 0"><b>Choices:</b>
223                                    <li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
224                                    <li>yes</li>
225                        </ul>
226                </td>
227                <td>
228                        <div>Instructs the module to enter privileged mode on the remote device before sending any commands.  If not specified, the device will attempt to execute all commands in non-privileged mode. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_AUTHORIZE</code> will be used instead.</div>
229                </td>
230            </tr>
231            <tr>
232                    <td class="elbow-placeholder"></td>
233                <td colspan="1">
234                    <div class="ansibleOptionAnchor" id="parameter-"></div>
235                    <b>host</b>
236                    <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
237                    <div style="font-size: small">
238                        <span style="color: purple">string</span>
239                    </div>
240                </td>
241                <td>
242                </td>
243                <td>
244                        <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>
245                </td>
246            </tr>
247            <tr>
248                    <td class="elbow-placeholder"></td>
249                <td colspan="1">
250                    <div class="ansibleOptionAnchor" id="parameter-"></div>
251                    <b>password</b>
252                    <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
253                    <div style="font-size: small">
254                        <span style="color: purple">string</span>
255                    </div>
256                </td>
257                <td>
258                </td>
259                <td>
260                        <div>Specifies the password to use to authenticate the connection to the remote device.  This is a common argument used for either <em>cli</em> or <em>eapi</em> transports. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_PASSWORD</code> will be used instead.</div>
261                </td>
262            </tr>
263            <tr>
264                    <td class="elbow-placeholder"></td>
265                <td colspan="1">
266                    <div class="ansibleOptionAnchor" id="parameter-"></div>
267                    <b>port</b>
268                    <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
269                    <div style="font-size: small">
270                        <span style="color: purple">integer</span>
271                    </div>
272                </td>
273                <td>
274                        <b>Default:</b><br/><div style="color: blue">0</div>
275                </td>
276                <td>
277                        <div>Specifies the port to use when building the connection to the remote device.  This value applies to either <em>cli</em> or <em>eapi</em>.</div>
278                        <div>The port value will default to the appropriate transport common port if none is provided in the task (cli=22, http=80, https=443).</div>
279                </td>
280            </tr>
281            <tr>
282                    <td class="elbow-placeholder"></td>
283                <td colspan="1">
284                    <div class="ansibleOptionAnchor" id="parameter-"></div>
285                    <b>ssh_keyfile</b>
286                    <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
287                    <div style="font-size: small">
288                        <span style="color: purple">path</span>
289                    </div>
290                </td>
291                <td>
292                </td>
293                <td>
294                        <div>Specifies the SSH keyfile to use to authenticate the connection to the remote device.  This argument is only used for <em>cli</em> transports. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_SSH_KEYFILE</code> will be used instead.</div>
295                </td>
296            </tr>
297            <tr>
298                    <td class="elbow-placeholder"></td>
299                <td colspan="1">
300                    <div class="ansibleOptionAnchor" id="parameter-"></div>
301                    <b>timeout</b>
302                    <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
303                    <div style="font-size: small">
304                        <span style="color: purple">integer</span>
305                    </div>
306                </td>
307                <td>
308                </td>
309                <td>
310                        <div>Specifies the timeout in seconds for communicating with the network device for either connecting or sending commands.  If the timeout is exceeded before the operation is completed, the module will error.</div>
311                </td>
312            </tr>
313            <tr>
314                    <td class="elbow-placeholder"></td>
315                <td colspan="1">
316                    <div class="ansibleOptionAnchor" id="parameter-"></div>
317                    <b>transport</b>
318                    <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
319                    <div style="font-size: small">
320                        <span style="color: purple">string</span>
321                    </div>
322                </td>
323                <td>
324                        <ul style="margin: 0; padding: 0"><b>Choices:</b>
325                                    <li><div style="color: blue"><b>cli</b>&nbsp;&larr;</div></li>
326                                    <li>eapi</li>
327                        </ul>
328                </td>
329                <td>
330                        <div>Configures the transport connection to use when connecting to the remote device.</div>
331                </td>
332            </tr>
333            <tr>
334                    <td class="elbow-placeholder"></td>
335                <td colspan="1">
336                    <div class="ansibleOptionAnchor" id="parameter-"></div>
337                    <b>use_proxy</b>
338                    <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
339                    <div style="font-size: small">
340                        <span style="color: purple">boolean</span>
341                    </div>
342                </td>
343                <td>
344                        <ul style="margin: 0; padding: 0"><b>Choices:</b>
345                                    <li>no</li>
346                                    <li><div style="color: blue"><b>yes</b>&nbsp;&larr;</div></li>
347                        </ul>
348                </td>
349                <td>
350                        <div>If <code>no</code>, the environment variables <code>http_proxy</code> and <code>https_proxy</code> will be ignored.</div>
351                </td>
352            </tr>
353            <tr>
354                    <td class="elbow-placeholder"></td>
355                <td colspan="1">
356                    <div class="ansibleOptionAnchor" id="parameter-"></div>
357                    <b>use_ssl</b>
358                    <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
359                    <div style="font-size: small">
360                        <span style="color: purple">boolean</span>
361                    </div>
362                </td>
363                <td>
364                        <ul style="margin: 0; padding: 0"><b>Choices:</b>
365                                    <li>no</li>
366                                    <li><div style="color: blue"><b>yes</b>&nbsp;&larr;</div></li>
367                        </ul>
368                </td>
369                <td>
370                        <div>Configures the <em>transport</em> to use SSL if set to <code>yes</code> only when the <code>transport=eapi</code>.  If the transport argument is not eapi, this value is ignored.</div>
371                </td>
372            </tr>
373            <tr>
374                    <td class="elbow-placeholder"></td>
375                <td colspan="1">
376                    <div class="ansibleOptionAnchor" id="parameter-"></div>
377                    <b>username</b>
378                    <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
379                    <div style="font-size: small">
380                        <span style="color: purple">string</span>
381                    </div>
382                </td>
383                <td>
384                </td>
385                <td>
386                        <div>Configures the username to use to authenticate the connection to the remote device.  This value is used to authenticate either the CLI login or the eAPI authentication depending on which transport is used. If the value is not specified in the task, the value of environment variable <code>ANSIBLE_NET_USERNAME</code> will be used instead.</div>
387                </td>
388            </tr>
389            <tr>
390                    <td class="elbow-placeholder"></td>
391                <td colspan="1">
392                    <div class="ansibleOptionAnchor" id="parameter-"></div>
393                    <b>validate_certs</b>
394                    <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
395                    <div style="font-size: small">
396                        <span style="color: purple">boolean</span>
397                    </div>
398                </td>
399                <td>
400                        <ul style="margin: 0; padding: 0"><b>Choices:</b>
401                                    <li>no</li>
402                                    <li><div style="color: blue"><b>yes</b>&nbsp;&larr;</div></li>
403                        </ul>
404                </td>
405                <td>
406                        <div>If <code>no</code>, SSL certificates will not be validated. This should only be used on personally controlled sites using self-signed certificates.  If the transport argument is not eapi, this value is ignored.</div>
407                </td>
408            </tr>
409
410            <tr>
411                <td colspan="2">
412                    <div class="ansibleOptionAnchor" id="parameter-"></div>
413                    <b>state</b>
414                    <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
415                    <div style="font-size: small">
416                        <span style="color: purple">string</span>
417                    </div>
418                </td>
419                <td>
420                        <ul style="margin: 0; padding: 0"><b>Choices:</b>
421                                    <li><div style="color: blue"><b>present</b>&nbsp;&larr;</div></li>
422                                    <li>absent</li>
423                        </ul>
424                </td>
425                <td>
426                        <div>State of the L3 interface configuration. It indicates if the configuration should be present or absent on remote device.</div>
427                </td>
428            </tr>
429    </table>
430    <br/>
431
432
433Notes
434-----
435
436.. note::
437   - Tested against EOS 4.15
438   - For information on using CLI, eAPI and privileged mode see the :ref:`EOS Platform Options guide <eos_platform_options>`
439   - For more information on using Ansible to manage network devices see the :ref:`Ansible Network Guide <network_guide>`
440   - For more information on using Ansible to manage Arista EOS devices see the `Arista integration page <https://www.ansible.com/ansible-arista-networks>`_.
441
442
443
444Examples
445--------
446
447.. code-block:: yaml
448
449    - name: Remove ethernet1 IPv4 and IPv6 address
450      arista.eos.eos_l3_interface:
451        name: ethernet1
452        state: absent
453
454    - name: Set ethernet1 IPv4 address
455      arista.eos.eos_l3_interface:
456        name: ethernet1
457        ipv4: 192.168.0.1/24
458
459    - name: Set ethernet1 IPv6 address
460      arista.eos.eos_l3_interface:
461        name: ethernet1
462        ipv6: fd5d:12c9:2201:1::1/64
463
464    - name: Set interface Vlan1 (SVI) IPv4 address
465      arista.eos.eos_l3_interface:
466        name: Vlan1
467        ipv4: 192.168.0.5/24
468
469    - name: Set IP addresses on aggregate
470      arista.eos.eos_l3_interface:
471        aggregate:
472        - name: ethernet1
473          ipv4: 192.168.2.10/24
474        - name: ethernet1
475          ipv4: 192.168.3.10/24
476          ipv6: fd5d:12c9:2201:1::1/64
477
478    - name: Remove IP addresses on aggregate
479      arista.eos.eos_l3_interface:
480        aggregate:
481        - name: ethernet1
482          ipv4: 192.168.2.10/24
483        - name: ethernet1
484          ipv4: 192.168.3.10/24
485          ipv6: fd5d:12c9:2201:1::1/64
486        state: absent
487
488
489
490Return Values
491-------------
492Common return values are documented `here <https://docs.ansible.com/ansible/latest/reference_appendices/common_return_values.html#common-return-values>`_, the following are the fields unique to this module:
493
494.. raw:: html
495
496    <table border=0 cellpadding=0 class="documentation-table">
497        <tr>
498            <th colspan="1">Key</th>
499            <th>Returned</th>
500            <th width="100%">Description</th>
501        </tr>
502            <tr>
503                <td colspan="1">
504                    <div class="ansibleOptionAnchor" id="return-"></div>
505                    <b>commands</b>
506                    <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
507                    <div style="font-size: small">
508                      <span style="color: purple">list</span>
509                    </div>
510                </td>
511                <td>always, except for the platforms that use Netconf transport to manage the device.</td>
512                <td>
513                            <div>The list of configuration mode commands to send to the device</div>
514                    <br/>
515                        <div style="font-size: smaller"><b>Sample:</b></div>
516                        <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">[&#x27;interface ethernet1&#x27;, &#x27;ip address 192.168.0.1/24&#x27;, &#x27;ipv6 address fd5d:12c9:2201:1::1/64&#x27;]</div>
517                </td>
518            </tr>
519    </table>
520    <br/><br/>
521
522
523Status
524------
525
526
527- This module will be removed in version . *[deprecated]*
528- For more information see `DEPRECATED`_.
529
530
531Authors
532~~~~~~~
533
534- Ganesh Nalawade (@ganeshrn)
535