- name: configure things specific to yum systems
import_tasks: yum_systems.yml
- when: ansible_pkg_mgr == "yum"
+ when: ansible_os_family == "RedHat"
- name: configure things specific to apt systems
import_tasks: apt_systems.yml
- import_tasks: cpan.yml
tags:
- cpan
+ when:
+ - ansible_os_family != "RedHat"
+ - ansible_distribution_major_version != 8
# configure ntp
- import_tasks: ntp.yml
---
# this is needed for the yum-complete-transation command next
- name: Ensure yum_utils is present.
- yum:
+ package:
name: yum-utils
state: present
+ when:
+ - ansible_os_family == "RedHat"
+ - ansible_distribution_major_version <= 7
- name: Removing saved yum transactions
command: yum-complete-transaction --cleanup-only
register: transaction_cleanup
changed_when: "'Cleaning up' in transaction_cleanup.stdout"
+ when:
+ - ansible_os_family == "RedHat"
+ - ansible_distribution_major_version <= 7
- name: Check if ceph-debuginfo is installed
command: rpm -q ceph-debuginfo
- remove-ceph
- name: Ensure ceph packages are not present.
- yum:
+ package:
name: "{{ item }}"
state: absent
with_items: "{{ ceph_packages_to_remove }}"
- remove-ceph
- name: Ensure ceph dependency packages are not present.
- yum:
+ package:
name: "{{ item }}"
state: absent
with_items: "{{ ceph_dependency_packages_to_remove }}"
- name: Install packages
- yum:
+ package:
name: "{{ item }}"
state: present
with_items: "{{ packages }}"
when: packages|length > 0
- name: Install epel packages
- yum:
+ package:
name: "{{ item }}"
state: present
enablerepo: epel
when: epel_packages|length > 0
- name: Remove packages
- yum:
+ package:
name: "{{ item }}"
state: absent
with_items: "{{ packages_to_remove }}"
when: packages_to_remove|length > 0
- name: Upgrade packages
- yum:
+ package:
name: "{{ item }}"
state: latest
with_items: "{{ packages_to_upgrade }}"
when: ansible_os_family == "Debian"
- name: Make sure rpm dependencies are installed
- yum:
+ package:
name: "{{ item }}"
state: present
with_items:
--- /dev/null
+# {{ ansible_managed }}
+# $OpenBSD: sshd_config,v 1.90 2013/05/16 04:09:14 dtucker Exp $
+
+# This is the sshd server system-wide configuration file. See
+# sshd_config(5) for more information.
+
+# This sshd was compiled with PATH=/usr/local/bin:/usr/bin
+
+HostKey /etc/ssh/ssh_host_rsa_key
+HostKey /etc/ssh/ssh_host_ecdsa_key
+
+SyslogFacility AUTHPRIV
+
+AuthorizedKeysFile .ssh/authorized_keys
+
+PasswordAuthentication yes
+
+ChallengeResponseAuthentication no
+
+# GSSAPI options
+GSSAPIAuthentication yes
+GSSAPICleanupCredentials yes
+
+UsePAM yes
+
+X11Forwarding yes
+UsePrivilegeSeparation sandbox # Default for new installations.
+
+# Accept locale-related environment variables
+AcceptEnv LANG LC_CTYPE LC_NUMERIC LC_TIME LC_COLLATE LC_MONETARY LC_MESSAGES
+AcceptEnv LC_PAPER LC_NAME LC_ADDRESS LC_TELEPHONE LC_MEASUREMENT
+AcceptEnv LC_IDENTIFICATION LC_ALL LANGUAGE
+AcceptEnv XMODIFIERS
+
+# override default of no subsystems
+Subsystem sftp /usr/libexec/openssh/sftp-server
+
+MaxSessions 1000
--- /dev/null
+yum_systems.yml
\ No newline at end of file
--- /dev/null
+---
+# vars specific to any rhel 8.x version
+
+common_yum_repos: {}
+
+packages:
+ - '@core'
+ - '@base'
+ - sysstat
+ - libedit
+ - boost-thread
+ - xfsprogs
+ - gdisk
+ - parted
+ - libgcrypt
+ - fuse-libs
+ - openssl
+ - libuuid
+ - attr
+ - ant
+ - lsof
+ - gettext
+ - bc
+ - xfsdump
+ - blktrace
+ - usbredir
+ - libev-devel
+ # for xfstests
+ - ncurses-devel
+ # for s3 tests
+
+epel_packages: []
+
+nfs_service: nfs-server
+
+ntp_service_name: chronyd