Skip to content
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,13 @@ jobs:
uses: actions/checkout@v5

- name: Initialize CodeQL
uses: github/codeql-action/init@v3
uses: github/codeql-action/init@v4
with:
languages: ${{ matrix.language }}
build-mode: ${{ matrix.build-mode }}
queries: security-and-quality

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
uses: github/codeql-action/analyze@v4
with:
category: "/language:${{matrix.language}}"
2 changes: 1 addition & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Run Documentation Validation
on: pull_request

env:
DEFAULT_PYTHON_VERSION: "3.10"
DEFAULT_PYTHON_VERSION: "3.13"

jobs:
test-templated-docs:
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/integration-tests-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ jobs:
- name: setup python 3
uses: actions/setup-python@v6
with:
python-version: '3.x'
# TODO: Unpin minor version after `ansible` package v13.0.0 releases.
python-version: '3.13'

- name: install ansible dependencies
run: ansible-galaxy collection install amazon.aws:==9.5.0
Expand Down Expand Up @@ -146,7 +147,8 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: '3.x'
# TODO: Unpin minor version after `ansible` package v13.0.0 releases.
python-version: '3.13'

- name: Install Linode CLI
run: |
Expand Down
10 changes: 6 additions & 4 deletions .github/workflows/integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ jobs:

- name: Upload Test Report as Artifact
if: always()
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v5
with:
name: xml-test-reports
if-no-files-found: ignore
Expand All @@ -91,7 +91,8 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: '3.x'
# TODO: Unpin minor version after `ansible` package v13.0.0 releases.
python-version: '3.13'

- name: Install Python dependencies
run: pip3 install requests wheel boto3==1.35.99
Expand All @@ -101,7 +102,7 @@ jobs:
run: mkdir -p tests/output/junit

- name: Download test report
uses: actions/download-artifact@v5
uses: actions/download-artifact@v6
with:
name: xml-test-reports # Specify the artifact name from the 'run-tests' job
path: tests/output/junit
Expand Down Expand Up @@ -176,7 +177,8 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: '3.x'
# TODO: Unpin minor version after `ansible` package v13.0.0 releases.
python-version: '3.13'

- name: Install Linode CLI
run: |
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ jobs:
- name: setup python 3
uses: actions/setup-python@v6
with:
python-version: '3.x'
# TODO: Unpin minor version after `ansible` package v13.0.0 releases.
python-version: '3.13'

- name: install dependencies
run: make deps
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ jobs:
- name: setup python 3
uses: actions/setup-python@v6
with:
python-version: '3.x'
# TODO: Unpin minor version after `ansible` package v13.0.0 releases.
python-version: '3.13'

- name: install dependencies
run: make deps
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [ '3.9','3.10','3.11', '3.12' ]
python-version: [ '3.10','3.11', '3.12', '3.13' ]
defaults:
run:
working-directory: .ansible/collections/ansible_collections/linode/cloud
Expand Down
11 changes: 7 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ gendocs:
mkdir -p $(DOCS_PATH)/modules $(DOCS_PATH)/inventory

