Add default SSH port variable

This commit is contained in:
Wojciech Kozlowski 2018-12-16 11:21:37 +00:00
parent af346c5220
commit b0a6f1cd28
4 changed files with 7 additions and 6 deletions

View File

@ -9,7 +9,4 @@
# appropriate entries to /etc/hosts. # appropriate entries to /etc/hosts.
[server] [server]
loki loki
[vm]
mimir

View File

@ -9,7 +9,7 @@
pre_tasks: pre_tasks:
- name: Use default SSH port - name: Use default SSH port
set_fact: set_fact:
ansible_port: 22 ansible_port: "{{ default_ssh_port }}"
tasks: tasks:
- name: Install python2 - name: Install python2

View File

@ -13,6 +13,10 @@ ansible_become_pass:
# temporarily reset to the default SSH port. # temporarily reset to the default SSH port.
ssh_port: ssh_port:
# The default SSH port. Usually 22, but can be different if you're using port
# forwarding.
default_ssh_port:
# GitLab # GitLab
gitlab_ssh_port: gitlab_ssh_port:

View File

@ -9,7 +9,7 @@
pre_tasks: pre_tasks:
- name: Use default SSH port - name: Use default SSH port
set_fact: set_fact:
ansible_port: 22 ansible_port: "{{ default_ssh_port }}"
tasks: tasks:
- name: Copy sshd config - name: Copy sshd config