mirror of
https://github.com/trailofbits/algo
synced 2024-11-04 06:00:21 +00:00
25 lines
594 B
YAML
25 lines
594 B
YAML
---
|
|
|
|
- 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
|
|
create: yes
|
|
block: |
|
|
Host {{ cloud_instance_ip|default(server_ip) }}
|
|
IdentityFile ~/.ssh/algo.pem
|