Change inventory yaml from role into inventory yaml
This commit is contained in:
7
inventory/linode_inventory.yml
Normal file
7
inventory/linode_inventory.yml
Normal file
@@ -0,0 +1,7 @@
|
||||
plugin: linode.cloud.linode
|
||||
api_token: '{{ lookup("env", "ANSIBLE_PASSWORD") }}'
|
||||
regions:
|
||||
- us-east
|
||||
instance_tags:
|
||||
- production
|
||||
- k3s
|
@@ -1,8 +0,0 @@
|
||||
---
|
||||
- name: Gather Linode instances into dynamic inventory
|
||||
hosts: localhost
|
||||
gather_facts: false
|
||||
tasks:
|
||||
- name: Include Linode Inventory Role
|
||||
import_role:
|
||||
name: inventory/linode_inventory
|
@@ -1,7 +0,0 @@
|
||||
---
|
||||
- name: Load Linode instances into inventory
|
||||
add_host:
|
||||
name: "{{ item.label }}"
|
||||
ansible_host: "{{ item.ipv4[] }}"
|
||||
groups: linode_instances
|
||||
loop: "{{ lookup('linode.cloud.linode', wantlist=True) }}"
|
Reference in New Issue
Block a user