---
title: Docker Network Info
slug: homologacao-atmosphere/docker-network-info
description: Learn about Docker networks and how to use the Docker API version 1.21 to inspect networks. This document covers parameters, examples, and the values returned by the API, including the network's existence and its current state. Explore how to obtain netwo
docTags: 
createdAt: 2021-03-18T12:22:25.000Z
---

## Resumo

- Retorna informações sobre as redes Docker.

## Requisitos

- Docker API >= 1.21

## Parâmetros

| **Parâmetro**                    | **Tipo** | **Escolhas \| Valor Padrão** | **Comentários**                                                                                                                 |
| -------------------------------- | -------- | ---------------------------- | ------------------------------------------------------------------------------------------------------------------------------- |
| name - *required         &#x20;* | string   |                              | O nome da rede a ser inspecionada. Ao identificar uma rede existente, o nome pode ser um nome ou uma ID de rede longa ou curta. |



## Exemplos

```yaml
# Exemplo: Obtenha informações da rede
  docker_network_info:
    name: network_teste
  register: result

# Exemplo: A rede existe?
  debug:
    msg: "A rede {{ 'existe' if result.exists else 'não existe' }}"

# Exemplo: Printar informações sobre a rede
  debug:
    var: result.network
  when: result.exists
```



## Valores retornados

| **Chave** | **Tipo**   | **Retornado quando** | **Descrição**                                                                                                               |
| --------- | ---------- | -------------------- | --------------------------------------------------------------------------------------------------------------------------- |
| exists    | boolean    | Sempre               | Retorna se a rede existe.                                                                                                   |
| network   | dictionary | Sempre               | Fatos que representam o estado atual da rede. Corresponde à saída de inspeção do docker. Será nenhum se a rede não existir. |






