Last active
August 26, 2022 15:38
-
-
Save itstommymorgan/cf2707f6172f0ef5a9daa5c8602c12cc to your computer and use it in GitHub Desktop.
Install script for my_macbook
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| mkdir -p ~/projects/itstommymorgan | |
| root_path=~/projects/itstommymorgan/my_mackbook | |
| git clone [email protected]:itstommymorgan/my_macbook.git ${root_path} | |
| pip3 install --upgrade pip | |
| pip3 install ansible | |
| # Set the path so that the ansible commands are accessible | |
| python_dir=/Users/`whoami`/Library/Python | |
| cd $python_dir | |
| printf -v python_version %s * | |
| export PATH="${PATH}:${python_dir}/${python_version}/bin" | |
| # Now prep the requirements | |
| cd ${root_path} | |
| ansible-galaxy install -r requirements.yml | |
| local_config=${root_path}/config/local.yml | |
| echo "---" > $local_config | |
| echo "" >> $local_config | |
| echo "locals:" >> $local_config | |
| echo " hostname: " >> $local_config | |
| echo " company_name: " >> $local_config | |
| vim $local_config |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment