dellemc.powerscale.nfs_default_settings (3.0.0) — module

Manage NFS default settings on a PowerScale Storage System

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

Authors: Ananthu S Kuttattu(@kuttattz) <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 default settings on an PowerScale system includes getting details of an NFS default settings and modifying different attributes of the NFS default settings.


Requirements

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Get NFS default settings
  dellemc.powerscale.nfs_default_settings:
    onefs_host: "{{onefs_host}}"
    verify_ssl: "{{verify_ssl}}"
    api_user: "{{api_user}}"
    api_password: "{{api_password}}"
    access_zone: "sample-zone"
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Update the NFS default settings
  dellemc.powerscale.nfs_default_settings:
    onefs_host: "{{ onefs_host }}"
    api_user: "{{ api_user }}"
    api_password: "{{ api_password }}"
    verify_ssl: "{{ verify_ssl }}"
    access_zone: "sample-zone"
    block_size:
      size_value: 5
      size_unit: 'KB'
    commit_asynchronous: false
    encoding: 'UTF8'
    map_root:
      enabled: true
      primary_group: 'test_group_1'
      secondary_groups:
        - name: 'test_group_2'
        - name: 'test_group_3'
          state: 'absent'
      user: 'test_user'
    map_non_root:
      enabled: true
      primary_group: 'test_non_root_group'
      secondary_groups:
        - name: 'test_non_root_group_2'
        - name: 'test_non_root_group_3'
          state: 'absent'
      user: 'test_non_root_user'
    readdirplus: true
    time_delta:
      time_value: 5
      time_unit: 'seconds'
    write_filesync_action: 'DATASYNC'
    security_flavors:
      - unix
      - kerberos

Inputs

    
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

encoding:
    description:
    - Specifies the default character set encoding of the clients connecting to the export,
      unless otherwise specified.
    type: str

map_root:
    description:
    - User and group mapping.
    - Map incoming root users to a specific user and/or group ID.
    required: false
    suboptions:
      enabled:
        default: true
        description:
        - Indicates if user mapping is enabled or not.
        - True if the user mapping is applied.
        type: bool
      primary_group:
        description:
        - Specifies name of the primary group.
        required: false
        type: str
      secondary_groups:
        description:
        - Specifies name and state of the secondary groups.
        elements: dict
        required: false
        suboptions:
          name:
            description:
            - Name of the group.
            required: true
            type: str
          state:
            choices:
            - present
            - absent
            default: present
            description:
            - State of the secondary group.
            type: str
        type: list
      user:
        description:
        - Specifies name of the user.
        required: false
        type: str
    type: dict

symlinks:
    description:
    - True if symlinks are supported.
    - This value is used to advise the client of optimal settings for the server, but
      is not enforced.
    required: false
    type: bool

block_size:
    description:
    - Specifies the block size returned by the NFS statfs procedure.
    required: false
    suboptions:
      size_unit:
        choices:
        - B
        - KB
        - MB
        - GB
        - TB
        - PB
        description:
        - Unit for the size value.
        required: true
        type: str
      size_value:
        description:
        - Size value.
        required: true
        type: int
    type: dict

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

time_delta:
    description:
    - Specifies the resolution of all time values that are returned to the clients.
    required: false
    suboptions:
      time_unit:
        choices:
        - seconds
        - nanoseconds
        - milliseconds
        - microseconds
        description:
        - Unit for the time value.
        required: true
        type: str
      time_value:
        description:
        - Time value.
        required: true
        type: float
    type: dict

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:
    - The zone to which the NFS default settings apply.
    type: str

map_failure:
    description:
    - User and group mapping.
    - Map users to a specific user and/or group ID after a failed auth attempt.
    required: false
    suboptions:
      enabled:
        default: true
        description:
        - Indicates if user mapping is enabled or not.
        - True if the user mapping is applied.
        type: bool
      primary_group:
        description:
        - Specifies name of the primary group.
        required: false
        type: str
      secondary_groups:
        description:
        - Specifies name and state of the secondary groups.
        elements: dict
        required: false
        suboptions:
          name:
            description:
            - Name of the group.
            required: true
            type: str
          state:
            choices:
            - present
            - absent
            default: present
            description:
            - State of the secondary group.
            type: str
        type: list
      user:
        description:
        - Specifies name of the user.
        required: false
        type: str
    type: dict

