Skip to content

Commit

Permalink
Merge pull request #3 from solutionDrive/add-gitlab
Browse files Browse the repository at this point in the history
Changes the way of adding keys to a more generic one
  • Loading branch information
sd-lueckel authored Jun 14, 2019
2 parents 35decc5 + 7ead516 commit 5453c95
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 21 deletions.
12 changes: 9 additions & 3 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@ deployment_enable_git: yes

deployment_name_of_toran_auth_file: 'auth.json'

deployment_bitbucket_public_host_key: "bitbucket.org ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAubiN81eDcafrgMeLzaFPsw2kNvEcqTKl/VqLat/MaB33pZy0y3rJZtnqwR2qOOvbwKZYKiEO1O6VqNEBxKvJJelCq0dTXWT5pbO2gDXC6h6QDXCaHo6pOHGPUy+YBaGQRGuSusMEASYiWunYN0vCAI8QaXnWMXNMdFP3jHAJH0eDsoiGnLPBlBp4TNm6rYI74nMzgz3B9IikW4WVK+dc8KZJZWYjAuORU3jc1c/NPskD2ASinf8v3xnfXeukU0sJ5N6m5E8VLjObPEO+mN2t/FZTMZLiFqPWc/ALSqnMnnhwrNi2rbfg/rd/IpL8Le3pSBne8+seeFVBoGqzHM9yXw=="
deployment_github_public_host_key: "github.com ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAq2A7hRGmdnm9tUDbO9IDSwBK6TbQa+PXYPCPy6rbTrTtw7PHkccKrpp0yVhp5HdEIcKr6pLlVDBfOLX9QUsyCOV0wzfjIJNlGEYsdlLJizHhbn2mUjvSAHQqZETYP81eFzLQNnPHt4EVVUh7VfDESU84KezmD5QlWpXLmvU31/yMf+Se8xhHTvKSCZIFImWwoG6mbUoWf9nzpIoaSjB+weqqUUmpaaasXVal72J+UX2B+2RPW3RcT0eOzQgqlJL3RKrTJvdsjE3JEAvGq3lGHSZXy28G3skua2SmVi/w4yCE6gbODqnTWlg7+wC604ydGXA8VJiS5ap43JXiUFFAaQ=="
deployment_packagist_public_host_key: "packagist.org ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC3Sr1qq0PlqtH1MKLHX4KhF0wEaM3EccFb08o9w4H/sN+KfEzV+Brdcb5k2pBYiwL025F4iQYVdFA9Cmh7rjYSahW7Z2OHjnx7xu2mVqymVCrqzkrjzDT0BGlYBRoUNrbXOZ3RJ5UUeZP3oRcHfBjKp5zI4heNSTMeeOPvQVT89aAq019blEFfi0e4necgEDOPWfwGmbMaY5CzaL5Pec2N47yE1wTGCbBXGhARLGqFyee+B8hNQGLvmFNMKIHIdKzEVnHN1XQ2ffTcsJUMOUBkJpdfk9GWSosbA7fM8MQNZzsEIXQcMauWTeHwnxG9Sni4v6oHAMNejh7Ip4OgSRyB"
deployment_public_host_keys:
- "bitbucket.org ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAubiN81eDcafrgMeLzaFPsw2kNvEcqTKl/VqLat/MaB33pZy0y3rJZtnqwR2qOOvbwKZYKiEO1O6VqNEBxKvJJelCq0dTXWT5pbO2gDXC6h6QDXCaHo6pOHGPUy+YBaGQRGuSusMEASYiWunYN0vCAI8QaXnWMXNMdFP3jHAJH0eDsoiGnLPBlBp4TNm6rYI74nMzgz3B9IikW4WVK+dc8KZJZWYjAuORU3jc1c/NPskD2ASinf8v3xnfXeukU0sJ5N6m5E8VLjObPEO+mN2t/FZTMZLiFqPWc/ALSqnMnnhwrNi2rbfg/rd/IpL8Le3pSBne8+seeFVBoGqzHM9yXw=="
- "github.com ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAq2A7hRGmdnm9tUDbO9IDSwBK6TbQa+PXYPCPy6rbTrTtw7PHkccKrpp0yVhp5HdEIcKr6pLlVDBfOLX9QUsyCOV0wzfjIJNlGEYsdlLJizHhbn2mUjvSAHQqZETYP81eFzLQNnPHt4EVVUh7VfDESU84KezmD5QlWpXLmvU31/yMf+Se8xhHTvKSCZIFImWwoG6mbUoWf9nzpIoaSjB+weqqUUmpaaasXVal72J+UX2B+2RPW3RcT0eOzQgqlJL3RKrTJvdsjE3JEAvGq3lGHSZXy28G3skua2SmVi/w4yCE6gbODqnTWlg7+wC604ydGXA8VJiS5ap43JXiUFFAaQ=="
- "packagist.org ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBAmz0lT2W6Is7RZcHK3+2gPc6AAwF1sd+j6ix/7M+Wpj+UMbg0kiIaAYxHU3qG6waEsmuOeeSlQwjnX+YDTq7Uo="
- "packagist.org ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDKR9niRK6AL4USh0B7R5ucZE0T9zuH4eeWFlT4kth3h2958Ic/pbJFg6wW5JfunJzjdj7XgrHqvHuISnXOU1bTVR1GUYghbkrvvipbBf4pjjOUap8dbVTD8yV/Melj1YYXG0DD8Db3wFZlMahEwWB1LOW/2LUENC4hPFVlxe3sP908xt1+NyOK4lmSNAUD5Jv6rAuogYH/nmpw1VLj7WGRk0xs82/0Qx21JT18Gnn/ITDTUo/aQU6EOePhlIPkcqla68LTH1hgoFt27mXoyix7QOd8R/D047vmWTTpy1uu94hwyT/uOkMHjo9Hu3vnDZdgMOqwK0aSgpAy19pwK5HB"
- "packagist.org ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDqj2LxecLdNJZpfNpKcTetVaMHizGgY45dNhkV9Bxq7"
- "gitlab.com ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCsj2bNKTBSpIYDEGk9KxsGh3mySTRgMtXL583qmBpzeQ+jqCMRgBqB98u3z++J1sKlXHWfM9dyhSevkMwSbhoR8XIq/U0tCNyokEi/ueaBMCvbcTHhO7FcwzY92WK4Yt0aGROY5qX2UKSeOvuP4D6TPqKF1onrSzH9bx9XUf2lEdWT/ia1NEKjunUqu1xOB/StKDHMoX4/OKyIzuS0q/T1zOATthvasJFoPrAjkohTyaDUz2LN5JoH839hViyEG82yB+MjcFV5MU3N1l1QL3cVUCh93xSaua1N85qivl+siMkPGbO5xR/En4iEY6K2XPASUEMaieWVNTRCtJ4S8H+9"
- "gitlab.com ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBFSMqzJeV9rUzU4kWitGjeR4PWSa29SPqJ1fVkhtj3Hw9xjLVXVYrU9QlYWrOLXBpQ6KWjbjTDTdDkoohFzgbEY="
- "gitlab.com ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAfuCHKVTjquxvt6CM6tdG4SLp1Btn/nOeHHE5UOzRdf"
21 changes: 3 additions & 18 deletions tasks/known_hosts.yml
Original file line number Diff line number Diff line change
@@ -1,24 +1,9 @@
---
- name: Add bitbucket.org to global known_hosts
- name: Add keys to global known_hosts
lineinfile:
path: "{{ deployment_global_ssh_known_hosts_file }}"
line: "{{ deployment_bitbucket_public_host_key }}"
create: yes
mode: 0644
state: present

- name: Add packagist.org to global known_hosts
lineinfile:
path: "{{ deployment_global_ssh_known_hosts_file }}"
line: "{{ deployment_packagist_public_host_key }}"
create: yes
mode: 0644
state: present

- name: Add github.com to global known_hosts
lineinfile:
path: "{{ deployment_global_ssh_known_hosts_file }}"
line: "{{ deployment_github_public_host_key }}"
line: "{{ item }}"
create: yes
mode: 0644
state: present
with_items: "{{ deployment_public_host_keys }}"

0 comments on commit 5453c95

Please sign in to comment.