> For the complete documentation index, see [llms.txt](https://rubrik.gitbook.io/rubrik-modules-for-ansible/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://rubrik.gitbook.io/rubrik-modules-for-ansible/modules/rubrik_assign_physical_host_fileset.md).

# rubrik\_assign\_physical\_host\_fileset

## rubrik\_assign\_physical\_host\_fileset

Assign a fileset to a Linux, Unix or Windows machine. If you have multiple filesets with identical names, you will need to populate the filesets properties to find a specific match. Filesets with identical names and properties are not supported.

`Requirement: Rubrik Python SDK (pip install rubrik_cdm)`

## Example

```yaml
- rubrik_assign_physical_host_fileset:
    hostname: 'ansible-tower'
    fileset_name: 'all-files'
    operating_system: Linux
    sla_name: 'Gold'
```

## Arugments

### Common

| Name       | Description                                                                                                                                                                                                                                                                                                  | Default |
| ---------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------- |
| node\_ip   | The DNS hostname or IP address of the Rubrik cluster. By defeault, the module will attempt to read this value from the rubrik\_cdm\_node\_ip environment variable. If this environment variable is not present it will need to be manually specified here or in the \`provider' parameter.                   |         |
| password   | The password used to authenticate the connection to the Rubrik cluster. By defeault, the module will attempt to read this value from the rubrik\_cdm\_password environment variable. If this environment variable is not present it will need to be manually specified here or in the \`provider' parameter. |         |
| username   | The username used to authenticate the connection to the Rubrik cluster. By defeault, the module will attempt to read this value from the rubrik\_cdm\_username environment variable. If this environment variable is not present it will need to be manually specified here or in the \`provider' parameter. |         |
| api\_token | The api token used to authenticate the connection to the Rubrik cluster. By defeault, the module will attempt to read this value from the rubrik\_cdm\_token environment variable. If this environment variable is not present it will need to be manually specified here or in the \`provider' parameter.   |         |
| provider   | Convenience method that allows all connection arguments (`node_ip',`username', \`password') to be passed as a dict object. By default, the module will attempt to read these parameters from the rubrik\_cdm\_node\_ip, rubrik\_cdm\_username, and rubrik\_cdm\_password environment variables.              |         |

| Note: The `username` and `password` must be supplied together and may not be provided if the `api_token` variable is present |
| ---------------------------------------------------------------------------------------------------------------------------- |

### Module Specific

| Name                    | Description                                                                                                  | Default | Type   | Choices                  | Mandatory | Aliases     |
| ----------------------- | ------------------------------------------------------------------------------------------------------------ | ------- | ------ | ------------------------ | --------- | ----------- |
| backup\_hidden\_folders | Include or exclude hidden folders inside locally-mounted remote file systems from backups.                   | False   | Bool   |                          |           |             |
| exclude                 | The full paths or wildcards that define the objects to exclude from the Fileset backup.                      | \[]     | list   |                          |           |             |
| exclude\_exception      | The full paths or wildcards that define the objects that are exempt from the excludes variables.             | \[]     | list   |                          |           |             |
| fileset\_name           | The name of the Fileset you wish to assign to the Linux, Unix or Windows host.                               |         | string |                          | true      |             |
| follow\_network\_shares | Include or exclude locally-mounted remote file systems from backups.                                         | False   | bool   |                          |           |             |
| hostname                | The hostname or IP Address of the physical host you wish to associate to the Fileset.                        |         | string |                          | true      | ip\_address |
| include                 | The full paths or wildcards that define the objects to include in the Fileset backup.                        | \[]     | list   |                          |           |             |
| operating\_system       | The operating system of the physical host you are assigning a Fileset to                                     |         | string | Linux, Windows, UnixLike | true      |             |
| sla\_name               | The name of the SLA Domain to associate with the Fileset.                                                    |         | string |                          |           | sla         |
| timeout                 | The number of seconds to wait to establish a connection the Rubrik cluster before returning a timeout error. | 30      | int    |                          |           |             |

## Return Values

| Name     | Description                                                                                       | Returned                                       | Type   |
| -------- | ------------------------------------------------------------------------------------------------- | ---------------------------------------------- | ------ |
| response | The full API response for POST /v1/host.                                                          | success                                        | dict   |
| response | A "No changed require" message when the physical host is already connected to the Rubrik cluster. | When the module idempotent check is succesful. | string |
