mirror of
https://github.com/oVirt/ovirt-ansible-shutdown-env.git
synced 2026-02-05 09:46:04 +01:00
Rename from ovirt.shutdown-env to ovirt.shutdown_env
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
oVirt environment shutdown
|
||||
=========
|
||||
|
||||
The `oVirt.shutdown-env` role iterates through all the entities (vms and hosts) in an oVirt/RHV cluster and performs a clean and ordered shutdown.
|
||||
The `ovirt.shutdown_env` role iterates through all the entities (vms and hosts) in an oVirt/RHV cluster and performs a clean and ordered shutdown.
|
||||
It also handles an Hosted-Engine and hyper-converged GlusterFS environment as a special case automatically detecting it.
|
||||
The role is intended to be run only against the engine machine.
|
||||
Please note that host shutdown is async and the playbook terminates before HE hosts are really down.
|
||||
@@ -49,7 +49,7 @@ Example Playbook
|
||||
engine_cafile: /etc/pki/ovirt-engine/ca.pem
|
||||
|
||||
roles:
|
||||
- oVirt.shutdown-env
|
||||
- ovirt.shutdown_env
|
||||
```
|
||||
|
||||
Demo
|
||||
|
||||
18
build.sh
18
build.sh
@@ -1,10 +1,10 @@
|
||||
#!/bin/bash
|
||||
|
||||
VERSION="1.0.1"
|
||||
VERSION="1.0.2"
|
||||
MILESTONE=master
|
||||
RPM_RELEASE="0.0.$MILESTONE.$(date -u +%Y%m%d%H%M%S)"
|
||||
|
||||
ROLE_NAME="ovirt.shutdown-env"
|
||||
ROLE_NAME="ovirt.shutdown_env"
|
||||
PACKAGE_NAME="ovirt-ansible-shutdown-env"
|
||||
PREFIX=/usr/local
|
||||
DATAROOT_DIR=$PREFIX/share
|
||||
@@ -13,7 +13,8 @@ DOC_DIR=$DATAROOT_DIR/doc
|
||||
PKG_DATA_DIR=${PKG_DATA_DIR:-$ROLES_DATAROOT_DIR/$PACKAGE_NAME}
|
||||
PKG_DATA_DIR_ORIG=${PKG_DATA_DIR_ORIG:-$PKG_DATA_DIR}
|
||||
PKG_DOC_DIR=${PKG_DOC_DIR:-$DOC_DIR/$PACKAGE_NAME}
|
||||
ROLENAME_LEGACY="${ROLENAME_LEGACY:-$ROLES_DATAROOT_DIR/ovirt-shutdown-env}"
|
||||
ROLENAME_LEGACY_NOPREFIX="${ROLENAME_LEGACY:-$ROLES_DATAROOT_DIR/ovirt-shutdown-env}"
|
||||
ROLENAME_LEGACY_DASH="${ROLENAME_LEGACY:-$ROLES_DATAROOT_DIR/ovirt.shutdown-env}"
|
||||
ROLENAME_LEGACY_UPPERCASE="${ROLENAME_LEGACY_UPPERCASE:-$ROLES_DATAROOT_DIR/oVirt.shutdown-env}"
|
||||
|
||||
RPM_VERSION=$VERSION
|
||||
@@ -30,9 +31,9 @@ dist() {
|
||||
-e "s|@RPM_RELEASE@|$RPM_RELEASE|g" \
|
||||
-e "s|@PACKAGE_NAME@|$PACKAGE_NAME|g" \
|
||||
-e "s|@PACKAGE_VERSION@|$PACKAGE_VERSION|g" \
|
||||
< ovirt-ansible-shutdown-env.spec.in > ovirt-ansible-shutdown-env.spec
|
||||
< $PACKAGE_NAME.spec.in > $PACKAGE_NAME.spec
|
||||
|
||||
git ls-files | tar --files-from /proc/self/fd/0 -czf "$TARBALL" ovirt-ansible-shutdown-env.spec
|
||||
git ls-files | tar --files-from /proc/self/fd/0 -czf "$TARBALL" $PACKAGE_NAME.spec
|
||||
echo "tar archive '$TARBALL' created."
|
||||
}
|
||||
|
||||
@@ -41,10 +42,9 @@ install() {
|
||||
mkdir -p $PKG_DATA_DIR
|
||||
mkdir -p $PKG_DOC_DIR
|
||||
|
||||
# Create a symlink, so legacy role name does work:
|
||||
ln -f -s $PKG_DATA_DIR_ORIG $ROLENAME_LEGACY
|
||||
|
||||
# Create a symlink, so legacy role name does work with upper case:
|
||||
# Create symlinks for backward compatibility with legacy role names:
|
||||
ln -f -s $PKG_DATA_DIR_ORIG $ROLENAME_LEGACY_NOPREFIX
|
||||
ln -f -s $PKG_DATA_DIR_ORIG $ROLENAME_LEGACY_DASH
|
||||
ln -f -s $PKG_DATA_DIR_ORIG $ROLENAME_LEGACY_UPPERCASE
|
||||
|
||||
cp -pR defaults/ $PKG_DATA_DIR
|
||||
|
||||
@@ -13,4 +13,4 @@
|
||||
engine_user: admin@internal
|
||||
|
||||
roles:
|
||||
- oVirt.shutdown-env
|
||||
- ovirt.shutdown_env
|
||||
|
||||
@@ -3,6 +3,7 @@ galaxy_info:
|
||||
author: Simone Tiraboschi
|
||||
description: Role to shutdown cleanly all the entities in a oVirt/RHV environment.
|
||||
company: Red Hat, Inc.
|
||||
role_name: shutdown_env
|
||||
|
||||
license: Apache License 2.0
|
||||
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
oVirt.shutdown-env
|
||||
@@ -1,5 +1,5 @@
|
||||
%global rolename shutdown-env
|
||||
%global roleprefix oVirt.
|
||||
%global rolename shutdown_env
|
||||
%global roleprefix ovirt.
|
||||
%global ansible_roles_dir ansible/roles
|
||||
|
||||
Name: @PACKAGE_NAME@
|
||||
@@ -38,5 +38,8 @@ sh build.sh install
|
||||
%license LICENSE
|
||||
|
||||
%changelog
|
||||
* Thu Jun 10 2019 Simone Tiraboschi <stirabos@redhat.com> - 1.0.2-1
|
||||
- Renaming to ovirt.shutdown_env to satisfy galaxy 3.0 naming recommendations
|
||||
|
||||
* Wed Jul 25 2018 Simone Tiraboschi <stirabos@redhat.com> - 1.0.0-1
|
||||
- Initial release
|
||||
|
||||
Reference in New Issue
Block a user