readdirplus:
    description:
    - True if 'readdirplus' requests are enabled.
    - Enabling this property might improve network performance and is only available for
      NFSv3.
    required: false
    type: bool

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

can_set_time:
    description:
    - True if the client can set file times through the NFS set attribute request.
    - This parameter does not affect server behavior, but is included to accommodate legacy
      client requirements.
    required: false
    type: bool

map_non_root:
    description:
    - User and group mapping.
    - Map non-root users to a specific user and/or group ID.
    required: false
    suboptions:
      enabled:
        default: true
        description:
        - Indicates if user mapping is enabled or not.
        - True if the user mapping is applied.
        type: bool
      primary_group:
        description:
        - Specifies name of the primary group.
        required: false
        type: str
      secondary_groups:
        description:
        - Specifies name and state of the secondary groups.
        elements: dict
        required: false
        suboptions:
          name:
            description:
            - Name of the group.
            required: true
            type: str
          state:
            choices:
            - present
            - absent
            default: present
            description:
            - State of the secondary group.
            type: str
        type: list
      user:
        description:
        - Specifies name of the user.
        required: false
        type: str
    type: dict

max_file_size:
    description:
    - Specifies the maximum file size for any file accessed from the export.
    - This parameter does not affect server behavior, but is included to accommodate legacy
      client requirements.
    required: false
    suboptions:
      size_unit:
        choices:
        - B
        - KB
        - MB
        - GB
        - TB
        - PB
        description:
        - Unit for the size value.
        required: true
        type: str
      size_value:
        description:
        - Size value.
        required: true
        type: int
    type: dict

map_lookup_uid:
    description:
    - True if incoming user IDs (UIDs) are mapped to users in the OneFS user database.
    - When set to False, incoming UIDs are applied directly to file operations.
    required: false
    type: bool

security_flavors:
    choices:
    - unix
    - kerberos
    - kerberos_integrity
    - kerberos_privacy
    description:
    - Specifies the authentication types that are supported for this export.
    elements: str
    required: false
    type: list

file_name_max_size:
    description:
    - Specifies the reported maximum length of a file name.
    - This parameter does not affect server behavior, but is included to accommodate legacy
      client requirements.
    required: false
    suboptions:
      size_unit:
        choices:
        - B
        - KB
        - MB
        - GB
        - TB
        - PB
        description:
        - Unit for the size value.
        required: true
        type: str
      size_value:
        description:
        - Size value.
        required: true
        type: int
    type: dict

read_transfer_size:
    description:
    - Specifies the preferred size for NFS read requests.
    - This value is used to advise the client of optimal settings for the server, but
      is not enforced.
    required: false
    suboptions:
      size_unit:
        choices:
        - B
        - KB
        - MB
        - GB
        - TB
        - PB
        description:
        - Unit for the size value.
        required: true
        type: str
      size_value:
        description:
        - Size value.
        required: true
        type: int
    type: dict

commit_asynchronous:
    description:
    - True if NFS commit requests execute asynchronously.
    required: false
    type: bool

write_transfer_size:
    description:
    - Specifies the preferred multiple size for NFS write requests.
    - This value is used to advise the client of optimal settings for the server, but
      is not enforced.
    required: false
    suboptions:
      size_unit:
        choices:
        - B
        - KB
        - MB
        - GB
        - TB
        - PB
        description:
        - Unit for the size value.
        required: true
        type: str
      size_value:
        description:
        - Size value.
        required: true
        type: int
    type: dict

setattr_asynchronous:
    description:
    - True if set attribute operations execute asynchronously.
    required: false
    type: bool

write_datasync_reply:
    choices:
    - DATASYNC
    - FILESYNC
    - UNSTABLE
    description:
    - Specifies the synchronization type for datasync reply.
    type: str

write_filesync_reply:
    choices:
    - DATASYNC
    - FILESYNC
    - UNSTABLE
    description:
    - Specifies the synchronization type for filesync reply.
    type: str

write_unstable_reply:
    choices:
    - DATASYNC
    - FILESYNC
    - UNSTABLE
    description:
    - Specifies the synchronization type for unstable reply.
    type: str

