-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Inject dev ssh keys when a variable is set
Currently, developers that want to connect to the CI VM to verify what is happening with the environment need to make many "hoops" to connect to that host. That feature will be helpful for developers of sf-operator project to inject pub keys just by setting: inject_dev_ssh_keys: true in the zuul.d job definition. Change-Id: I234cb597d61c87abe884ecc7826419f954ed1158
- Loading branch information
Showing
2 changed files
with
16 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
--- | ||
- hosts: all | ||
tasks: | ||
- name: Set dev ssh keys | ||
when: inject_dev_ssh_keys | default(false) | ||
block: | ||
- name: Clone SF devs pub keys repo | ||
ansible.builtin.git: | ||
repo: https://softwarefactory-project.io/r/SF_devs_public_keys | ||
dest: SF_devs_public_keys | ||
|
||
- name: Copy content to authorized keys | ||
ansible.builtin.shell: | | ||
cat SF_devs_public_keys/authorized_keys >> ~/.ssh/authorized_keys |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters