Skip to content

Commit

Permalink
Small ssh fix
Browse files Browse the repository at this point in the history
  • Loading branch information
disposab1e committed Mar 24, 2021
1 parent 297dabd commit 8ebca74
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
12 changes: 12 additions & 0 deletions ansible/lab/roles/ssh/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
size: 2048
become_user: lab

- name: Prepare authorized key
command: chmod +x /home/lab/okd-lab/.ssh
become_user: lab

- name: Prepare authorized key
authorized_key:
user: lab
Expand All @@ -13,6 +17,14 @@
key: "{{ lookup('file', '/home/lab/okd-lab/.ssh/id_rsa.pub') }}"
become_user: lab

- name: Prepare authorized key
authorized_key:
user: lab
state: present
path: ~/okd-lab/.ssh/authorized_keys
key: "{{ lookup('file', '/home/lab/okd-lab/.ssh/id_rsa.pub') }}"
become_user: lab

- name: Prepare ssh config
copy:
src: config
Expand Down
2 changes: 0 additions & 2 deletions terraform/bastion/bastion.tf
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,6 @@ resource "libvirt_domain" "bastion" {
host = "10.0.0.2"
}
inline = [
"rm ~/.ssh/config",
"rm ~/.ssh/key-prepare.sh",
"chmod u=rw,go= ~/.ssh/id_rsa ~/.ssh/id_rsa.pub"
]
}
Expand Down

0 comments on commit 8ebca74

Please sign in to comment.