From 84da4f79bdcd91479db4c18aece925dbbb60b61c Mon Sep 17 00:00:00 2001 From: Kevin Thompson Date: Thu, 7 Aug 2025 22:01:51 -0500 Subject: [PATCH] idk what to even say anymore --- inventory/linode.yaml | 39 ++++++++++++++++----------------------- 1 file changed, 16 insertions(+), 23 deletions(-) diff --git a/inventory/linode.yaml b/inventory/linode.yaml index 0ccad76..e0a3b3c 100644 --- a/inventory/linode.yaml +++ b/inventory/linode.yaml @@ -1,52 +1,45 @@ --- -plugin: community.general.linode +plugin: linode.cloud.inventory +access_token: "{{ lookup('env', 'LINODE_API_TOKEN') }}" -# Your Linode API token (will be injected by AWX credential) -api_token: "{{ linode_api_token | default(lookup('env', 'LINODE_API_TOKEN')) }}" - -# Use Linode labels as hostnames (exactly what you wanted!) +# Basic settings strict: false -# Create groups based on Linode attributes +# Create groups by Linode attributes keyed_groups: - # Group by region: linode_region_us_southeast + # Group by region: region_us_southeast - key: region - prefix: linode_region + prefix: region separator: "_" - # Group by instance type: linode_type_g6_standard_6 + # Group by type: type_g6_standard_6 - key: type - prefix: linode_type + prefix: type separator: "_" - # Group by status: linode_status_running - - key: status - prefix: linode_status + # Group by status: status_running + - key: status + prefix: status separator: "_" - # Group by tags: linode_tag_k3s, linode_tag_debian, etc. + # Group by each tag: tag_k3s, tag_debian, etc. - key: tags - prefix: linode_tag + prefix: tag separator: "_" # Set host variables compose: - # Use primary IPv4 as ansible_host ansible_host: ipv4[0] ansible_user: phlux + ansible_ssh_common_args: '-o StrictHostKeyChecking=no' - # Add convenience variables for your tags + # Add convenience booleans is_k3s: "'k3s' in (tags | default([]))" is_control_plane: "'control-plane' in (tags | default([]))" is_worker_node: "'worker-node' in (tags | default([]))" is_debian: "'Debian' in (tags | default([]))" is_ubuntu: "'Ubuntu' in (tags | default([]))" -# Optional: Only include running instances +# Only include running instances filters: - status == "running" - -# Cache settings (optional but recommended) -cache: true -cache_plugin: memory -cache_timeout: 300