mirror of
https://github.com/trailofbits/algo.git
synced 2025-07-25 06:53:00 +02:00
33 lines
961 B
YAML
33 lines
961 B
YAML
---
|
|
- name: Build python virtual environment
|
|
ansible.builtin.import_tasks: venv.yml
|
|
|
|
- name: Include prompts
|
|
ansible.builtin.import_tasks: prompts.yml
|
|
|
|
- name: Set facts
|
|
ansible.builtin.set_fact:
|
|
stackscript: |
|
|
{{ lookup('template', 'files/cloud-init/base.sh') }}
|
|
mkdir -p /var/lib/cloud/data/ || true
|
|
touch /var/lib/cloud/data/result.json
|
|
|
|
- name: Creating an instance...
|
|
community.general.linode_v4:
|
|
access_token: "{{ algo_linode_token }}"
|
|
label: "{{ algo_server_name }}"
|
|
state: present
|
|
region: "{{ algo_linode_region }}"
|
|
image: "{{ cloud_providers.linode.image }}"
|
|
type: "{{ cloud_providers.linode.type }}"
|
|
authorized_keys: "{{ public_key }}"
|
|
stackscript_data: |
|
|
{{ stackscript }}
|
|
register: _linode
|
|
|
|
- name: Set facts
|
|
ansible.builtin.set_fact:
|
|
cloud_instance_ip: "{{ _linode.instance.ipv4[0] }}"
|
|
ansible_ssh_user: algo
|
|
ansible_ssh_port: "{{ ssh_port }}"
|
|
cloudinit: true
|