---
title: Rancher Service Action
slug: homologacao-atmosphere/rancher-service-action
description: Learn how to use the "rancher_service_action" command to perform actions on Rancher services. This document outlines the required parameters, including Rancher API URL, access key, secret key, project ID, service ID, and the default action ("restart"). Di
docTags: 
createdAt: 2021-03-25T20:02:33.000Z
---

## Resumo

- Executar uma ação em serviços do Rancher.

## Parâmetros

| **Parâmetro**            | **Tipo** | **Escolhas \| Valor Padrão** | **Comentários**                 |
| ------------------------ | -------- | ---------------------------- | ------------------------------- |
| url - *required*         | string   |                              | Url da API Rancher.             |
| acces\_key - *required*  | string   |                              | Chave de acesso da API Rancher. |
| secret\_key - *required* | string   |                              | Rancher Secret.                 |
| project\_id - *required* | string   |                              | O id do projeto.                |
| service\_id - *required* | string   |                              | O id do serviço.                |
| action                   | string   | - "restart"<br />(default)   | A ação a ser realizada.         |

## Exemplos

```yaml
# Exemplo: Restartar serviço Rancher
- rancher_service_action:
    url: http://url/api-version
    access_key: access_key
    secret_key: secret_key
    project_id: 1a5
    service_id: 1s8
```

