There was an error while loading. Please reload this page.
1 parent cb9cfd2 commit 28b898eCopy full SHA for 28b898e
installation_scripts/install_ansible.sh
@@ -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