Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optimize sshd compatibility with other roles #186

Open
alexschomb opened this issue Jan 17, 2022 · 1 comment
Open

Optimize sshd compatibility with other roles #186

alexschomb opened this issue Jan 17, 2022 · 1 comment

Comments

@alexschomb
Copy link

Hi,

Thanks for your great Ansible role, which is really helpful in centralizing/backup the configuration of multiple PVE server hosts in cooperation with PBS for VM backups.

You already stated in the README that compatibility of the sshd_config rules could be conflicting with other Ansible roles or applications managing the same file. Turns out that this is especially true for the popular geerlingguy/ansible-role-security, which conflicts with the Match block created by your role. As a result, I made use of pve_manage_ssh: false and manually moved the initial Match block from /etc/ssh/sshd_config to /etc/ssh/sshd_config.d/proxmox-cluster.conf, making it fully compatible to geerlingguy`s and other applications changes to sshd_config. Wouldn't it be a better practice for your role to write changes to this (or a similar named) separate config file? Should be a simple fix here:

dest: /etc/ssh/sshd_config

The conflicting tasks of geerlingguy/ansible-role-security can be found in /tasks/ssh.yml#L7

@lae
Copy link
Owner

lae commented Jan 17, 2022

I guess that would work. We'd need to change the task to a copy or template task, and probably also keep the blockinfile task but with state: absent for removing it from existing clusters.

(Sorry about the deleted message, was reading all over the place and missed one line)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants