Merge "Ensure that sshd is installed"

This commit is contained in:
Zuul
2026-03-07 10:12:34 +00:00
committed by Gerrit Code Review
2 changed files with 19 additions and 3 deletions

View File

@@ -17,6 +17,15 @@
ansible.builtin.include_vars:
file: "{{ ssh_keypairs_method ~ '_keypair.yml' }}"
- name: Ensure that openssh is installed
vars:
_sshd_service_package:
redhat: openssh-server
debian: openssh-server
ansible.builtin.package:
name: "{{ _sshd_service_package[ansible_facts['os_family'] | lower] }}"
state: present
- name: Create keypairs
when: ssh_keypairs_create_keys | bool
block:

View File

@@ -13,11 +13,18 @@
# See the License for the specific language governing permissions and
# limitations under the License.
- name: Ensure trusted CA directory is present
- name: Ensure required directories are present
ansible.builtin.file:
path: "/etc/ssh/trusted_ca.d"
path: "{{ item.path }}"
state: directory
mode: "0700"
mode: "{{ item.mode }}"
owner: root
group: root
loop:
- path: "/etc/ssh/trusted_ca.d"
mode: "0700"
- path: "/etc/ssh/sshd_config.d/"
mode: "0755"
- name: Slurp up SSH CA certificates from keypair setup host ({{ ssh_keypairs_setup_host }})
delegate_to: "{{ ssh_keypairs_setup_host }}"