From: David Galloway Date: Fri, 16 Nov 2018 20:48:42 +0000 (-0500) Subject: testnode: Support RHEL8 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=f017760a3b70e16b524bf579476fbef69b7b58da;p=ceph-cm-ansible.git testnode: Support RHEL8 Signed-off-by: David Galloway --- diff --git a/roles/testnode/tasks/main.yml b/roles/testnode/tasks/main.yml index 1caf54a..f830a4b 100644 --- a/roles/testnode/tasks/main.yml +++ b/roles/testnode/tasks/main.yml @@ -31,7 +31,7 @@ - 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 @@ -95,6 +95,9 @@ - import_tasks: cpan.yml tags: - cpan + when: + - ansible_os_family != "RedHat" + - ansible_distribution_major_version != 8 # configure ntp - import_tasks: ntp.yml diff --git a/roles/testnode/tasks/yum/packages.yml b/roles/testnode/tasks/yum/packages.yml index abd3dae..8b8eb93 100644 --- a/roles/testnode/tasks/yum/packages.yml +++ b/roles/testnode/tasks/yum/packages.yml @@ -1,14 +1,20 @@ --- # 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 @@ -25,7 +31,7 @@ - remove-ceph - name: Ensure ceph packages are not present. - yum: + package: name: "{{ item }}" state: absent with_items: "{{ ceph_packages_to_remove }}" @@ -33,7 +39,7 @@ - remove-ceph - name: Ensure ceph dependency packages are not present. - yum: + package: name: "{{ item }}" state: absent with_items: "{{ ceph_dependency_packages_to_remove }}" @@ -42,14 +48,14 @@ - 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 @@ -57,14 +63,14 @@ 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 }}" diff --git a/roles/testnode/tasks/zap_disks.yml b/roles/testnode/tasks/zap_disks.yml index 924fc2d..6c319ce 100644 --- a/roles/testnode/tasks/zap_disks.yml +++ b/roles/testnode/tasks/zap_disks.yml @@ -13,7 +13,7 @@ when: ansible_os_family == "Debian" - name: Make sure rpm dependencies are installed - yum: + package: name: "{{ item }}" state: present with_items: diff --git a/roles/testnode/templates/ssh/sshd_config_redhat_8 b/roles/testnode/templates/ssh/sshd_config_redhat_8 new file mode 100644 index 0000000..087d4c7 --- /dev/null +++ b/roles/testnode/templates/ssh/sshd_config_redhat_8 @@ -0,0 +1,38 @@ +# {{ 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 diff --git a/roles/testnode/vars/dnf_systems.yml b/roles/testnode/vars/dnf_systems.yml new file mode 120000 index 0000000..3eacc96 --- /dev/null +++ b/roles/testnode/vars/dnf_systems.yml @@ -0,0 +1 @@ +yum_systems.yml \ No newline at end of file diff --git a/roles/testnode/vars/redhat_8.yml b/roles/testnode/vars/redhat_8.yml new file mode 100644 index 0000000..0f74ec1 --- /dev/null +++ b/roles/testnode/vars/redhat_8.yml @@ -0,0 +1,36 @@ +--- +# 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