]> git.apps.os.sepia.ceph.com Git - ceph-cm-ansible.git/commitdiff
Updates to rhel 6.5 provisioning.
authorAndrew Schoen <aschoen@redhat.com>
Tue, 24 Mar 2015 16:37:20 +0000 (09:37 -0700)
committerAndrew Schoen <aschoen@redhat.com>
Wed, 25 Mar 2015 18:27:52 +0000 (11:27 -0700)
This is a collection of things I had to change while testing out this
playbook against a rhel 6.5 machine.

Signed-off-by: Andrew Schoen <aschoen@redhat.com>
roles/common/handlers/main.yml
roles/common/tasks/main.yml
roles/common/tasks/redhat/rhel_7.0.yml
roles/common/tasks/setup-redhat.yml
roles/common/templates/ssh/sshd_config_rhel_6.5
roles/common/vars/empty.yml [new file with mode: 0644]
roles/common/vars/rhel_6.yml
roles/common/vars/rhel_7.0.yml
roles/common/vars/rhel_7.1.yml
roles/common/vars/rhel_7.yml

index 2ac205f8cba2a2524024c4703428a815af9383fa..1075b74816bda1cfd450bacb2f1cef6f82458e75 100644 (file)
@@ -11,5 +11,5 @@
 
 - name: start nfs-server
   service:
-    name: nfs-server
+    name: "{{ nfs_service }}"
     state: started 
index 44c1474a72fed2ec0928ed0a5a86617c1c049669..de7ff22befc573827a29fb1270a5e64518ba371c 100644 (file)
@@ -4,9 +4,6 @@
   tags:
     - vars
 
-# configure pip to use our mirror
-- include: pip.yml
-
 - name: Set a high max open files limit for the teuthology user.
   template:
     src: security_limits.conf
index a1c09e09d7960778d80209c074664f57e28de6c2..4358598bb9bfa29a11623d5f6b7c5eb86125aea7 100644 (file)
@@ -4,6 +4,11 @@
     name: firewalld
     state: stopped
 
+- name: Set mode on /etc/fuse.conf
+  file:
+    path: /etc/fuse.conf
+    mode: 0644
+
 - name: Get hostname.
   command: hostname
   register: existing_hostname
index ee7bd9bc3da1b33cfbbda799301cf11395c9f241..459c8165d9a9b9e160568b971b19b90a4abd5442 100644 (file)
@@ -1,9 +1,14 @@
 ---
 - name: Including major version specific variables.
   include_vars: "rhel_{{ ansible_distribution_major_version }}.yml"
+  tags:
+    - vars
 
 - name: Including version specific variables.
-  include_vars: "rhel_{{ ansible_distribution_version }}.yml"
+  include_vars: "{{ item }}"
+  with_first_found:
+    - "rhel_{{ ansible_distribution_version }}.yml"
+    - empty.yml
   tags:
     - vars
 
     owner: root
     mode: 0644
 
-- name: Set mode on /etc/fuse.conf
-  file:
-    path: /etc/fuse.conf
-    mode: 0644
-
 - name: Add the teuthology user to group kvm
   user:
     name: "{{ teuthology_user }}"
index 2f6a07346a7023a0ccda7501c03d08c7a2b7b25b..c4a0b70e1acace883871af43e8c197d878d375a3 100755 (executable)
@@ -1,9 +1,9 @@
+#      {{ ansible_managed }}
 #      $OpenBSD: sshd_config,v 1.80 2008/07/02 02:24:18 djm 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:/bin:/usr/bin
 Protocol 2
 
 SyslogFacility AUTHPRIV