return_32bit_file_ids:
    description:
    - Limits the size of file identifiers returned by NFSv3+ to 32-bit values (may require
      remount).
    required: false
    type: bool

write_datasync_action:
    choices:
    - DATASYNC
    - FILESYNC
    - UNSTABLE
    description:
    - Specifies the synchronization type for datasync action.
    type: str

write_filesync_action:
    choices:
    - DATASYNC
    - FILESYNC
    - UNSTABLE
    description:
    - Specifies the synchronization type for filesync action.
    type: str

write_unstable_action:
    choices:
    - DATASYNC
    - FILESYNC
    - UNSTABLE
    description:
    - Specifies the synchronization type for unstable action.
    type: str

read_transfer_max_size:
    description:
    - Specifies the maximum buffer size that clients should use on NFS read requests.
    - This value is used to advise the client of optimal settings for the server, but
      is not enforced.
    required: false
    suboptions:
      size_unit:
        choices:
        - B
        - KB
        - MB
        - GB
        - TB
        - PB
        description:
        - Unit for the size value.
        required: true
        type: str
      size_value:
        description:
        - Size value.
        required: true
        type: int
    type: dict

read_transfer_multiple:
    description:
    - Specifies the preferred multiple size for NFS read requests.
    - This value is used to advise the client of optimal settings for the server, but
      is not enforced.
    required: false
    suboptions:
      size_unit:
        choices:
        - B
        - KB
        - MB
        - GB
        - TB
        - PB
        description:
        - Unit for the size value.
        required: true
        type: str
      size_value:
        description:
        - Size value.
        required: true
        type: int
    type: dict

directory_transfer_size:
    description:
    - Specifies the preferred size for directory read operations.
    - This value is used to advise the client of optimal settings for the server, but
      is not enforced.
    required: false
    suboptions:
      size_unit:
        choices:
        - B
        - KB
        - MB
        - GB
        - TB
        - PB
        description:
        - Unit for the size value.
        required: true
        type: str
      size_value:
        description:
        - Size value.
        required: true
        type: int
    type: dict

write_transfer_max_size:
    description:
    - Specifies the maximum buffer size that clients should use on NFS write requests.
    - This value is used to advise the client of optimal settings for the server, but
      is not enforced.
    required: false
    suboptions:
      size_unit:
        choices:
        - B
        - KB
        - MB
        - GB
        - TB
        - PB
        description:
        - Unit for the size value.
        required: true
        type: str
      size_value:
        description:
        - Size value.
        required: true
        type: int
    type: dict

write_transfer_multiple:
    description:
    - Specifies the preferred multiple size for NFS write requests.
    - This value is used to advise the client of optimal settings for the server, but
      is not enforced.
    required: false
    suboptions:
      size_unit:
        choices:
        - B
        - KB
        - MB
        - GB
        - TB
        - PB
        description:
        - Unit for the size value.
        required: true
        type: str
      size_value:
        description:
        - Size value.
        required: true
        type: int
    type: dict

Outputs

changed:
  description: A boolean indicating if the task had to make changes.
  returned: always
  sample: 'false'
  type: bool
