mirror of https://github.com/trailofbits/algo
parent
9d3a65b555
commit
1cca3b1093
@ -0,0 +1,23 @@
|
||||
---
|
||||
|
||||
- name: Ensure the local ssh directory is exist
|
||||
local_action:
|
||||
module: file
|
||||
path: "~/.ssh/"
|
||||
state: directory
|
||||
|
||||
- name: Copy the algo ssh key to the local ssh directory
|
||||
local_action:
|
||||
module: copy
|
||||
src: configs/algo.pem
|
||||
dest: ~/.ssh/algo.pem
|
||||
mode: '0600'
|
||||
|
||||
- name: Configure the local ssh config
|
||||
blockinfile:
|
||||
dest: "~/.ssh/config"
|
||||
marker: "# {mark} ALGO MANAGED BLOCK {{ cloud_instance_ip|default(server_ip) }}"
|
||||
insertbefore: BOF
|
||||
block: |
|
||||
Host {{ cloud_instance_ip|default(server_ip) }}
|
||||
IdentityFile ~/.ssh/algo.pem
|
@ -0,0 +1,17 @@
|
||||
---
|
||||
|
||||
- name: Wait until SSH becomes ready...
|
||||
local_action:
|
||||
module: wait_for
|
||||
port: 22
|
||||
host: "{{ cloud_instance_ip }}"
|
||||
search_regex: "OpenSSH"
|
||||
delay: 10
|
||||
timeout: 320
|
||||
state: present
|
||||
|
||||
- name: A short pause, in order to be sure the instance is ready
|
||||
pause:
|
||||
seconds: 10
|
||||
|
||||
- include: local_ssh.yml
|
Loading…
Reference in New Issue