community.cip.verify_cip_identity (1.0.1) — module

Verify CIP identity of PLC

Authors: Matthew Sandoval (@matoval)

preview | supported by community

Install collection

Install with ansible-galaxy collection install community.cip:==1.0.1


Add to requirements.yml

  collections:
    - name: community.cip
      version: 1.0.1

Description

Verify CIP identity of PLC

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Verify CIP identity
  community.cip.verify_cip_identity:
    cip_identity:
      vendor_id: "{{ hostvars[inventory_hostname]['vendor_id'] }}"
      device_type: "{{ hostvars[inventory_hostname]['device_type'] }}"
      product_code: "{{ hostvars[inventory_hostname]['product_code'] }}"
      revision: "{{ hostvars[inventory_hostname]['revision'] }}"
      status:
        owned: "{{ hostvars[inventory_hostname]['owned'] }}"
        configured: "{{ hostvars[inventory_hostname]['configured'] }}"
        mode: "{{ hostvars[inventory_hostname]['mode'] }}"
        minor_recoverable_fault: "{{ hostvars[inventory_hostname]['minor_recoverable_fault'] }}"
        minor_unrecoverable_fault: "{{ hostvars[inventory_hostname]['minor_unrecoverable_fault'] }}"
        major_recoverable_fault: "{{ hostvars[inventory_hostname]['major_recoverable_fault'] }}"
        major_unrecoverable_fault: "{{ hostvars[inventory_hostname]['major_unrecoverable_fault'] }}"
        keyswitch: "{{ hostvars[inventory_hostname]['keyswitch'] }}"
        transitioning: "{{ hostvars[inventory_hostname]['transitioning'] }}"
        debug: "{{ hostvars[inventory_hostname]['debug'] }}"
      serial_number: "{{ hostvars[inventory_hostname]['serial_number'] }}"
      product_name: "{{ hostvars[inventory_hostname]['product_name'] }}"
  register: ensure_firmware_version_out
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- debug: var=ensure_firmware_version_out

Inputs

    
cip_identity:
    description:
    - Dictionary of status properties that are part of CIP Identitiy
    required: true
    suboptions:
      device_type:
        description:
        - Value is the device type of the plc.
        required: false
        type: int
      product_code:
        description:
        - Value is the product code of the plc.
        required: false
        type: int
      product_name:
        description:
        - Value is the product name of the plc.
        required: false
        type: str
      revision:
        description:
        - firmware revision to validate in the form XX.YYY
        required: false
        type: str
      serial_number:
        description:
        - Value is the serial number of the plc.
        required: false
        type: str
      status:
        description:
        - Value to ensure the tag is set to.
        required: false
        suboptions:
          configured:
            description:
            - Value indicating if the plc is configured different than the "out-of-box"
              default.
            required: false
            type: bool
          debug:
            description:
            - Value indicating if debug mode is active.
            required: false
            type: bool
          keyswitch:
            description:
            - Value indicating current keyswitch mode.
            required: false
            type: str
          major_recoverable_fault:
            description:
            - Value indicating if there is a major recoverable fault.
            required: false
            type: bool
          major_unrecoverable_fault:
            description:
            - Value indicating if there is a major unrecoverable fault.
            required: false
            type: bool
          minor_recoverable_fault:
            description:
            - Value indicating if there is a minor recoverable fault.
            required: false
            type: bool
          minor_unrecoverable_fault:
            description:
            - Value indicating if there is a minor unrecoverable fault.
            required: false
            type: bool
          mode:
            description:
            - Value indicating the current mode of the plc.
            required: false
            type: str
          owned:
            description:
            - Value indicating the plc has an owner.
            required: false
            type: bool
          transitioning:
            description:
            - Value indicating if status is currently transitioning.
            required: false
            type: bool
        type: dict
      vendor_id:
        description:
        - Value is the vendor id of the plc.
        required: false
        type: int
    type: dict