]> git.apps.os.sepia.ceph.com Git - ceph-cm-ansible.git/commitdiff
testnode: Support RHEL8
authorDavid Galloway <dgallowa@redhat.com>
Fri, 16 Nov 2018 20:48:42 +0000 (15:48 -0500)
committerDavid Galloway <dgallowa@redhat.com>
Tue, 20 Nov 2018 16:11:11 +0000 (11:11 -0500)
Signed-off-by: David Galloway <dgallowa@redhat.com>
roles/testnode/tasks/main.yml
roles/testnode/tasks/yum/packages.yml
roles/testnode/tasks/zap_disks.yml
roles/testnode/templates/ssh/sshd_config_redhat_8 [new file with mode: 0644]
roles/testnode/vars/dnf_systems.yml [new symlink]
roles/testnode/vars/redhat_8.yml [new file with mode: 0644]

index 1caf54a6eb8c3d9b7992c05c7bdaeb38f36ea716..f830a4b56cd6bee261fbf14f87305c008e4209fd 100644 (file)
@@ -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
index abd3dae83e3220aaa9bd6fd9460e490394b2e688..8b8eb93440b2c6978d34e6ad480af4c5d7b57026 100644 (file)
@@ -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 }}"
 
 
 - 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 }}"
index 924fc2d0d381c9a8085ff05c0addbdcab98c358c..6c319cecc4fab3726834aa5447a75e726414bd9f 100644 (file)
@@ -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 (file)
index 0000000..087d4c7
--- /dev/null
@@ -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 (symlink)
index 0000000..3eacc96
--- /dev/null
@@ -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 (file)
index 0000000..0f74ec1
--- /dev/null
@@ -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