---
title: "NIOS Service"
canonical: "https://docs.infoblox.com/space/niosmodulesansible/44624169/NIOS%20Service"
format: markdown
---
Use the `nios_restartservices` module to restart Grid services. If you invoke this module without specifying any parameter, it restarts all services on the Default restart groups in NIOS.

The following table describes the parameters you can define in the `nios_restartservices` module:

| **Parameter** | **Required/Optional** | **Description** |
| --- | --- | --- |
| `groups` | Optional | Specifies the list of the service restart groups to restart the services. |
| `members` | Optional | Specifies the list of the Grid members to restart. |
| `mode` | Optional | Specifies the restart method to use when restarting services at the Grid level. You can select `GROUPED`, `SEQUENTIAL`, or `SIMULTANEOUS`. |
| `restart_option` | Optional | Controls whether services are restarted unconditionally or when needed. The default value is `RESTART_IF_NEEDED`. |
| `services` | Optional | Specifies the list of services to which the restart is applicable.  
The default value is `ALL`. |
| `provider` | Required | Defines the details of the connection:<br>- `host`: The DNS host name or IP address to connect to the remote instance of NIOS.
- `username`: The user name to use for authenticating the connection to the remote instance.
- `password`: The password to use for authenticating the connection to the remote instance.<br>For information on additional fields you can define, see <span style="color: #172b4d">the list of subparameters in the </span><span style="color: #172b4d">*[NIOS Modules for Ansible Collections](https://infoblox-docs.atlassian.net/wiki/spaces/niosmodulesansible/pages/44525470)*</span><span style="color: #172b4d"> topic.</span> |
| `connection` | Required | The `nios_restartservices` module must be run locally. |

## <span style="color: #000000">Examples</span>

`name: Restart all grid services if needed.`  
`infoblox.nios_modules.nios_restartservices:`  
`  provider:`  
`    host: <nios_hostname_or_hostip>`  
`    username: <nios_username>`  
`    password: <nios_password>`  
`connection: local`


`name: Restart DNS service if needed.`  
`infoblox.nios_modules.nios_restartservices:`  
`  services:`  
`    - DNS`  
`  provider:`  
`    host: <nios_hostname_or_hostip>`  
`    username: <nios_username>`  
`    password: <nios_password>`  
`connection: local`