File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -131,16 +131,23 @@ jobs:
131131
132132 - name : Configure Control Machine
133133 run : |
134+ mkdir -p ~/.ssh
135+ chmod 700 ~/.ssh
136+ cat <<-EOH >> ~/.ssh/config
137+ Host *
138+ ControlMaster auto
139+ ControlPath /tmp/ssh_mux_%h_%p_%r
140+ ControlPersist 60m
141+ EOH
142+
134143 ANSIBLE_USER="${USER}"
135144 ANSIBLE_CONNECTION="ansible_connection=local"
136145 if [ "${IS_MANUAL_DEPLOYMENT}" == "true" ]; then
137146 ANSIBLE_USER="ubuntu"
138147 ANSIBLE_CONNECTION=""
139148 export ANSIBLE_HOST_KEY_CHECKING=false
140149
141- mkdir -p ~/.ssh && \
142- chmod 700 ~/.ssh && \
143- echo "${{ secrets.INFRASTRUCTURE_DEPLOYMENT_KEY }}" > ~/.ssh/id_ed25519 && \
150+ echo "${{ secrets.INFRASTRUCTURE_DEPLOYMENT_KEY }}" > ~/.ssh/id_ed25519
144151 chmod 600 ~/.ssh/id_ed25519
145152 fi
146153
Original file line number Diff line number Diff line change @@ -8,7 +8,6 @@ timeout = 10
88connection = ssh
99pipelining = True
1010host_key_checking = False
11- ssh_args = -o ControlMaster=auto -o ControlPersist=60s -o ForwardAgent=yes
1211fact_caching = jsonfile
1312fact_caching_connection = /tmp/ansible_facts_cache
1413fact_caching_timeout = 86400
@@ -17,3 +16,6 @@ module_defaults:
1716 gather_subset:
1817 - '!all'
1918 - 'min'
19+
20+ [ssh_connection]
21+ ssh_args = -o ControlMaster=auto -o ControlPersist=60m -o ControlPath=/tmp/ssh_mux_%h_%p_%r -o ForwardAgent=yes
You can’t perform that action at this time.
0 commit comments