# memset_server_info – Retrieve server information

New in version 2.8.

- Synopsis
- Parameters
- Notes
- Examples
- Return Values
- Status

## Synopsis

- Retrieve server information.
- This module was called `memset_server_facts` before Ansible 2.9. The usage did not change.

Aliases: memset_server_facts

## Parameters

Parameter | Choices/Defaults | Comments
--- | --- | ---
api_key - / required |  | The API key obtained from the Memset control panel.
name - / required |  | The server product name (i.e. `testyaa1`).

## Notes

Note

- An API key generated via the Memset customer control panel is needed with the following minimum scope - server.info.

## Examples

    - name: get details for testyaa1
      memset_server_info:
        name: testyaa1
        api_key: 5eb86c9896ab03919abcf03857163741
      delegate_to: localhost

## Return Values

Common return values are documented here, the following are the fields unique to this module:

Key | Returned | Description
--- | --- | ---
memset_api complex | always | Info from the Memset API
| backups boolean | always | Whether this server has a backup service. Sample: True
| control_panel string | always | Whether the server has a control panel (i.e. cPanel). Sample: cpanel
| data_zone string | always | The data zone the server is in. Sample: Memset Public Cloud
| expiry_date string | always | Current expiry date of the server. Sample: 2018-08-10

firewall_rule_group
dictionary

always

Details about the firewall group this server is in.
Sample:
{'default_outbound_policy': 'RETURN', 'name': 'testyaa-fw1', 'nickname': 'testyaa cPanel rules', 'notes': '', 'public': False, 'rules': {'51d7db54d39c3544ef7c48baa0b9944f': {'action': 'ACCEPT', 'comment': '', 'dest_ip6s': 'any', 'dest_ips': 'any', 'dest_ports': 'any', 'direction': 'Inbound', 'ip_version': 'any', 'ordering': 2, 'protocols': 'icmp', 'rule_group_name': 'testyaa-fw1', 'rule_id': '51d7db54d39c3544ef7c48baa0b9944f', 'source_ip6s': 'any', 'source_ips': 'any', 'source_ports': 'any'}}}

| firewall_type string | always | The type of firewall the server has (i.e. self-managed, managed). Sample: managed
| host_name string | always | The server's hostname. Sample: testyaa1.miniserver.com
| ignore_monitoring_off boolean | always | When true, Memset won't remind the customer that monitoring is disabled. Sample: True
| ips list | always | List of dictionaries of all IP addresses assigned to the server. Sample: [{'address': '1.2.3.4', 'bytes_in_today': 1000.0, 'bytes_in_yesterday': 2000.0, 'bytes_out_today': 1000.0, 'bytes_out_yesterday': 2000.0}]
| monitor boolean | always | Whether the server has monitoring enabled. Sample: True
| monitoring_level string | always | The server's monitoring level (i.e. basic). Sample: basic
| name string | always | Server name (same as the service name). Sample: testyaa1
| network_zones list | always | The network zone(s) the server is in. Sample: ['reading']
| nickname string | always | Customer-set nickname for the server. Sample: database server
| no_auto_reboot boolean | always | Whether or not to reboot the server if monitoring detects it down. Sample: True
| no_nrpe boolean | always | Whether Memset should use NRPE to monitor this server. Sample: True
| os string | always | The server's Operating System. Sample: debian_stretch_64
| penetration_patrol string | always | Intrusion detection support level for this server. Sample: managed
| penetration_patrol_alert_level integer | always | The alert level at which notifications are sent. Sample: 10
| primary_ip string | always | Server's primary IP. Sample: 1.2.3.4
| renewal_price_amount string | always | Renewal cost for the server. Sample: 30.00
| renewal_price_currency string | always | Currency for renewal payments. Sample: GBP
| renewal_price_vat string | always | VAT rate for renewal payments Sample: 20
| start_date string | always | Server's start date. Sample: 2013-04-10
| status string | always | Current status of the server (i.e. live, onhold). Sample: LIVE
| support_level string | always | Support level included with the server. Sample: managed
| type string | always | What this server is (i.e. dedicated) Sample: miniserver
| vlans dictionary | always | Dictionary of tagged and untagged VLANs this server is in. Sample: {'tagged': [], 'untagged': ['testyaa-vlan1', 'testyaa-vlan2']}
| vulnscan string | always | Vulnerability scanning level. Sample: basic

## Status

- This module is not guaranteed to have a backwards compatible interface. [preview]
- This module is maintained by the Ansible Community. [community]

### Authors

- Simon Weald (@glitchcrab)

Hint

If you notice any issues in this documentation, you can edit this document to improve it.