Skip to content

Commit 28b898e

Browse files
committed
added install_ansible script
1 parent cb9cfd2 commit 28b898e

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
#!/bin/bash
2+
#################################################
3+
# #
4+
# A shell script to install Ansible on CentOS #
5+
# #
6+
#################################################
7+
8+
# check if the current user is root
9+
if [[ $(/usr/bin/id -u) != "0" ]]; then
10+
echo -e "This looks like a 'non-root' user.\nPlease switch to 'root' and run the script again."
11+
exit
12+
fi
13+
14+
install_ansible() {
15+
yum update -y
16+
yum install epel-release -y
17+
yum install ansible -y
18+
}
19+
20+
install_ansible

0 commit comments

Comments
 (0)