diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 8531d67..1403923 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -49,7 +49,7 @@ repos: - id: antsibull-changelog-lint-changelog-yaml - repo: https://github.com/ansible/ansible-lint - rev: v6.20.3 + rev: v6.21.0 hooks: - id: ansible-lint name: ansible-lint diff --git a/plugins/inventory/hcloud.py b/plugins/inventory/hcloud.py index 050f9c5..e4710b8 100644 --- a/plugins/inventory/hcloud.py +++ b/plugins/inventory/hcloud.py @@ -84,16 +84,7 @@ DOCUMENTATION = r""" """ EXAMPLES = r""" -# Minimal example. `HCLOUD_TOKEN` is exposed in environment. plugin: hcloud - -# Example with templated token, e.g. provided through extra vars. -plugin: hcloud -token: "{{ hetzner_apitoken }}" - -# Example with locations, types, status and token -plugin: hcloud -token: foobar locations: - nbg1 types: @@ -104,7 +95,6 @@ status: # Group by a location with prefix e.g. "hcloud_location_nbg1" # and image_os_flavor without prefix and separator e.g. "ubuntu" # and status with prefix e.g. "server_status_running" -plugin: hcloud keyed_groups: - key: location prefix: hcloud_location diff --git a/plugins/modules/hcloud_certificate.py b/plugins/modules/hcloud_certificate.py index 4de25ad..1d001b8 100644 --- a/plugins/modules/hcloud_certificate.py +++ b/plugins/modules/hcloud_certificate.py @@ -70,18 +70,18 @@ EXAMPLES = """ - name: Create a basic certificate hetzner.hcloud.hcloud_certificate: name: my-certificate - certificate: "ssh-rsa AAAjjk76kgf...Xt" - private_key: "ssh-rsa AAAjjk76kgf...Xt" + certificate: ssh-rsa AAAjjk76kgf...Xt + private_key: ssh-rsa AAAjjk76kgf...Xt state: present - name: Create a certificate with labels hetzner.hcloud.hcloud_certificate: name: my-certificate - certificate: "ssh-rsa AAAjjk76kgf...Xt" - private_key: "ssh-rsa AAAjjk76kgf...Xt" + certificate: ssh-rsa AAAjjk76kgf...Xt + private_key: ssh-rsa AAAjjk76kgf...Xt labels: - key: value - mylabel: 123 + key: value + mylabel: 123 state: present - name: Ensure the certificate is absent (remove if needed) diff --git a/plugins/modules/hcloud_firewall.py b/plugins/modules/hcloud_firewall.py index f2ee2c0..ebc22f5 100644 --- a/plugins/modules/hcloud_firewall.py +++ b/plugins/modules/hcloud_firewall.py @@ -88,20 +88,20 @@ EXAMPLES = """ hetzner.hcloud.hcloud_firewall: name: my-firewall rules: - - direction: in - protocol: icmp - source_ips: - - 0.0.0.0/0 - - ::/0 - description: allow icmp in + - direction: in + protocol: icmp + source_ips: + - 0.0.0.0/0 + - ::/0 + description: allow icmp in state: present - name: Create a firewall with labels hetzner.hcloud.hcloud_firewall: name: my-firewall labels: - key: value - mylabel: 123 + key: value + mylabel: 123 state: present - name: Ensure the firewall is absent (remove if needed) diff --git a/plugins/modules/hcloud_load_balancer.py b/plugins/modules/hcloud_load_balancer.py index 639ebfe..afe90e3 100644 --- a/plugins/modules/hcloud_load_balancer.py +++ b/plugins/modules/hcloud_load_balancer.py @@ -81,7 +81,6 @@ EXAMPLES = """ hetzner.hcloud.hcloud_load_balancer: name: my-Load Balancer state: absent - """ RETURN = """ diff --git a/plugins/modules/hcloud_placement_group.py b/plugins/modules/hcloud_placement_group.py index c9dcc8a..b1390d4 100644 --- a/plugins/modules/hcloud_placement_group.py +++ b/plugins/modules/hcloud_placement_group.py @@ -62,8 +62,8 @@ EXAMPLES = """ name: my-placement-group type: spread labels: - key: value - mylabel: 123 + key: value + mylabel: 123 state: present - name: Ensure the placement group is absent (remove if needed) diff --git a/plugins/modules/hcloud_primary_ip_info.py b/plugins/modules/hcloud_primary_ip_info.py index ff52e7a..ae4234c 100644 --- a/plugins/modules/hcloud_primary_ip_info.py +++ b/plugins/modules/hcloud_primary_ip_info.py @@ -59,7 +59,6 @@ EXAMPLES = """ - name: Print the gathered infos debug: var: output - """ RETURN = """ diff --git a/plugins/modules/hcloud_server.py b/plugins/modules/hcloud_server.py index 7c80734..4b5d861 100644 --- a/plugins/modules/hcloud_server.py +++ b/plugins/modules/hcloud_server.py @@ -216,13 +216,13 @@ EXAMPLES = """ hetzner.hcloud.hcloud_server: name: my-server placement_group: my-placement-group - force: True + force: true state: present - name: Remove server from placement group hetzner.hcloud.hcloud_server: name: my-server - placement_group: null + placement_group: state: present - name: Add server with private network only diff --git a/plugins/modules/hcloud_server_network.py b/plugins/modules/hcloud_server_network.py index 61e68c2..1dd485c 100644 --- a/plugins/modules/hcloud_server_network.py +++ b/plugins/modules/hcloud_server_network.py @@ -72,8 +72,8 @@ EXAMPLES = """ server: my-server ip: 10.0.0.1 alias_ips: - - 10.1.0.1 - - 10.2.0.1 + - 10.1.0.1 + - 10.2.0.1 state: present - name: Ensure the server network is absent (remove if needed) diff --git a/plugins/modules/hcloud_ssh_key.py b/plugins/modules/hcloud_ssh_key.py index 2e77b77..fa7effd 100644 --- a/plugins/modules/hcloud_ssh_key.py +++ b/plugins/modules/hcloud_ssh_key.py @@ -57,16 +57,16 @@ EXAMPLES = """ - name: Create a basic ssh_key hetzner.hcloud.hcloud_ssh_key: name: my-ssh_key - public_key: "ssh-rsa AAAjjk76kgf...Xt" + public_key: ssh-rsa AAAjjk76kgf...Xt state: present - name: Create a ssh_key with labels hetzner.hcloud.hcloud_ssh_key: name: my-ssh_key - public_key: "ssh-rsa AAAjjk76kgf...Xt" + public_key: ssh-rsa AAAjjk76kgf...Xt labels: - key: value - mylabel: 123 + key: value + mylabel: 123 state: present - name: Ensure the ssh_key is absent (remove if needed)