refactor: restructured project for higher-utility naming practices and optimized data structures for variables
This commit is contained in:
20
playbooks/init.yml
Normal file
20
playbooks/init.yml
Normal file
@@ -0,0 +1,20 @@
|
||||
---
|
||||
- name: Initialize VPS
|
||||
hosts: localhost
|
||||
connection: local
|
||||
tasks:
|
||||
- name: Create a VPS using Linode
|
||||
when: vps_service.type == "linode"
|
||||
community.general.linode_v4:
|
||||
access_token: "{{ vps_service.api_key }}"
|
||||
authorized_keys: "{{ vps_service.ssh_authorized_keys }}"
|
||||
image: linode/debian13
|
||||
label: sukaato
|
||||
private_ip: true
|
||||
region: "{{ vps_service.region }}"
|
||||
root_pass: "{{ vps_service.password }}"
|
||||
tags: "{{ hostvars[inventory_hostname].keywords }}"
|
||||
state: "{{ 'present' if vps_service.exists else 'absent' }}"
|
||||
tags:
|
||||
- vps_step
|
||||
- linode_step
|
||||
Reference in New Issue
Block a user