nfs_default_settings:
  contains:
    block_size:
      description: Specifies the block size returned by the NFS statfs procedure.
      type: dict
    can_set_time:
      description: True if the client can set file times through the NFS set attribute
        request. This parameter does not affect server behavior, but is included to
        accommodate legacy client requirements.
      type: bool
    commit_asynchronous:
      description: True if NFS commit requests execute asynchronously.
      type: bool
    directory_transfer_size:
      description: Specifies the preferred size for directory read operations. This
        value is used to advise the client of optimal settings for the server, but
        is not enforced.
      type: dict
    encoding:
      description: Specifies the default character set encoding of the clients connecting
        to the export, unless otherwise specified.
      type: str
    map_failure:
      description: Mapping of users to a specific user and/or group ID after a failed
        auth attempt.
      type: dict
    map_lookup_uid:
      description: True if incoming user IDs (UIDs) are mapped to users in the OneFS
        user database. When set to False, incoming UIDs are applied directly to file
        operations.
      type: bool
    map_non_root:
      description: Mapping of non-root users to a specific user and/or group ID.
      type: dict
    map_root:
      description: Mapping of incoming root users to a specific user and/or group
        ID.
      type: dict
    max_file_size:
      description: Specifies the maximum file size for any file accessed from the
        export. This parameter does not affect server behavior, but is included to
        accommodate legacy client requirements.
      type: dict
    name_max_size:
      description: Specifies the reported maximum length of a file name. This parameter
        does not affect server behavior, but is included to accommodate legacy client
        requirements.
      type: dict
    read_transfer_max_size:
      description: Specifies the maximum buffer size that clients should use on NFS
        read requests. This value is used to advise the client of optimal settings
        for the server, but is not enforced.
      type: dict
    read_transfer_multiple:
      description: Specifies the preferred multiple size for NFS read requests. This
        value is used to advise the client of optimal settings for the server, but
        is not enforced.
      type: dict
    read_transfer_size:
      description: Specifies the preferred size for NFS read requests. This value
        is used to advise the client of optimal settings for the server, but is not
        enforced.
      type: dict
    readdirplus:
      description: True if 'readdirplus' requests are enabled. Enabling this property
        might improve network performance and is only available for NFSv3.
      type: bool
    return_32bit_file_ids:
      description: Limits the size of file identifiers returned by NFSv3+ to 32-bit
        values (may require remount).
      type: bool
    security_flavors:
      description: Specifies the authentication types that are supported for this
        export.
      type: list
    setattr_asynchronous:
      description: True if set attribute operations execute asynchronously.
      type: bool
    symlinks:
      description: True if symlinks are supported. This value is used to advise the
        client of optimal settings for the server, but is not enforced.
      type: bool
    time_delta:
      description: Specifies the resolution of all time values that are returned to
        the clients.
      type: dict
    write_datasync_action:
      description: Specifies the synchronization type for data sync action.
      type: str
    write_datasync_reply:
      description: Specifies the synchronization type for data sync reply.
      type: str
    write_filesync_action:
      description: Specifies the synchronization type for file sync action.
      type: str
    write_filesync_reply:
      description: Specifies the synchronization type for file sync reply.
      type: str
    write_transfer_max_size:
      description: Specifies the maximum buffer size that clients should use on NFS
        write requests. This value is used to advise the client of optimal settings
        for the server, but is not enforced.
      type: dict
    write_transfer_multiple:
      description: Specifies the preferred multiple size for NFS write requests. This
        value is used to advise the client of optimal settings for the server, but
        is not enforced.
      type: dict
    write_transfer_size:
      description: Specifies the preferred multiple size for NFS write requests. This
        value is used to advise the client of optimal settings for the server, but
        is not enforced.
      type: dict
    write_unstable_action:
      description: Specifies the synchronization type for unstable action.
      type: str
    write_unstable_reply:
      description: Specifies the synchronization type for unstable reply.
      type: str
    zone:
      description: The zone to which the NFS default settings apply.
      type: str
  description: The NFS default settings.
  returned: always
  sample:
    block_size: 8192
    can_set_time: true
    commit_asynchronous: false
    directory_transfer_size: 131072
    encoding: DEFAULT
    map_failure:
      enabled: false
      primary_group:
        id: None
        name: None
        type: None
      secondary_groups: []
      user:
        id: USER:nobody
        name: None
        type: None
    map_lookup_uid: false
    map_non_root:
      enabled: false
      primary_group:
        id: None
        name: None
        type: None
      secondary_groups: []
      user:
        id: USER:nobody
        name: None
        type: None
    map_root:
      enabled: true
      primary_group:
        id: None
        name: None
        type: None
      secondary_groups: []
      user:
        id: USER:nobody
        name: None
        type: None
    max_file_size: 9223372036854775807
    name_max_size: 255
    read_transfer_max_size: 1048576
    read_transfer_multiple: 512
    read_transfer_size: 131072
    readdirplus: true
    return_32bit_file_ids: false
    setattr_asynchronous: false
    symlinks: true
    time_delta: 1e-09
    write_datasync_action: DATASYNC
    write_datasync_reply: DATASYNC
    write_filesync_action: FILESYNC
    write_filesync_reply: FILESYNC
    write_transfer_max_size: 1048576
    write_transfer_multiple: 512
    write_transfer_size: 524288
    write_unstable_action: UNSTABLE
    write_unstable_reply: UNSTABLE
    zone: sample-zone
  type: dict