summaryrefslogtreecommitdiff
path: root/system/ansible/ansible.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'system/ansible/ansible.SlackBuild')
-rw-r--r--system/ansible/ansible.SlackBuild11
1 files changed, 5 insertions, 6 deletions
diff --git a/system/ansible/ansible.SlackBuild b/system/ansible/ansible.SlackBuild
index 2fa6d08c91..e5bdb6272e 100644
--- a/system/ansible/ansible.SlackBuild
+++ b/system/ansible/ansible.SlackBuild
@@ -23,7 +23,7 @@
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
PRGNAM=ansible
-VERSION=${VERSION:-1.2}
+VERSION=${VERSION:-1.2.1}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
@@ -54,7 +54,7 @@ else
LIBDIRSUFFIX=""
fi
-set -e # Exit on most errors
+set -e
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
@@ -68,7 +68,7 @@ rm -rf $PRGNAM-$VERSION
# browser -> ansible-ansible-v{tag}-{n}-g{sha}.tar.gz
# -- refer to https://github.com/blog/651-annotated-downloads
SOURCEFILE=$(find "$CWD" -type f \( -name "release$VERSION" -o \
- -name "$PKGNAM-$PKGNAM-v$VERSION-*" \) -print | head -1)
+ -name "$PRGNAM-$PRGNAM-v$VERSION-*" \) -print | head -1)
mkdir $PRGNAM-$VERSION
# The container directory (ansible-ansible-v{tag}...) must be stripped
tar xvf "$SOURCEFILE" -C $PRGNAM-$VERSION --strip 1
@@ -98,18 +98,17 @@ find $PKG/usr/man -iname '.git*' -delete
# Remove redundant executable perms granted to some modules
find $PKG/usr/share/ansible -type f -perm /111 -exec chmod -x {} \;
-# Fix plugin paths in example config file
+# Fix plugin paths and also remove the duplicated 'library' and 'hostfile' settings
orig_path="/usr/share/ansible_plugins"
site_packages="$(python2 -c 'from distutils.sysconfig import get_python_lib; print get_python_lib();')/ansible"
plug_pat='(action|filter|connection|lookup)'
-
sed -i -r \
-e "s:$orig_path/${plug_pat}_plugins:$site_packages/runner/\1_plugins:" \
-e "s:$orig_path/callback_plugins:$site_packages/callback_plugins:" \
-e "s:$orig_path/vars_plugins:$site_packages/inventory/vars_plugins:" \
+ -e "7,12d" \
examples/ansible.cfg
-# Populate config dir (/etc/ansible)
mkdir -p $PKG/etc/ansible
cp -a examples/ansible.cfg $PKG/etc/ansible/ansible.cfg.new
cp -a examples/hosts $PKG/etc/ansible/hosts.new