feat: ansible proxy jump
This commit is contained in:
@@ -36,3 +36,31 @@
|
||||
content: "{{ terraform_apply.outputs }}"
|
||||
dest: ../dist/terraform_outputs.yml
|
||||
mode: '0755'
|
||||
|
||||
- name: Update SSH config.
|
||||
hosts: localhost
|
||||
gather_facts: false
|
||||
tags: hosts
|
||||
vars_files:
|
||||
- ../vault.yml
|
||||
- ../dist/terraform_outputs.yml
|
||||
- ../variables.yml
|
||||
tasks:
|
||||
- name: Add Gitea host.
|
||||
community.general.ssh_config:
|
||||
host: "{{ variables.gitea_host }}"
|
||||
hostname: "{{ server_ip.value }}"
|
||||
remote_user: root
|
||||
forward_agent: true
|
||||
user: user
|
||||
port: 2222
|
||||
identity_file: "{{ secret.private_gitea_ssh_key_path }}"
|
||||
|
||||
- name: Add Runner host.
|
||||
community.general.ssh_config:
|
||||
host: "{{ variables.runner_host }}"
|
||||
remote_user: root
|
||||
user: user
|
||||
identity_file: "{{ secret.private_runner_ssh_key_path }}"
|
||||
proxyjump: "{{ variables.gitea_host }}"
|
||||
hostname: 10.0.10.17
|
||||
|
||||
Reference in New Issue
Block a user