Andrew Schoen [Tue, 23 Jun 2015 20:16:32 +0000 (15:16 -0500)]
downstream-setup: ignore errors when disabling or enabling repos
The lineinfile module fails if dest doesn't exist. We want this to fail
silently instead. The ansible output still does a good job of letting
you know a task failed without failing the entire playbook.
Andrew Schoen [Mon, 22 Jun 2015 16:44:35 +0000 (11:44 -0500)]
testnode: do not start rpcbind on precise
rpcbind does not provide a way to be managed with upstart on precise.
This creates a var we can use to toggle this task on and off per distro
as the other distros we support are ok with starting and enabling rpcbind.
Andrew Schoen [Mon, 22 Jun 2015 15:00:53 +0000 (10:00 -0500)]
cobbler: set the mode to 0440 on /etc/sudoers.d/cephlab_sudo
Apparently most other distros default anything in /etc/sudoers.d to
0440 except precise. Precise, by default, sets the mode of
/etc/sudoers.d/cephlab_sudo to 0664 which completely breaks sudo usage.
This makes cobbler explicitly set the mode to 0440.
Andrew Schoen [Fri, 19 Jun 2015 15:49:39 +0000 (10:49 -0500)]
downstream-setup: add tasks to disable and enable yum repos.
This works similar to downloading yum_repos. You can specific a repo
file to disable using 'disable_yum_repos' and enable them by using
'enable_yum_repos'. If you use 'disable_yum_repos' with 'cleanup' it
will enable the repos listed in 'disable_yum_repos' - this feature is
used with teuthology and the Ansible task.
Andrew Schoen [Wed, 17 Jun 2015 21:31:00 +0000 (16:31 -0500)]
testnode: enable nfs-server on rhel 7.x
In the port from ceph-qa-chef I decided to enable nfs-server by default
on all distros even though chef only enabled it for rhel 7.x. We've
since discovered that enabling it on vivid causes errors, so we're not
enabling it for all distros anymore. This makes sure we enable it still
on rhel 7.x.
Andrew Schoen [Wed, 17 Jun 2015 21:05:54 +0000 (16:05 -0500)]
testnode: restart nfs-kernel-server and don't enable it.
We found an issue where ansible would fail to enable nfs-kernel-server
on vivid. It's already enabled by default anyway, so let's remove that
to avoid the error.
Also, ceph-qa-chef used to only restart nfs-kernel-server for ubuntu and
didn't enable so let's go back to that functionality.
Andrew Schoen [Tue, 16 Jun 2015 20:41:11 +0000 (15:41 -0500)]
cobbler: keep cobbler from messing with sources.list
We want this because on vivid we want to use the distro provided sources
and when we use the cobbler snippet it wipes out those values in
sources.list. On the other versions of ubuntu we use the testnodes
playbook to provide our own sources and repos because we are currently
building packages for those, but don't want that burden for vivid.
Andrew Schoen [Tue, 16 Jun 2015 20:39:23 +0000 (15:39 -0500)]
testnode: add a var file for ubuntu trusty
There are some packages listed here that we install on other versions of
ubuntu but can't on trusty. I'm unsure if these are actually needed
though or if they're just cruft.
Andrew Schoen [Mon, 15 Jun 2015 21:26:44 +0000 (16:26 -0500)]
downstream-setup: make yum_repos clean up after itself on teardown
This lets us pass a teardown==True var to downstream-setup with the
yum_repos var defined and it will instead remove the repos defined in
yum_repos instead of downloading them.
Andrew Schoen [Wed, 20 May 2015 19:10:28 +0000 (14:10 -0500)]
cobbler_profile: add the ability to set kernel options.
We can now provide custom kernel_options and kernel_options_post when
creating a profile. Updating the kernel_options are not idempotent
however as some kernel options are always return from the distro.
Andrew Schoen [Mon, 18 May 2015 18:09:52 +0000 (13:09 -0500)]
cobbler_profile: use the mount module instead of command to mount isos
The mount module is idempotent, so we should use that instead. Also,
clear the mount point each time so that if the playbook fails on the
next run it'll actually remount and complete the rest of the tasks
instead of skipping them because the iso is already mounted.
Andrew Schoen [Fri, 15 May 2015 21:12:20 +0000 (16:12 -0500)]
cobbler: adds a snippet to create post install kernel options.
This snippet is used by the cephlab_preseed_late script to set the
GRUB_CMDLINE_LINUX value in /etc/defaults/grub to what's defined by
the system, profile or distro that's currently being imaged.
Andrew Schoen [Thu, 14 May 2015 21:31:34 +0000 (16:31 -0500)]
cobbler: adds a ubuntu preseed that can be used for multiple versions.
This uses the os_version cobbler variable to decide which version of
ubuntu it's using. This variable is set on the distro that is currently
using the cephlab_ubuntu preseed.
Ken Dreyer [Wed, 20 May 2015 03:25:03 +0000 (21:25 -0600)]
puddle: skip some cleanup in ceph-distill
The ceph-distill script was deleting some files that distill doesn't
create any more (because we now set "skip_phase = createiso"). Stop
attempting to delete these.
Ken Dreyer [Tue, 19 May 2015 23:50:00 +0000 (17:50 -0600)]
puddle: use distill configs from rcm-metadata.git
Originally I thought that we could store each of distill's individual
configuration files in ceph-cm-ansible.git, but this is becoming
untenable because there are too many templated values, and I'm trying to
sync these files closely with the copies from Red Hat's rel-eng team.
This commit uses the git module to clone a rcm-metadata.git repository
to /etc/distill and alters the "ceph-distill" wrapper script to use that
location instead.
Since the individual templated files are no longer needed (the full
versions are in rcm-metadata.git), delete them from the tree here.
Andrew Schoen [Mon, 18 May 2015 21:23:31 +0000 (16:23 -0500)]
downstream-setup: add a task to remove a yum repo from /etc/yum.repos.d
Using the remove_yum_repos var give a list of yum repos names to remove
from /etc/yum.repos.d. This gives a way for us to clean up yum repos
that we add with this role.
Andrew Schoen [Thu, 30 Apr 2015 20:19:33 +0000 (15:19 -0500)]
downstream-setup: adds a new downstream_setup.yml playbook.
This playbook will be used to setup testnodes for downstream
testing by downloading arbitrary yum repos. The repos to install should
be passed in with the --extra-vars option to ansible-playbook.
The yum_repos var must be a list of hashes defining the url to download
the repo from and the name to save it as in /etc/yum.repos.d
Andrew Schoen [Tue, 12 May 2015 20:02:04 +0000 (15:02 -0500)]
Make rhel 7.0 tasks run on any rhel 7.x version.
This shouldn't have been restricted to only 7.0 in the first place. We
noticed this problem while testing rhel 7.1 and noticing that firewalld
was not disabled.
Dan Mick [Fri, 8 May 2015 21:27:33 +0000 (14:27 -0700)]
vmlist.py: treat "-h/--host" case outside the normal flow
Needlessly complex trying to mix the streams, and no reason for
a separate process when doing only one machine; needed to make
outputfile default to None anyway