DOCS_PATH=$(DOCS_PATH) ./scripts/specdoc_generate.sh
ansible-doc-extractor --template=template/module.rst.j2 $(DOCS_PATH)/inventory plugins/inventory/*.py
ansible-doc-extractor --template=template/module.rst.j2 $(DOCS_PATH)/inventory $(abspath plugins/inventory/*.py)
python3 scripts/render_readme.py $(COLLECTION_VERSION)

# if want to add all the test add the tag --tags never at the end
Expand Down Expand Up @@ -126,11 +126,14 @@ endif
@echo "api_version: $${LINODE_API_VERSION:-$${TEST_API_VERSION:-v4beta}}" >> $(INTEGRATION_CONFIG)
@echo "ca_file: $${LINODE_CA:-$${TEST_API_CA}}" >> $(INTEGRATION_CONFIG)


inject:
@echo "Injecting documentation into source files"
for f in `ls ./plugins/modules/*.py`; do echo "$$f" && ansible-specdoc -j -i $$f; done
ansible-test sanity --test ansible-doc
find ./plugins/modules -maxdepth 1 -name '*.py' -print0 | \
xargs -I {} -0 -P 5 bash -c 'export TARGET="{}"; echo "$$TARGET" && ansible-specdoc -j -i "$$TARGET";'

inject-clean:
@echo "Removing injected documentation from source files"
for f in `ls ./plugins/modules/*.py`; do echo "$$f" && ansible-specdoc -jc -i $$f; done
find ./plugins/modules -maxdepth 1 -name '*.py' -print0 | \
xargs -I {} -0 -P 5 bash -c 'export TARGET="{}"; echo "$$TARGET" && ansible-specdoc -jc -i "$$TARGET";'

12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,10 @@ Name | Description |
[linode.cloud.domain_record](./docs/modules/domain_record.md)|Manage Linode Domain Records.|
[linode.cloud.firewall](./docs/modules/firewall.md)|Manage Linode Firewalls.|
[linode.cloud.firewall_device](./docs/modules/firewall_device.md)|Manage Linode Firewall Devices.|
[linode.cloud.firewall_settings](./docs/modules/firewall_settings.md)|Configure the firewall settings for the account.|
[linode.cloud.image](./docs/modules/image.md)|Manage a Linode Image.|
[linode.cloud.instance](./docs/modules/instance.md)|Manage Linode Instances, Configs, and Disks.|
[linode.cloud.instance_interface_settings](./docs/modules/instance_interface_settings.md)|Create, read, and update the interface settings for a Linode instance.|
[linode.cloud.ip](./docs/modules/ip.md)|Allocates a new IPv4 Address on your Account. The Linode must be configured to support additional addresses - please Open a support ticket requesting additional addresses before attempting allocation.|
[linode.cloud.ip_assign](./docs/modules/ip_assign.md)|Assign IPs to Linodes in a given Region.|
[linode.cloud.ip_rdns](./docs/modules/ip_rdns.md)|Manage a Linode IP address's rDNS.|
Expand Down Expand Up @@ -69,8 +71,11 @@ Name | Description |
[linode.cloud.domain_info](./docs/modules/domain_info.md)|Get info about a Linode Domain.|
[linode.cloud.domain_record_info](./docs/modules/domain_record_info.md)|Get info about a Linode Domain Records.|
[linode.cloud.firewall_info](./docs/modules/firewall_info.md)|Get info about a Linode Firewall.|
[linode.cloud.firewall_settings_info](./docs/modules/firewall_settings_info.md)|Get info about a Linode Firewall Settings.|
[linode.cloud.firewall_template_info](./docs/modules/firewall_template_info.md)|Get info about a Linode Firewall Template.|
[linode.cloud.image_info](./docs/modules/image_info.md)|Get info about a Linode Image.|
[linode.cloud.instance_info](./docs/modules/instance_info.md)|Get info about a Linode Instance.|
[linode.cloud.instance_interface_settings_info](./docs/modules/instance_interface_settings_info.md)|Get the interface settings for a Linode instance.|
[linode.cloud.ip_info](./docs/modules/ip_info.md)|Get info about a Linode IP.|
[linode.cloud.ipv6_range_info](./docs/modules/ipv6_range_info.md)|Get info about a Linode IPv6 range.|
[linode.cloud.lke_cluster_info](./docs/modules/lke_cluster_info.md)|Get info about a Linode LKE cluster.|
Expand Down Expand Up @@ -105,7 +110,9 @@ Name | Description |
[linode.cloud.domain_list](./docs/modules/domain_list.md)|List and filter on Domains.|
[linode.cloud.event_list](./docs/modules/event_list.md)|List and filter on Events.|
[linode.cloud.firewall_list](./docs/modules/firewall_list.md)|List and filter on Firewalls.|
[linode.cloud.firewall_template_list](./docs/modules/firewall_template_list.md)|List and filter on Firewall Templates.|
[linode.cloud.image_list](./docs/modules/image_list.md)|List and filter on Images.|
[linode.cloud.instance_interface_firewall_list](./docs/modules/instance_interface_firewall_list.md)|List and filter on Linode Interface Firewalls.|
[linode.cloud.instance_list](./docs/modules/instance_list.md)|List and filter on Instances.|
[linode.cloud.instance_type_list](./docs/modules/instance_type_list.md)|**NOTE: This module has been deprecated in favor of `type_list`.**|
[linode.cloud.lke_type_list](./docs/modules/lke_type_list.md)|List and filter on LKE Types.|
Expand Down Expand Up @@ -199,6 +206,11 @@ Use-case examples for this collection can be found [here](./examples/README.md).

The following section outlines various information relating to the development of this collection.

### Generating Documentation

This collection's documentation is generated dynamically from the specification defined in each module using
[ansible-specdoc](https://github.com/linode/ansible-specdoc).

### Attaching a Debugger

To quickly and easily attach a debugger to a running module in this collection,
Expand Down
18 changes: 9 additions & 9 deletions docs/inventory/instance.rst
Original file line number Diff line number Diff line change
Expand Up @@ -76,29 +76,29 @@ Parameters


**parent_group (type=str):**
\• parent group for keyed group
\• parent group for keyed group.


**prefix (type=str):**
\• A keyed group name will start with this prefix
\• A keyed group name will start with this prefix.


**separator (type=str, default=_):**
\• separator used to build the keyed group name
\• separator used to build the keyed group name.


**key (type=str):**
\• The key from input dictionary used to generate groups
\• The key from input dictionary used to generate groups.


**default_value (type=str):**
\• The default value when the host variable's value is an empty string.
\• The default value when the host variable's value is :literal:`None` or an empty string.

\• This option is mutually exclusive with :literal:`keyed\_groups[].trailing\_separator`.


**trailing_separator (type=bool, default=True):**
\• Set this option to :literal:`False` to omit the :literal:`keyed\_groups[].separator` after the host variable when the value is an empty string.
\• Set this option to :literal:`false` to omit the :literal:`keyed\_groups[].separator` after the host variable when the value is :literal:`None` or an empty string.

\• This option is mutually exclusive with :literal:`keyed\_groups[].default\_value`.

Expand All @@ -109,13 +109,13 @@ Parameters


**leading_separator (type=boolean, default=True):**
\• Use in conjunction with keyed\_groups.
\• Use in conjunction with :literal:`keyed\_groups`.

\• By default, a keyed group that does not have a prefix or a separator provided will have a name that starts with an underscore.

\• This is because the default prefix is "" and the default separator is "\_".
\• This is because the default prefix is :literal:`""` and the default separator is :literal:`"\_"`.

\• Set this option to False to omit the leading underscore (or other separator) if no prefix is given.
\• Set this option to :literal:`false` to omit the leading underscore (or other separator) if no prefix is given.

\• If the group name is derived from a mapping the separator is still used to concatenate the items.

Expand Down
2 changes: 1 addition & 1 deletion docs/modules/firewall_device.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ Manage Linode Firewall Devices.
|-----------|------|----------|------------------------------------------------------------------------------|
| `firewall_id` | <center>`int`</center> | <center>**Required**</center> | The ID of the Firewall that contains this device. |
| `entity_id` | <center>`int`</center> | <center>**Required**</center> | The ID for this Firewall Device. This will be the ID of the Linode Entity. |
| `entity_type` | <center>`str`</center> | <center>**Required**</center> | The type of Linode Entity. Currently only supports linode and nodebalancer. **(Choices: `linode`, `nodebalancer`)** |
| `entity_type` | <center>`str`</center> | <center>**Required**</center> | The type of Linode Entity. Currently only supports linode, nodebalancer, and interface. **(Choices: `linode`, `nodebalancer`, `interface`)** |
| `state` | <center>`str`</center> | <center>**Required**</center> | The desired state of the target. **(Choices: `present`, `absent`)** |

## Return Values
Expand Down
61 changes: 61 additions & 0 deletions docs/modules/firewall_settings.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# firewall_settings

Configure the firewall settings for the account.

- [Minimum Required Fields](#minimum-required-fields)
- [Examples](#examples)
- [Parameters](#parameters)
- [Return Values](#return-values)

## Minimum Required Fields
| Field | Type | Required | Description |
|-------------|-------|--------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `api_token` | `str` | **Required** | The Linode account personal access token. It is necessary to run the module. <br/>It can be exposed by the environment variable `LINODE_API_TOKEN` instead. <br/>See details in [Usage](https://github.com/linode/ansible_linode?tab=readme-ov-file#usage). |

## Examples

```yaml
- name: Update the default firewall settings
linode.cloud.firewall_settings:
default_firewall_ids:
linode: 123456
nodebalancer: 123456
public_interface: 123456
vpc_interface: 123456
```


## Parameters

| Field | Type | Required | Description |
|-----------|------|----------|------------------------------------------------------------------------------|
| [`default_firewall_ids` (sub-options)](#default_firewall_ids) | <center>`dict`</center> | <center>Optional</center> | The default firewall ID for a `linode`, `nodebalancer`, `public_interface`, or `vpc_interface`. Default firewalls can't be deleted or disabled. **(Updatable)** |
| `state` | <center>`str`</center> | <center>Optional</center> | The desired state of the target. **(Choices: `present`)** |

### default_firewall_ids

| Field | Type | Required | Description |
|-----------|------|----------|------------------------------------------------------------------------------|
| `linode` | <center>`int`</center> | <center>Optional</center> | The Linode's default firewall. |
| `nodebalancer` | <center>`int`</center> | <center>Optional</center> | The NodeBalancer's default firewall. |
| `public_interface` | <center>`int`</center> | <center>Optional</center> | The public interface's default firewall. |
| `vpc_interface` | <center>`int`</center> | <center>Optional</center> | The VPC interface's default firewall. |

## Return Values

- `default_firewall_ids` - The default firewall ID for a `linode`, `nodebalancer`, `public_interface`, or `vpc_interface`. Default firewalls can't be deleted or disabled.

- Sample Response:
```json
{
"default_firewall_ids": {
"linode": 123456,
"nodebalancer": 123456,
"public_interface": 123456,
"vpc_interface": 123456
}
}
```
- See the [Linode API response documentation](https://techdocs.akamai.com/linode-api/reference/put-firewall-settings) for a list of returned fields


40 changes: 40 additions & 0 deletions docs/modules/firewall_settings_info.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# firewall_settings_info

Get info about a Linode Firewall Settings.

- [Minimum Required Fields](#minimum-required-fields)
- [Examples](#examples)
- [Parameters](#parameters)
- [Return Values](#return-values)

## Minimum Required Fields
| Field | Type | Required | Description |
|-------------|-------|--------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `api_token` | `str` | **Required** | The Linode account personal access token. It is necessary to run the module. <br/>It can be exposed by the environment variable `LINODE_API_TOKEN` instead. <br/>See details in [Usage](https://github.com/linode/ansible_linode?tab=readme-ov-file#usage). |

## Examples

```yaml
- name: Update the default firewall settings
linode.cloud.firewall_settings_info: {}
```


## Return Values

- `firewall_settings` - The returned Firewall Settings.

- Sample Response:
```json
{
"default_firewall_ids": {
"linode": 123456,
"nodebalancer": 123456,
"public_interface": 123456,
"vpc_interface": 123456
}
}
```
- See the [Linode API response documentation](https://techdocs.akamai.com/linode-api/reference/get-firewall-settings) for a list of returned fields


Loading
Loading