• Blog
  • Ansible community forum
  • Documentation
Ansible Logo
Ansible Community Documentation
Ansible

Ansible getting started

  • Getting started with Ansible
  • Getting started with Execution Environments

Installation, Upgrade & Configuration

  • Installation Guide
  • Ansible Porting Guides

Using Ansible

  • Building Ansible inventories
  • Using Ansible command line tools
  • Using Ansible playbooks
  • Protecting sensitive data with Ansible vault
  • Using Ansible modules and plugins
  • Using Ansible collections
  • Using Ansible on Windows, BSD, and z/OS UNIX
  • Ansible tips and tricks

Contributing to Ansible

  • Ansible Community Guide
  • Ansible Collections Contributor Guide
  • ansible-core Contributors Guide
  • Advanced Contributor Guide
  • Ansible documentation style guide

Extending Ansible

  • Developer Guide

Common Ansible Scenarios

  • Legacy Public Cloud Guides

Network Automation

  • Network Getting Started
  • Network Advanced Topics
  • Network Developer Guide

Ansible Galaxy

  • Galaxy User Guide
  • Galaxy Developer Guide

Reference & Appendices

  • Collection Index
    • Collections in the Amazon Namespace
    • Collections in the Ansible Namespace
    • Collections in the Arista Namespace
    • Collections in the Awx Namespace
    • Collections in the Azure Namespace
    • Collections in the Check_point Namespace
    • Collections in the Chocolatey Namespace
    • Collections in the Cisco Namespace
    • Collections in the Cloud Namespace
    • Collections in the Cloudscale_ch Namespace
    • Collections in the Community Namespace
    • Collections in the Containers Namespace
    • Collections in the Cyberark Namespace
    • Collections in the Dellemc Namespace
    • Collections in the F5networks Namespace
    • Collections in the Fortinet Namespace
    • Collections in the Frr Namespace
    • Collections in the Gluster Namespace
    • Collections in the Google Namespace
    • Collections in the Grafana Namespace
    • Collections in the Hetzner Namespace
    • Collections in the Hitachivantara Namespace
    • Collections in the Hpe Namespace
    • Collections in the Ibm Namespace
    • Collections in the Ieisystem Namespace
    • Collections in the Infinidat Namespace
    • Collections in the Infoblox Namespace
    • Collections in the Inspur Namespace
    • Collections in the Junipernetworks Namespace
    • Collections in the Kaytus Namespace
    • Collections in the Kubernetes Namespace
    • Collections in the Kubevirt Namespace
    • Collections in the Lowlydba Namespace
    • Collections in the Mellanox Namespace
    • Collections in the Microsoft Namespace
    • Collections in the Netapp Namespace
      • Netapp.Cloudmanager
      • Netapp.Ontap
        • Description
        • Plugin Index
      • Netapp.Storagegrid
    • Collections in the Netapp_eseries Namespace
    • Collections in the Netbox Namespace
    • Collections in the Ngine_io Namespace
    • Collections in the Openstack Namespace
    • Collections in the Openvswitch Namespace
    • Collections in the Ovirt Namespace
    • Collections in the Purestorage Namespace
    • Collections in the Sensu Namespace
    • Collections in the Servicenow Namespace
    • Collections in the Splunk Namespace
    • Collections in the T_systems_mms Namespace
    • Collections in the Telekom_mms Namespace
    • Collections in the Theforeman Namespace
    • Collections in the Vmware Namespace
    • Collections in the Vultr Namespace
    • Collections in the Vyos Namespace
    • Collections in the Wti Namespace
  • Indexes of all modules and plugins
  • Playbook Keywords
  • Return Values
  • Ansible Configuration Settings
  • Controlling how Ansible behaves: precedence rules
  • YAML Syntax
  • Python 3 Support
  • Interpreter Discovery
  • Releases and maintenance
  • Testing Strategies
  • Sanity Tests
  • Frequently Asked Questions
  • Glossary
  • Ansible Reference: Module Utilities
  • Special Variables
  • Red Hat Ansible Automation Platform
  • Ansible Automation Hub
  • Logging Ansible output

Roadmaps

  • Ansible Roadmap
  • ansible-core Roadmaps




Ansible
  • Collection Index
  • Collections in the Netapp Namespace
  • Netapp.Ontap
  • netapp.ontap.na_ontap_cifs_unix_symlink_mapping module – NetApp ONTAP module to manage UNIX symbolic link mapping for CIFS clients.


netapp.ontap.na_ontap_cifs_unix_symlink_mapping module – NetApp ONTAP module to manage UNIX symbolic link mapping for CIFS clients.

Note

This module is part of the netapp.ontap collection (version 22.14.0).

You might already have this collection installed if you are using the ansible package. It is not included in ansible-core. To check whether it is installed, run ansible-galaxy collection list.

To install it, use: ansible-galaxy collection install netapp.ontap. You need further requirements to be able to use this module, see Requirements for details.

To use it in a playbook, specify: netapp.ontap.na_ontap_cifs_unix_symlink_mapping.

New in netapp.ontap 22.9.0

  • Synopsis

  • Requirements

  • Parameters

  • Notes

  • Examples

Synopsis

  • Create/ modify/ delete a UNIX symbolic link mapping for a CIFS client.

Requirements

