mirror of
https://github.com/trailofbits/algo.git
synced 2025-08-02 19:03:04 +02:00
Add Scaleway
This commit is contained in:
parent
37275e2ae3
commit
d1c21d62b7
3 changed files with 31 additions and 2 deletions
|
@ -11,7 +11,6 @@ users:
|
||||||
|
|
||||||
### Advanced users only below this line ###
|
### Advanced users only below this line ###
|
||||||
|
|
||||||
# Changing the port not supported by Scaleway, the default (22) is always used
|
|
||||||
ssh_port: 4160
|
ssh_port: 4160
|
||||||
|
|
||||||
# Store the PKI in a ram disk. Enabled only if store_pki (retain the PKI) is set to false
|
# Store the PKI in a ram disk. Enabled only if store_pki (retain the PKI) is set to false
|
||||||
|
|
|
@ -21,6 +21,33 @@
|
||||||
{%- endfor -%}]
|
{%- endfor -%}]
|
||||||
|
|
||||||
- name: Create a server
|
- name: Create a server
|
||||||
|
scaleway_compute:
|
||||||
|
name: "{{ algo_server_name }}"
|
||||||
|
enable_ipv6: true
|
||||||
|
public_ip: dynamic
|
||||||
|
boot_type: local
|
||||||
|
state: present
|
||||||
|
image: "{{ images[0] }}"
|
||||||
|
organization: "{{ organization_id }}"
|
||||||
|
region: "{{ algo_region }}"
|
||||||
|
commercial_type: "{{ cloud_providers.scaleway.size }}"
|
||||||
|
wait: true
|
||||||
|
tags:
|
||||||
|
- Environment:Algo
|
||||||
|
- AUTHORIZED_KEY={{ lookup('file', SSH_keys.public)|regex_replace(' ', '_') }}
|
||||||
|
register: scaleway_compute
|
||||||
|
|
||||||
|
- name: Patch the cloud-init
|
||||||
|
uri:
|
||||||
|
url: "https://cp-{{ region }}.scaleway.com/servers/{{ scaleway_compute.msg.id }}/user_data/cloud-init"
|
||||||
|
method: PATCH
|
||||||
|
body: "{{ lookup('template', 'files/cloud-init/base.yml') }}"
|
||||||
|
status_code: 204
|
||||||
|
headers:
|
||||||
|
Content-Type: "text/plain"
|
||||||
|
X-Auth-Token: "{{ algo_scaleway_token }}"
|
||||||
|
|
||||||
|
- name: Start the server
|
||||||
scaleway_compute:
|
scaleway_compute:
|
||||||
name: "{{ algo_server_name }}"
|
name: "{{ algo_server_name }}"
|
||||||
enable_ipv6: true
|
enable_ipv6: true
|
||||||
|
@ -44,4 +71,6 @@
|
||||||
|
|
||||||
- set_fact:
|
- set_fact:
|
||||||
cloud_instance_ip: "{{ algo_instance.msg.public_ip.address }}"
|
cloud_instance_ip: "{{ algo_instance.msg.public_ip.address }}"
|
||||||
ansible_ssh_user: root
|
ansible_ssh_user: algo
|
||||||
|
ansible_ssh_port: "{{ ssh_port }}"
|
||||||
|
cloudinit: true
|
||||||
|
|
|
@ -12,6 +12,7 @@
|
||||||
delay: 10
|
delay: 10
|
||||||
timeout: 600
|
timeout: 600
|
||||||
state: present
|
state: present
|
||||||
|
become: false
|
||||||
when: cloudinit
|
when: cloudinit
|
||||||
|
|
||||||
- block:
|
- block:
|
||||||
|
|
Loading…
Add table
Reference in a new issue