netapp_eseries.host.file_list (1.3.1) — module

Update log file containing comma separated list.

Authors: Nathan Swartz (@ndswartz)

Install collection

Install with ansible-galaxy collection install netapp_eseries.host:==1.3.1


Add to requirements.yml

  collections:
    - name: netapp_eseries.host
      version: 1.3.1

Description

Add and remove items to comma separated list found in log file.

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- update_file_list:
    mode: add
    file: /var/log/test
    items:
      - item3
      - item4
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- update_file_list:
    mode: remove
    file: /var/log/test
    items:
      - item2
      - item3
      - item5

Inputs

    
file:
    description: Absolute file path on remote system
    required: true
    type: str

item:
    description: Item(s) to add or remove from file.
    required: true
    type: str

mode:
    choices:
    - add
    - remove
    - content
    default: add
    description: Whether to add or remove items.
    required: false
    type: str

Outputs

changed:
  description: Whether change was made to the log file.
  returned: always
  type: str
list:
  description: List of items in comma separated list
  returned: always
  type: list
msg:
  description: Success message
  returned: always
  type: str