The below requirements are needed on the host that executes this module.

  • Ansible 2.9 or later - 2.12 or later is recommended.

  • Python3 - 3.9 or later is recommended.

  • When using ZAPI, netapp-lib 2018.11.13 or later (install using ‘pip install netapp-lib’), netapp-lib 2020.3.12 is strongly recommended as it provides better error reporting for connection issues.

  • A physical or virtual clustered Data ONTAP system, the modules support Data ONTAP 9.1 and onward, REST support requires ONTAP 9.6 or later.

Parameters

Parameter

Comments

cert_filepath

string

added in netapp.ontap 20.6.0

path to SSL client cert file (.pem).

not supported with python 2.6.

cifs_path

string

Specifies the CIFS path on the destination to which the symbolic link maps.

Note that this value is specified by using a UNIX-style path. It must begin and end with a forward slash (/).

cifs_server

string

Specifies the destination CIFS server (DNS name, IP address, or NetBIOS name).

This field is mandatory if the locality of the symbolic link is ‘widelink’.

feature_flags

dictionary

added in netapp.ontap 20.5.0

Enable or disable a new feature.

This can be used to enable an experimental feature or disable a new feature that breaks backward compatibility.

Supported keys and values are subject to change without notice. Unknown keys are ignored.

force_ontap_version

string

added in netapp.ontap 21.23.0

Override the cluster ONTAP version when using REST.

The behavior is undefined if the version does not match the target cluster.

This is provided as a work-around when the cluster version cannot be read because of permission issues. See https://github.com/ansible-collections/netapp.ontap/wiki/Known-issues.

This should be in the form 9.10 or 9.10.1 with each element being an integer number.

home_directory

boolean

Specify if the destination share is a home directory. The default value is false.

Choices:

  • false ← (default)

  • true

hostname

string / required

The hostname or IP address of the ONTAP instance.

http_port

integer

Override the default port (80 or 443) with this port

https

boolean

Enable and disable https.

Ignored when using REST as only https is supported.

Ignored when using SSL certificate authentication as it requires SSL.

Choices:

  • false ← (default)

  • true

key_filepath

string

added in netapp.ontap 20.6.0

path to SSL client key file.

locality

string

Specifies whether the CIFS symbolic link is a local link or wide link. The default setting is local.

The following values are supported local - Local symbolic link maps only to the same CIFS share. widelink - Wide symbolic link maps to any CIFS share on the network.

Choices:

  • "local" ← (default)

  • "widelink"

password

aliases: pass

string

Password for the specified user.

share_name

string

Specifies the CIFS share name on the destination CIFS server to which the UNIX symbolic link is pointing.

state

string

Whether the specified symlink mapping should exist or not.

Choices:

  • "present" ← (default)

  • "absent"

unix_path

string / required

Specifies the UNIX path prefix to be matched for the mapping.

It must begin and end with a forward slash (/).

use_rest

string

This module only supports REST.

always – will always use the REST API. A warning is issued if the module does not support REST.

Default: "always"

username

aliases: user

string

This can be a Cluster-scoped or SVM-scoped account, depending on whether a Cluster-level or SVM-level API is required.

For more information, please read the documentation https://docs.netapp.com/us-en/ontap/authentication/create-svm-user-accounts-task.html.

Two authentication methods are supported

  1. Basic authentication, using username and password.

  2. SSL certificate authentication, using a ssl client cert file, and optionally a private key file.

To use a certificate, the certificate must have been installed in the ONTAP cluster, and cert authentication must have been enabled.

validate_certs

boolean

If set to no, the SSL certificates will not be validated.

This should only set to False used on personally controlled sites using self-signed certificates.

Choices:

  • false

  • true ← (default)

vserver

string / required

Name of the vserver to use.

Notes

Note

  • Only supported with REST and requires ONTAP 9.6 or later.

  • The modules prefixed with na_ontap are built to support the ONTAP storage platform.

  • https is enabled by default and recommended. To enable http on the cluster you must run the following commands ‘set -privilege advanced;’ ‘system services web modify -http-enabled true;’

Examples

- name: Create a UNIX symlink mapping for CIFS share
  netapp.ontap.na_ontap_cifs_unix_symlink_mapping:
    state: present
    vserver: "{{ svm }}"
    unix_path: "/example1/"
    share_name: "share1"
    cifs_path: "/path1/test_dir/"
    cifs_server: "CIFS"
    hostname: "{{ netapp_hostname }}"
    username: "{{ netapp_username }}"
    password: "{{ netapp_password }}"
    https: true
    validate_certs: "{{ validate_certs }}"

- name: Update a specific UNIX symlink mapping for a SVM
  netapp.ontap.na_ontap_cifs_unix_symlink_mapping:
    state: present
    vserver: "{{ svm }}"
    unix_path: "/example1/"
    share_name: "share2"
    cifs_path: "/path2/test_dir/"
    cifs_server: "CIFS"
    locality: "widelink"
    hostname: "{{ netapp_hostname }}"
    username: "{{ netapp_username }}"
    password: "{{ netapp_password }}"
    https: true
    validate_certs: "{{ validate_certs }}"

- name: Remove a specific UNIX symlink mapping for a SVM
  netapp.ontap.na_ontap_cifs_unix_symlink_mapping:
    state: absent
    vserver: "{{ svm }}"
    unix_path: "/example1/"
    hostname: "{{ netapp_hostname }}"
    username: "{{ netapp_username }}"
    password: "{{ netapp_password }}"
    https: true
    validate_certs: "{{ validate_certs }}"

Authors

  • NetApp Ansible Team (@carchi8py)

Collection links

  • Issue Tracker
  • Homepage
  • Repository (Sources)
Previous Next

© Copyright Ansible project contributors. Last updated on May 06, 2025.