diff --git a/roles/common/vars/empty.yml b/roles/common/vars/empty.yml
new file mode 100644 (file)
index 0000000..85479d1
--- /dev/null
@@ -0,0 +1,12 @@
+---
+# This is empty on purpose.  Used as the last line
+# when using include_vars with with_first_found when
+# the var file might not exist.
+#
+# For example, there is not rhel 6.5 var file because it's not needed
+# but there is a rhel 7.0 var file that we need to include. Using this empty.yml
+# as the last line in with_first_found allows include_vars to work across different distros
+# where the var file might not be needed.
+#
+# Maybe related issue:
+# https://github.com/ansible/ansible/issues/10000
index 815824f6391fdb20bbf31931da82e96350c154cc..95896ee4e072f904c4c71f299e309962ee321c30 100644 (file)
@@ -3,46 +3,46 @@
 
 common_yum_repos:
   epel:
-    name: "{{ yum_repo_prefix }} Extra Packages for Enterprise Linux 6 - $basearch"
+    name: "Extra Packages for Enterprise Linux 6 - $basearch"
     baseurl: http://apt-mirror.front.sepia.ceph.com/epel6/
     enabled: 1
     gpgcheck: 0
   rhel6:
-    name: "{{ yum_repo_prefix }} My Red Hat Enterprise Linux Server $releasever - $basearch"
+    name: "My Red Hat Enterprise Linux Server $releasever - $basearch"
     baseurl: http://apt-mirror.front.sepia.ceph.com/rhel6repo-server/
     enabled: 1
     gpgcheck: 0
   rhel6-server-optional:
-    name: "{{ yum_repo_prefix }} My Red Hat Enterprise Linux Optional $releasever - $basearch" 
-    baseurl: http://apt-mirror.front.sepia.ceph.com/rhel6repo-server-optional 
+    name: "My Red Hat Enterprise Linux Optional $releasever - $basearch"
+    baseurl: http://apt-mirror.front.sepia.ceph.com/rhel6repo-server-optional
     enabled: 1
     gpgcheck: 0
   centos6-qemu-ceph:
-    name: "{{ yum_repo_prefix }} Cent OS 6 Local Qemu Repo" 
+    name: "Cent OS 6 Local Qemu Repo"
     baseurl: http://ceph.com/packages/ceph-extras/rpm/rhel6/x86_64/
     enabled: 1
     gpgcheck: 0
     priority: 2
   lab-extras:
-    name: "{{ yum_repo_prefix }} lab-extras" 
+    name: "lab-extras"
     baseurl: http://apt-mirror.front.sepia.ceph.com/lab-extras/rhel6/
     enabled: 1
     gpgcheck: 0
     priority: 2
   centos6-fcgi-ceph:
-    name: "{{ yum_repo_prefix }} Cent OS 6 Local fastcgi Repo" 
+    name: "Cent OS 6 Local fastcgi Repo"
     baseurl: http://gitbuilder.ceph.com/mod_fastcgi-rpm-rhel6-x86_64-basic/ref/master/
     enabled: 1
     gpgcheck: 0
     priority: 2
   centos6-misc-ceph:
-    name: "{{ yum_repo_prefix }} Cent OS 6 Local misc Repo" 
+    name: "Cent OS 6 Local misc Repo"
     baseurl: http://apt-mirror.front.sepia.ceph.com/misc-rpms/
     enabled: 1
     gpgcheck: 0
     priority: 2
   centos6-ceph:
-    name: "{{ yum_repo_prefix }} Cent OS 6 Local ceph Repo" 
+    name: "Cent OS 6 Local ceph Repo"
     baseurl: http://ceph.com/rpm-cuttlefish/rhel6/x86_64/
     enabled: 1
     gpgcheck: 0
@@ -86,7 +86,7 @@ packages:
   - dbench
   - bonnie++
   - fuse-sshfs
-  - fsstress 
+  - fsstress
   - iozone
   ###
   # used by the xfstests tasks
@@ -128,9 +128,14 @@ packages:
   - junit4
   ###
   # tgt & open-iscsi
