dellemc.powerscale.nfs_alias (3.0.0) — module

Manage NFS aliases on a PowerScale Storage System

| "added in version" 1.7.0 of dellemc.powerscale"

Authors: Trisha Datta(@Trisha-Datta) <ansible.team@dell.com>

Install collection

Install with ansible-galaxy collection install dellemc.powerscale:==3.0.0


Add to requirements.yml

  collections:
    - name: dellemc.powerscale
      version: 3.0.0

Description

Managing NFS aliases on an PowerScale system includes creating NFS alias for NFS export, Getting details of an NFS alias, Modifying different attributes of the NFS alias and Deleting an NFS alias.


Requirements

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Create NFS alias - check mode
  dellemc.powerscale.nfs_alias:
    onefs_host: "{{onefs_host}}"
    verify_ssl: "{{verify_ssl}}"
    api_user: "{{api_user}}"
    api_password: "{{api_password}}"
    nfs_alias_name: "/sample_alias_2"
    path: "/ifs"
    access_zone: 'System'
    state: "present"
  check_mode: true
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Create NFS alias
  dellemc.powerscale.nfs_alias:
    onefs_host: "{{onefs_host}}"
    verify_ssl: "{{verify_ssl}}"
    api_user: "{{api_user}}"
    api_password: "{{api_password}}"
    nfs_alias_name: "/sample_alias_2"
    path: "/ifs"
    access_zone: 'System'
    state: "present"
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Get NFS alias by name
  dellemc.powerscale.nfs_alias:
    onefs_host: "{{onefs_host}}"
    verify_ssl: "{{verify_ssl}}"
    api_user: "{{api_user}}"
    api_password: "{{api_password}}"
    nfs_alias_name: "/sample_alias_2"
    scope: "effective"
    check: true
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Modify NFS alias - check mode
  dellemc.powerscale.nfs_alias:
    onefs_host: "{{onefs_host}}"
    verify_ssl: "{{verify_ssl}}"
    api_user: "{{api_user}}"
    api_password: "{{api_password}}"
    nfs_alias_name: "/sample_alias_2"
    new_alias_name: "/Renamed_alias_2"
    path: "/ifs/Test"
    state: "present"
  check_mode: true
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Modify NFS alias
  dellemc.powerscale.nfs_alias:
    onefs_host: "{{onefs_host}}"
    verify_ssl: "{{verify_ssl}}"
    api_user: "{{api_user}}"
    api_password: "{{api_password}}"
    nfs_alias_name: "/sample_alias_2"
    new_alias_name: "/Renamed_alias_2"
    path: "/ifs/Test"
    state: "present"
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Delete NFS alias - check mode
  dellemc.powerscale.nfs_alias:
    onefs_host: "{{onefs_host}}"
    verify_ssl: "{{verify_ssl}}"
    api_user: "{{api_user}}"
    api_password: "{{api_password}}"
    nfs_alias_name: "/Renamed_alias_2"
    state: "absent"
  check_mode: true
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Delete NFS alias
  dellemc.powerscale.nfs_alias:
    onefs_host: "{{onefs_host}}"
    verify_ssl: "{{verify_ssl}}"
    api_user: "{{api_user}}"
    api_password: "{{api_password}}"
    nfs_alias_name: "/Renamed_alias_2"
    state: "absent"

Inputs

    
path:
    description:
    - Specifies the path to which the alias points.
    - It is the absolute path for System access zone and it is relative if using non-system
      access zone.
    - If your access zone is System, and you have 'directory1' in the access zone, the
      path provided should be '/ifs/directory1'.
    - The directory on the path must exist, the NFS alias module will not create the directory.
    required: false
    type: str

check:
    default: false
    description:
    - Check for conflicts when viewing alias.
    type: bool

scope:
    choices:
    - effective
    - user
    default: effective
    description:
    - When specified as C(effective), or not specified, all fields are returned.
    - When specified as C(user), only fields with non-default values are shown.
    type: str

state:
    choices:
    - absent
    - present
    default: present
    description:
    - Defines whether the NFS alias should exist or not.
    - C(present) indicates that the NFS alias should exist in system.
    - C(absent) indicates that the NFS alias should not exist in system.
    type: str

port_no:
    default: '8080'
    description:
    - Port number of the PowerScale cluster.It defaults to 8080 if not specified.
    required: false
    type: str

api_user:
    description:
    - username of the PowerScale cluster.
    required: true
    type: str

onefs_host:
    description:
    - IP address or FQDN of the PowerScale cluster.
    required: true
    type: str

verify_ssl:
    choices:
    - true
    - false
    description:
    - boolean variable to specify whether to validate SSL certificate or not.
    - C(true) - indicates that the SSL certificate should be verified.
    - C(false) - indicates that the SSL certificate should not be verified.
    required: true
    type: bool

access_zone:
    default: System
    description:
    - Specifies the zone in which the alias is valid.
    - Access zone once set cannot be changed.
    type: str

api_password:
    description:
    - the password of the PowerScale cluster.
    required: true
    type: str

new_alias_name:
    description:
    - New name of the alias.
    type: str

nfs_alias_name:
    description:
    - Name of an NFS alias.
    required: true
    type: str

Outputs

changed:
  description: A boolean indicating if the task had to make changes.
  returned: always
  sample: 'false'
  type: bool
nfs_alias_details:
  contains:
    health:
      description: The health of the NFS alias.
      sample: unknown
      type: str
    id:
      description: The ID of the NFS alias.
      sample: /Sample_alias1
      type: str
    name:
      description: The name of the NFS alias.
      sample: /Sample_alias1
      type: str
    path:
      description: The path of the NFS alias.
      sample: /ifs/dir/filepath
      type: str
    zone:
      description: Specifies the zone in which the NFS alias is valid.
      sample: System
      type: str
  description: The NFS alias details.
  returned: always
  sample:
    aliases:
    - health: unknown
      id: /test_alias_1
      name: /test_alias_1
      path: /ifs/Test
      zone: System
  type: complex