�
�Udac @` s� d d l m Z m Z m Z e Z i d d 6d g d 6d d 6Z d Z d Z d
Z d d l
m Z d d l m
Z
m Z m Z d
� Z e d k r� e � n d S( i ( t absolute_importt divisiont print_functions 1.1t metadata_versiont previewt statust communityt supported_bys
---
module: pn_admin_service
author: "Pluribus Networks (@rajaspachipulusu17)"
version_added: "2.8"
short_description: CLI command to modify admin-service
description:
- This module is used to modify services on the server-switch.
options:
pn_cliswitch:
description:
- Target switch to run the CLI on.
required: False
type: str
state:
description:
- State the action to perform. Use C(update) to modify the admin-service.
required: True
type: str
choices: ['update']
pn_web:
description:
- Web (HTTP) to enable or disable.
required: False
type: bool
pn_web_ssl:
description:
- Web SSL (HTTPS) to enable or disable.
required: False
type: bool
pn_snmp:
description:
- Simple Network Monitoring Protocol (SNMP) to enable or disable.
required: False
type: bool
pn_web_port:
description:
- Web (HTTP) port to enable or disable.
required: False
type: str
pn_web_ssl_port:
description:
- Web SSL (HTTPS) port to enable or disable.
required: False
type: str
pn_nfs:
description:
- Network File System (NFS) to enable or disable.
required: False
type: bool
pn_ssh:
description:
- Secure Shell to enable or disable.
required: False
type: bool
pn_web_log:
description:
- Web logging to enable or disable.
required: False
type: bool
pn__if:
description:
- administrative service interface.
required: False
type: str
choices: ['mgmt', 'data']
pn_icmp:
description:
- Internet Message Control Protocol (ICMP) to enable or disable.
required: False
type: bool
pn_net_api:
description:
- Netvisor API to enable or disable APIs.
required: False
type: bool
s`
- name: admin service functionality
pn_admin_service:
pn_cliswitch: "sw01"
state: "update"
pn__if: "mgmt"
pn_web: False
pn_icmp: True
- name: admin service functionality
pn_admin_service:
pn_cliswitch: "sw01"
state: "update"
pn_web: False
pn__if: "mgmt"
pn_snmp: True
pn_net_api: True
pn_ssh: True
s�
command:
description: the CLI command run on the target node.
returned: always
type: str
stdout:
description: set of responses from the admin-service command.
returned: always
type: list
stderr:
description: set of error responses from the admin-service command.
returned: on error
type: list
changed:
description: indicates whether the CLI caused changes on the target.
returned: always
type: bool
( t
AnsibleModule( t pn_clit booleanArgst run_clic ! C` sn t d d � } t d t d t d t d d � d t d t d d d | j � � d
t d t d d � d t d t d d � d
t d t d d � d t d t d d � d t d t d d � d t d t d d � d t d t d d � d t d t d d � d t d t d d d d d g � d t d t d d � d t d t d d � �
d d d d g g g d d
d d
d d d d d d d g
g � } | j d } | j d } | j d
} | j d } | j d
} | j d } | j d } | j d } | j d }
| j d } | j d } | j d }
| j d } | | } t | | � } | d k rZ| d | 7} | ry| d | 7} n | r�| d | 7} n | r�| d | 7} n | t | d d � 7} | t | d d! � 7} | t | d"