+  # installing these 2 packages makes this playbook
+  # not idempotent on rhel 6.x
+  # see: http://tracker.ceph.com/issues/11216
   - scsi-target-utils
   - iscsi-initiator-utils
   # for disk/etc monitoring
   - smartmontools
   # for nfs
   - nfs-utils
+
+nfs_service: nfs
index 6b37dbd7650ec9ece7e7dd0c21c0929d1e78d64b..aa0c212324965e2ce034e73598601aead18dee71 100644 (file)
@@ -1,12 +1,12 @@
 ---
 yum_repos:
   rhel-7-repo:
-    name: "{{ yum_repo_prefix }} My Red Hat Enterprise Linux $releasever - $basearch"
+    name: My Red Hat Enterprise Linux $releasever - $basearch
     baseurl: http://apt-mirror.front.sepia.ceph.com/rhel7repo/server
     enabled: 1
     gpgcheck: 0
   rhel-7-optional:
-    name: "{{ yum_repo_prefix }} My Red Hat Enterprise Linux $releasever - $basearch"
+    name: My Red Hat Enterprise Linux $releasever - $basearch
     baseurl: http://apt-mirror.front.sepia.ceph.com/rhel7repo/server-optional
     enabled: 1
     gpgcheck: 0
index 8f79b97852d0e1065cd7e38b044e2b8cd059d08e..702c205d9ab72fba0a42249320229753a4ab5255 100644 (file)
@@ -1,12 +1,12 @@
 ---
 yum_repos:
   rhel-7.1-beta-repo:
-    name: "{{ yum_repo_prefix }} My Red Hat Enterprise Linux $releasever - $basearch"
+    name: My Red Hat Enterprise Linux $releasever - $basearch
     baseurl: http://apt-mirror.front.sepia.ceph.com/rhel7.1-beta-repo/server/
     enabled: 1
     gpgcheck: 0
   rhel-7.1-beta-optional:
-    name: "{{ yum_repo_prefix }} My Red Hat Enterprise Linux $releasever - $basearch"
+    name: My Red Hat Enterprise Linux $releasever - $basearch
     baseurl: http://apt-mirror.front.sepia.ceph.com/rhel7.1-beta-repo/server-optional/
     enabled: 1
     gpgcheck: 0
index ecfd90a2a6bb9dc26706742f99ce0bc2157eb167..4d1ceff347a8be735d550b433ca9ae239494a647 100644 (file)
@@ -3,23 +3,23 @@
 
 common_yum_repos:
   epel:
-    name: "{{ yum_repo_prefix }} Extra Packages for Enterprise Linux 6 - $basearch"
+    name: "Extra Packages for Enterprise Linux 7 - $basearch"
     baseurl: http://apt-mirror.front.sepia.ceph.com/epel7/
     enabled: 1
     gpgcheck: 0
   rhel-7-extras:
-    name: "{{ yum_repo_prefix }} My Red Hat Enterprise Linux $releasever - $basearch"
+    name: "My Red Hat Enterprise Linux $releasever - $basearch"
     baseurl: http://apt-mirror.front.sepia.ceph.com/rhel7repo/extras
     enabled: 1
     gpgcheck: 0
   rhel-7-fcgi-ceph:
-    name: "{{ yum_repo_prefix }} RHEL 7 Local fastcgi Repo"
+    name: "RHEL 7 Local fastcgi Repo"
     baseurl: http://gitbuilder.ceph.com/mod_fastcgi-rpm-rhel7-x86_64-basic/ref/master/
     enabled: 1
     gpgcheck: 0
     priority: 2
   lab-extras:
-    name: "{{ yum_repo_prefix }} lab-extras"
+    name: "lab-extras"
     baseurl: http://apt-mirror.front.sepia.ceph.com/lab-extras/rhel7/
     enabled: 1
     gpgcheck: 0
@@ -85,3 +85,5 @@ packages:
   - iscsi-initiator-utils
   - smartmontools
   - nfs-utils
+
+nfs_service: nfs-server