Files
alexpolo1 a3b8959ca9 Initial collection structure
Migrated from legacy playbook repo into Ansible collection format:

Roles (171 total):
- common: 44 roles (fact gathering, SSH setup, utilities)
- configuration: 32 roles (system config, networking, satellite)
- provisioning: 16 roles (VMware, Azure, physical server deployment)
- security: 15 roles (OpenSCAP hardening, certificates, AD integration)
- monitoring: 12 roles (Zabbix, logging agents, metrics)
- networking: 12 roles (DNS, DHCP, network interfaces)
- satellite: 4 roles (Pulp/Satellite management)
- misc: 36 roles (various utilities)

Playbooks (159 total):
- provisioning: 14 playbooks
- azure: 13 playbooks
- configuration: 22 playbooks
- maintenance: 10 playbooks
- security: 10 playbooks
- monitoring: 9 playbooks
- vcenter: 6 playbooks
- networking: 7 playbooks
- misc: 65 playbooks
2026-06-27 21:48:22 +02:00

47 lines
1.1 KiB
YAML

---
# tasks file for check-ssh-services
- name: Collect service facts
ansible.builtin.service_facts:
- name: Check if sshd is active
ansible.builtin.command: systemctl is-active sshd
register: sshd_active
failed_when: false
changed_when: false
- name: Show sshd active state
ansible.builtin.debug:
msg: "sshd is {{ sshd_active.stdout }}"
- name: Check if sssd is active
ansible.builtin.command: systemctl is-active sssd
register: sssd_active
failed_when: false
changed_when: false
- name: Show sssd active state
ansible.builtin.debug:
msg: "sssd is {{ sssd_active.stdout }}"
- name: Get last 10 logs for sshd
ansible.builtin.command: journalctl -u sshd -n 10 --no-pager
register: sshd_logs
failed_when: false
changed_when: false
- name: Show last sshd logs
ansible.builtin.debug:
var: sshd_logs.stdout_lines
- name: Get last 10 logs for sssd
ansible.builtin.command: journalctl -u sssd -n 10 --no-pager
register: sssd_logs
failed_when: false
changed_when: false
- name: Show last sssd logs
ansible.builtin.debug:
var: sssd_logs.stdout_lines