Skip to content

Instantly share code, notes, and snippets.

@simonLeary42
Created October 7, 2025 13:10
Show Gist options
  • Select an option

  • Save simonLeary42/81e44819a87d3f2e6404be4af2ac8457 to your computer and use it in GitHub Desktop.

Select an option

Save simonLeary42/81e44819a87d3f2e6404be4af2ac8457 to your computer and use it in GitHub Desktop.
- name: add gitlab to /root/.ssh/known_hosts
ansible.builtin.known_hosts:
name: "{{ (item | split())[0] }}"
key: "{{ item }}"
loop: "{{ lookup('pipe', 'ssh-keyscan gitlab.rc.umass.edu gitlab.unity.rc.umass.edu') | split('\n') | reject('match', '^#') }}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment