-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.sh
executable file
·44 lines (33 loc) · 1.86 KB
/
setup.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#!/bin/bash
################################################################################
# Script : setup.sh
# Author : David Velez
# Date : 07/04/2021
# Description: Setup my preferences, including doing a repository update,
# and installing ansible which will do most of the leg work
################################################################################
# Update Repository
echo "*******************************************************************************"
echo "* Update Respository..."
echo "*******************************************************************************"
sudo apt update
echo "*******************************************************************************"
echo "* ...Complete!"
echo "*******************************************************************************"
# Update uid variable in Master Playbook based on current user
echo "*******************************************************************************"
echo "* Update Playbook User Variable..."
echo "*******************************************************************************"
sed -i "s/userholder/$USER/g" ./playbooks/master.yml
echo "*******************************************************************************"
echo "* ...Complete!"
echo "*******************************************************************************"
# Install Ansible and Run Playbooks
echo "*******************************************************************************"
echo "* Installing Ansible and Running Playbooks..."
echo "*******************************************************************************"
sudo apt install ansible -y
ansible-playbook ./playbooks/master.yml
echo "*******************************************************************************"
echo "* ...Complete!"
echo "*******************************************************************************"