ieisystem.inmanage.edit_ntp (1.1.1) — module

Set NTP

| "added in version" 1.0.0 of ieisystem.inmanage"

Authors: WangBaoshan (@ieisystem)

Install collection

Install with ansible-galaxy collection install ieisystem.inmanage:==1.1.1


Add to requirements.yml

  collections:
    - name: ieisystem.inmanage
      version: 1.1.1

Description

Set NTP on ieisystem Server.


Requirements

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: NTP test
  hosts: inmanage
  connection: local
  gather_facts: no
  vars:
    inmanage:
      host: "{{ ansible_ssh_host }}"
      username: "{{ username }}"
      password: "{{ password }}"

  tasks:

  - name: "Set ntp"
    ieisystem.inmanage.edit_ntp:
      auto_date: "enable"
      server2: "time.nist.gov"
      provider: "{{ inmanage }}"

  - name: "Set ntp"
    ieisystem.inmanage.edit_ntp:
      auto_date: "disable"
      ntp_time: "20200609083600"
      provider: "{{ inmanage }}"

  - name: "set ntp"
    ieisystem.inmanage.edit_ntp:
      time_zone: "8"
      provider: "{{ inmanage }}"

Inputs

    
host:
    description:
    - 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.
    type: str

server1:
    description:
    - NTP Server1(ipv4 or ipv6 or domain name), set when auto_date is enable.
    type: str

server2:
    description:
    - NTP Server2(ipv4 or ipv6 or domain name), set when auto_date is enable.
    type: str

server3:
    description:
    - NTP Server3(ipv4 or ipv6 or domain name), set when auto_date is enable.
    type: str

server4:
    description:
    - NTP Server4(ipv4 or ipv6 or domain name), set when auto_date is enable.
    type: str

server5:
    description:
    - NTP Server5(ipv4 or ipv6 or domain name), set when auto_date is enable.
    type: str

server6:
    description:
    - NTP Server6(ipv4 or ipv6 or domain name), set when auto_date is enable.
    type: str

ntp_time:
    description:
    - NTP time(YYYYmmddHHMMSS).
    - Only the M5 model supports this parameter.
    type: str

password:
    description:
    - 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 C(ANSIBLE_NET_PASSWORD)
      will be used instead.
    type: str

provider:
    description:
    - A dict object containing connection details.
    suboptions:
      host:
        description:
        - 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.
        type: str
      password:
        description:
        - 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
          C(ANSIBLE_NET_PASSWORD) will be used instead.
        type: str
      username:
        description:
        - 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 C(ANSIBLE_NET_USERNAME) will be used instead.
        type: str
    type: dict

username:
    description:
    - 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 C(ANSIBLE_NET_USERNAME)
      will be used instead.
    type: str

auto_date:
    choices:
    - enable
    - disable
    description:
    - Date auto synchronize.
    type: str

syn_cycle:
    description:
    - NTP syn cycle(minute), sync cycle(5-1440).
    type: int

time_zone:
    description:
    - UTC time zone, chose from {-12, -11.5, -11, ... , 11, 11.5, 12}.
    type: str

max_variety:
    description:
    - NTP Maximum jump time(minute), max variety(1-60).
    - Only the M6 model supports this parameter.
    type: int

Outputs

changed:
  description: Check to see if a change was made on the device.
  returned: always
  type: bool
message:
  description: Messages returned after module execution.
  returned: always
  type: str
state:
  description: Status after module execution.
  returned: always
  type: str