Skip to content

Commit c62e2fb

Browse files
committed
Fix variable precedence
Defining `ssh_config` in your inventory did not take precedence over the default defined in vars because of commit 000e104. This commit fixes that oversight by renaming the defaults to `ssh_config_default` and importing that when called via the `defaults/main.yml: ssh_config`.
1 parent d864ac8 commit c62e2fb

File tree

7 files changed

+14
-6
lines changed

7 files changed

+14
-6
lines changed

CHANGELOG.md

+8
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
<a name="1.4.2"></a>
2+
### 1.4.2 (2022-05-12)
3+
4+
#### Bug Fixes
5+
6+
* resolve issue with ssh_config variable precedence
7+
8+
19
<a name="1.4.1"></a>
210
### 1.4.1 ()
311

defaults/main.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020

2121
# variable fallback defaults
2222
# usually overridden from Play or distro specific vars file
23-
ssh_config: {}
23+
ssh_config: "{{ ssh_config_default }}"
2424
ssh_packages: []
2525
ssh_service: sshd
2626

vars/debian/bullseye.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ ssh_packages:
66

77
ssh_service: ssh
88

9-
ssh_config:
9+
ssh_config_default:
1010
Include: /etc/ssh/sshd_config.d/*.conf
1111
ChallengeResponseAuthentication: "no"
1212
UsePAM: "yes"

vars/openbsd.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ ssh_service: sshd
44

55
sshd_config_group: 'wheel'
66

7-
ssh_config:
7+
ssh_config_default:
88
PermitRootLogin: "no"
99
AuthorizedKeysFile: .ssh/authorized_keys
1010
Subsystem: sftp /usr/libexec/sftp-server

vars/ubuntu/bionic.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ ssh_packages:
55

66
ssh_service: ssh
77

8-
ssh_config:
8+
ssh_config_default:
99
Port: "{{ ssh_port }}"
1010
ListenAddress: "{{ ssh_listen_address }}"
1111
PermitRootLogin: "{{ ssh_permit_root_login }}"

vars/ubuntu/trusty.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ ssh_packages:
55

66
ssh_service: ssh
77

8-
ssh_config:
8+
ssh_config_default:
99
Port: "{{ ssh_port }}"
1010
Protocol: "{{ ssh_protocol }}"
1111
ListenAddress: "{{ ssh_listen_address }}"

vars/ubuntu/xenial.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ ssh_packages:
55

66
ssh_service: ssh
77

8-
ssh_config:
8+
ssh_config_default:
99
Port: "{{ ssh_port }}"
1010
Protocol: "{{ ssh_protocol }}"
1111
ListenAddress: "{{ ssh_listen_address }}"

0 commit comments

Comments
 (0)