]> git.apps.os.sepia.ceph.com Git - ceph-cm-ansible.git/commitdiff
Move packages list into pkg manager specific var file.
authorAndrew Schoen <aschoen@redhat.com>
Thu, 19 Mar 2015 20:02:46 +0000 (15:02 -0500)
committerAndrew Schoen <aschoen@redhat.com>
Tue, 24 Mar 2015 00:18:50 +0000 (17:18 -0700)
We'll need to at least have lists of packages to install for yum vs apt
systems.  Maybe even eventually distro / version specific lists.

I also added in a check to make sure the packages list is defined
because it defaults to [] in defaults/main.yml and the template module
that uses this list will just silently be skipped if packages isn't
defined.

Signed-off-by: Andrew Schoen <aschoen@redhat.com>
roles/common/defaults/main.yml
roles/common/tasks/redhat/packages.yml
roles/common/vars/yum_systems.yml

index eb8f647221f8c9fa7eef4ba9e6442786af5e99ad..4c18529bdc105150f586661982c788071163087f 100644 (file)
@@ -34,64 +34,6 @@ common_yum_repos:
 yum_repos: {}
 
 # list of packages to install
-packages:
-  - yum-plugin-priorities
-  - redhat-lsb
-  - sysstat
-  - gdb
-  - python-configobj
-  - libedit
-  - openssl098e
-  - gperftools-devel
-  - boost-thread
-  - xfsprogs
-  - xfsprogs-devel
-  - gdisk
-  - parted
-  - libgcrypt
-  - cryptopp-devel
-  - cryptopp
-  - fuse
-  - fuse-libs
-  - openssl
-  - libuuid
-  - btrfs-progs
-  - attr
-  - valgrind
-  - python-nose
-  - mpich
-  - ant
-  - dbench
-  - fuse-sshfs
-  - lsof
-  - iozone
-  - libtool
-  - automake
-  - gettext
-  - libuuid-devel
-  - libacl-devel
-  - bc
-  - xfsdump
-  - blktrace
-  - numpy
-  - python-matplotlib
-  - usbredir
-  - genisoimage
-  - qemu-img-rhev-1.5.3-60_ceph.el7.5
-  - qemu-kvm-rhev-1.5.3-60_ceph.el7.5
-  - qemu-kvm-tools-rhev-1.5.3-60_ceph.el7.5
-  - httpd
-  - httpd-devel
-  - httpd-tools
-  - mod_ssl
-  - mod_fastcgi-2.4.7-1.ceph.el7
-  - python-pip
-  - libevent-devel
-  - perl-JSON-XS
-  - perl-XML-Twig
-  - java-1.6.0-openjdk-devel
-  - junit4
-  - scsi-target-utils
-  - iscsi-initiator-utils
-  - smartmontools
-  - nfs-utils
+# packages are defined in the pkg manager
+# specific var files.
+packages: []
index 116e8500ddb48417a8940c9431a682e998760a8f..a8f0f8f7639c55c5658f7850aa5a435d9ab59b4f 100644 (file)
@@ -7,6 +7,18 @@
   tags:
     - remove-ceph
 
+# I added this because when using --tags "packages" the
+# next task will just be skipped because packages == []
+# which is probably an unexpected behavior if you're meaning to
+# install packages.
+- name: Fail the play if the var packages is not defined
+  fail:
+    msg: "The var packages is not defined,
+         perhaps you've forgot to include 'vars' in your
+         tag list if using --tags. Otherwise, check to see
+         if packages needs defining for your specific host."
+  when: packages|length == 0
+
 - name: Install packages
   yum:
     name: "{{ item }}"
index f5a5e961b7a170cf7dcdf2e44e0dc43bee331b0d..4002ef973e499865eaeacbe0eb7a679eb849bcf8 100644 (file)
@@ -1,6 +1,7 @@
 ---
 ntp_service_name: ntpd
 
+# ceph packages that we ensure do not exist
 ceph_packages:
   - ceph
   - ceph-common
@@ -11,3 +12,68 @@ ceph_packages:
   - python-ceph
   - librbd1
   - librados2
+
+# packages to be installed
+# we might need to separate this
+# into distro specific lists at some point
+packages:
+  - yum-plugin-priorities
+  - redhat-lsb
+  - sysstat
+  - gdb
+  - python-configobj
+  - libedit
+  - openssl098e
+  - gperftools-devel
+  - boost-thread
+  - xfsprogs
+  - xfsprogs-devel
+  - gdisk
+  - parted
+  - libgcrypt
+  - cryptopp-devel
+  - cryptopp
+  - fuse
+  - fuse-libs
+  - openssl
+  - libuuid
+  - btrfs-progs
+  - attr
+  - valgrind
+  - python-nose
+  - mpich
+  - ant
+  - dbench
+  - fuse-sshfs
+  - lsof
+  - iozone
+  - libtool
+  - automake
+  - gettext
+  - libuuid-devel
+  - libacl-devel
+  - bc
+  - xfsdump
+  - blktrace
+  - numpy
+  - python-matplotlib
+  - usbredir
+  - genisoimage
+  - qemu-img-rhev-1.5.3-60_ceph.el7.5
+  - qemu-kvm-rhev-1.5.3-60_ceph.el7.5
+  - qemu-kvm-tools-rhev-1.5.3-60_ceph.el7.5
+  - httpd
+  - httpd-devel
+  - httpd-tools
+  - mod_ssl
+  - mod_fastcgi-2.4.7-1.ceph.el7
+  - python-pip
+  - libevent-devel
+  - perl-JSON-XS
+  - perl-XML-Twig
+  - java-1.6.0-openjdk-devel
+  - junit4
+  - scsi-target-utils
+  - iscsi-initiator-utils
+  - smartmontools
+  - nfs-utils