mirror of
https://github.com/trailofbits/algo.git
synced 2025-09-04 11:03:12 +02:00
removed unnecessary local_action's
This commit is contained in:
parent
50a961c6d2
commit
0c150cef4b
3 changed files with 14 additions and 10 deletions
|
@ -1,16 +1,23 @@
|
||||||
---
|
---
|
||||||
|
|
||||||
- name: Generate the SSH private key
|
- name: Generate the SSH private key
|
||||||
local_action: shell echo -e 'n' | ssh-keygen -b 2048 -C {{ SSH_keys.comment }} -t rsa -f {{ SSH_keys.private }} -q -N ""
|
shell: >
|
||||||
|
echo -e 'n' |
|
||||||
|
ssh-keygen -b 2048 -C {{ SSH_keys.comment }}
|
||||||
|
-t rsa -f {{ SSH_keys.private }} -q -N ""
|
||||||
args:
|
args:
|
||||||
creates: "{{ SSH_keys.private }}"
|
creates: "{{ SSH_keys.private }}"
|
||||||
|
|
||||||
- name: Generate the SSH public key
|
- name: Generate the SSH public key
|
||||||
local_action: shell echo `ssh-keygen -y -f {{ SSH_keys.private }}` {{ SSH_keys.comment }} > {{ SSH_keys.public }}
|
shell: >
|
||||||
|
echo `ssh-keygen -y -f {{ SSH_keys.private }}` {{ SSH_keys.comment }}
|
||||||
|
> {{ SSH_keys.public }}
|
||||||
changed_when: false
|
changed_when: false
|
||||||
|
|
||||||
- name: Change mode for the SSH private key
|
- name: Change mode for the SSH private key
|
||||||
local_action: file path={{ SSH_keys.private }} mode=0600
|
file:
|
||||||
|
path: "{{ SSH_keys.private }}"
|
||||||
|
mode: 0600
|
||||||
|
|
||||||
- name: Ensure the dynamic inventory exists
|
- name: Ensure the dynamic inventory exists
|
||||||
blockinfile:
|
blockinfile:
|
||||||
|
|
|
@ -1,14 +1,12 @@
|
||||||
---
|
---
|
||||||
|
|
||||||
- name: Ensure the local ssh directory is exist
|
- name: Ensure the local ssh directory is exist
|
||||||
local_action:
|
file:
|
||||||
module: file
|
path: ~/.ssh/
|
||||||
path: "~/.ssh/"
|
|
||||||
state: directory
|
state: directory
|
||||||
|
|
||||||
- name: Copy the algo ssh key to the local ssh directory
|
- name: Copy the algo ssh key to the local ssh directory
|
||||||
local_action:
|
copy:
|
||||||
module: copy
|
|
||||||
src: "{{ SSH_keys.private }}"
|
src: "{{ SSH_keys.private }}"
|
||||||
dest: ~/.ssh/algo.pem
|
dest: ~/.ssh/algo.pem
|
||||||
mode: '0600'
|
mode: '0600'
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
---
|
---
|
||||||
|
|
||||||
- name: Wait until SSH becomes ready...
|
- name: Wait until SSH becomes ready...
|
||||||
local_action:
|
wait_for:
|
||||||
module: wait_for
|
|
||||||
port: 22
|
port: 22
|
||||||
host: "{{ cloud_instance_ip }}"
|
host: "{{ cloud_instance_ip }}"
|
||||||
search_regex: "OpenSSH"
|
search_regex: "OpenSSH"
|
||||||
|
|
Loading…
Add table
Reference in a new issue