#!/bin/bash
# Command line variable is $1
if [ -n "$1" ]; then
echo "Package to install is $1"
else
echo "Package to install not supplied."
exit
fi
ansible all -b -m yum -a "name=$1 state=present"
./install-package.sh elinks
#!/bin/bash
# Command line variable is $1
if [ -n "$1" ]; then
echo "Package to install is $1"
else
echo "Package to install not supplied."
exit
fi
ansible all -b -m yum -a "name=$1 state=present"
./install-package.sh elinks
本文标题:Shell with ansible
本文链接:https://www.haomeiwen.com/subject/yktyvhtx.html
网友评论