From 519d5ee78294022ed0e8f4ce2b5a58bce4501f44 Mon Sep 17 00:00:00 2001 From: Prabesh Thapa Date: Tue, 5 Mar 2024 08:35:13 -0800 Subject: [PATCH] updated config --- .DS_Store | Bin 0 -> 6148 bytes Taskfile.yaml | 10 ---- bootstrap.sh | 46 +++++++++++----- git/gitconfig | 2 +- playbooks/apply-base-config.yaml | 7 --- roles/base-config/README.md | 38 -------------- roles/base-config/defaults/main.yml | 2 - roles/base-config/handlers/main.yml | 2 - roles/base-config/meta/main.yml | 52 ------------------- roles/base-config/tasks/install-packages.yml | 25 --------- roles/base-config/tasks/main.yml | 3 -- roles/base-config/tasks/setup-nvim.yml | 0 roles/base-config/tasks/setup-zsh.yml | 0 roles/base-config/tests/inventory | 2 - roles/base-config/tests/test.yml | 5 -- roles/base-config/vars/main.yml | 2 - zsh/zshrc | 6 +-- 17 files changed, 36 insertions(+), 166 deletions(-) create mode 100644 .DS_Store delete mode 100644 Taskfile.yaml mode change 100644 => 100755 bootstrap.sh delete mode 100644 playbooks/apply-base-config.yaml delete mode 100644 roles/base-config/README.md delete mode 100644 roles/base-config/defaults/main.yml delete mode 100644 roles/base-config/handlers/main.yml delete mode 100644 roles/base-config/meta/main.yml delete mode 100644 roles/base-config/tasks/install-packages.yml delete mode 100644 roles/base-config/tasks/main.yml delete mode 100644 roles/base-config/tasks/setup-nvim.yml delete mode 100644 roles/base-config/tasks/setup-zsh.yml delete mode 100644 roles/base-config/tests/inventory delete mode 100644 roles/base-config/tests/test.yml delete mode 100644 roles/base-config/vars/main.yml diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..45a7663431b3791201f8cff4fc60763baa1724cb GIT binary patch literal 6148 zcmeHKI|>3p3{CuiU}I@HSMUad=n1@lg&?9RhzfRFc`lFU%coElJ1vx#CG%!7d9&;* zCL0ma>3KB~8HvaMZYVb!+GhLaE$d`NfpDC0y)2IV-C@6O<-Q9Tw=Y}S$O+Fg-*#wJ zfC^9nDnJFOz^4_+3Og8n`e2?%1*pK!D`59Sfg9GuCeW`A4Bi3&dkDK>?!5%CSO8cP zn?OWh8dP9VHCqe~I^resYGM-@bkS@+G~cY*p{Tzd=NC^Gt$`e=02O#upc~7P)&DvC zP5=K&;))7Tfxl8fd$YxCiciYg+WI)FwFSO}Th1MBhPhKPcsT}oImW`u@z|3huh<;> WHL(eFI^s?T@@K$wp;3WvEARmDrxf%6 literal 0 HcmV?d00001 diff --git a/Taskfile.yaml b/Taskfile.yaml deleted file mode 100644 index acf9bd8..0000000 --- a/Taskfile.yaml +++ /dev/null @@ -1,10 +0,0 @@ -# This is work in progress ( DO NOT USE ) -version: '3' - -tasks: - bootstrap: - cmds: - - /bin/bash bootstrap.sh {{.CLI_ARGS}} - build: - cmds: - - ansible-playbook -i localhost playbooks/apply-base-config.yaml --ask-become-pass \ No newline at end of file diff --git a/bootstrap.sh b/bootstrap.sh old mode 100644 new mode 100755 index 0592175..7a1ead3 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -21,17 +21,12 @@ function install_brew { if [[ ! $exists ]]; then echo "No brew installation found, installing..." runcmd /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" + runcmd brew update && brew upgrade else echo "brew is installed, nothing to do here..." fi } -# Function to install yabai -function install_yabai { - runcmd brew install koekeishiya/formulae/yabai - runcmd yabai --start-service -} - # Function to install skhd function install_skhd { runcmd brew install koekeishiya/formulae/skhd @@ -46,9 +41,8 @@ function install_ansible { # Function to install Python function install_python { - runcmd brew install python3 - runcmd curl -O https://bootstrap.pypa.io/get-pip.py - sudo python3 get-pip.py + runcmd brew install python@3.9 + runcmd /bin/bash -c "curl -O https://bootstrap.pypa.io/get-pip.py" } # Function to install various packages @@ -62,12 +56,24 @@ function install_packages { fzf \ go-task \ tree \ - exa \ nvm \ - xz \ + go \ + openjdk \ + tfenv \ + helm \ + helmfile \ + kubectx \ + kubectl \ + sops \ + docker \ + docker-compose \ + colima \ + docker-credential-helper \ + aylei/tap/kubectl-debug \ git-delta \ git-absorb \ shellcheck \ + awscli \ hadolint \ aquasecurity/trivy/trivy \ figlet \ @@ -77,13 +83,17 @@ function install_packages { ansible \ derailed/k9s/k9s - # runcmd "$(curl -L https://sw.kovidgoyal.net/kitty/installer.sh | sh /dev/stdin)" +} + +# Function to install Terraform +function install_kitty { + runcmd /bin/bash -c "$(curl -fsSL https://sw.kovidgoyal.net/kitty/installer.sh)" } # Function to install Terraform function install_terraform { runcmd brew tap hashicorp/tap - runcmd hashicorp/tap/terraform + runcmd brew install hashicorp/tap/terraform } # Function to set up dotfiles @@ -129,10 +139,15 @@ function setup_config_files { install_brew install_packages install_skhd +# install_kitty +install_terraform +install_python +install_ansible + # Additional setup steps setup_dotfiles -setup_directories +# setup_directories setup_config_files @@ -143,3 +158,6 @@ setup_config_files # runcmd skhd --restart-service # runcmd yabai --restart-service # } + + +echo "completed" \ No newline at end of file diff --git a/git/gitconfig b/git/gitconfig index fb0b3c6..f0bfda2 100644 --- a/git/gitconfig +++ b/git/gitconfig @@ -1,5 +1,5 @@ [user] - signingkey = 9BD85959AC85D213 + signingkey = 2F1EE7CDC451C403 name = Prabesh Thapa email = sthapaprabesh2020@gmail.com [commit] diff --git a/playbooks/apply-base-config.yaml b/playbooks/apply-base-config.yaml deleted file mode 100644 index 422c416..0000000 --- a/playbooks/apply-base-config.yaml +++ /dev/null @@ -1,7 +0,0 @@ ---- -# This is work in progress -- hosts: localhost - # become: true - gather_facts: true - roles: - - "roles/base-config" \ No newline at end of file diff --git a/roles/base-config/README.md b/roles/base-config/README.md deleted file mode 100644 index 225dd44..0000000 --- a/roles/base-config/README.md +++ /dev/null @@ -1,38 +0,0 @@ -Role Name -========= - -A brief description of the role goes here. - -Requirements ------------- - -Any pre-requisites that may not be covered by Ansible itself or the role should be mentioned here. For instance, if the role uses the EC2 module, it may be a good idea to mention in this section that the boto package is required. - -Role Variables --------------- - -A description of the settable variables for this role should go here, including any variables that are in defaults/main.yml, vars/main.yml, and any variables that can/should be set via parameters to the role. Any variables that are read from other roles and/or the global scope (ie. hostvars, group vars, etc.) should be mentioned here as well. - -Dependencies ------------- - -A list of other roles hosted on Galaxy should go here, plus any details in regards to parameters that may need to be set for other roles, or variables that are used from other roles. - -Example Playbook ----------------- - -Including an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too: - - - hosts: servers - roles: - - { role: username.rolename, x: 42 } - -License -------- - -BSD - -Author Information ------------------- - -An optional section for the role authors to include contact information, or a website (HTML is not allowed). diff --git a/roles/base-config/defaults/main.yml b/roles/base-config/defaults/main.yml deleted file mode 100644 index e0329fc..0000000 --- a/roles/base-config/defaults/main.yml +++ /dev/null @@ -1,2 +0,0 @@ ---- -# defaults file for roles/base-config diff --git a/roles/base-config/handlers/main.yml b/roles/base-config/handlers/main.yml deleted file mode 100644 index c480773..0000000 --- a/roles/base-config/handlers/main.yml +++ /dev/null @@ -1,2 +0,0 @@ ---- -# handlers file for roles/base-config diff --git a/roles/base-config/meta/main.yml b/roles/base-config/meta/main.yml deleted file mode 100644 index c572acc..0000000 --- a/roles/base-config/meta/main.yml +++ /dev/null @@ -1,52 +0,0 @@ -galaxy_info: - author: your name - description: your role description - company: your company (optional) - - # If the issue tracker for your role is not on github, uncomment the - # next line and provide a value - # issue_tracker_url: http://example.com/issue/tracker - - # Choose a valid license ID from https://spdx.org - some suggested licenses: - # - BSD-3-Clause (default) - # - MIT - # - GPL-2.0-or-later - # - GPL-3.0-only - # - Apache-2.0 - # - CC-BY-4.0 - license: license (GPL-2.0-or-later, MIT, etc) - - min_ansible_version: 2.1 - - # If this a Container Enabled role, provide the minimum Ansible Container version. - # min_ansible_container_version: - - # - # Provide a list of supported platforms, and for each platform a list of versions. - # If you don't wish to enumerate all versions for a particular platform, use 'all'. - # To view available platforms and versions (or releases), visit: - # https://galaxy.ansible.com/api/v1/platforms/ - # - # platforms: - # - name: Fedora - # versions: - # - all - # - 25 - # - name: SomePlatform - # versions: - # - all - # - 1.0 - # - 7 - # - 99.99 - - galaxy_tags: [] - # List tags for your role here, one per line. A tag is a keyword that describes - # and categorizes the role. Users find roles by searching for tags. Be sure to - # remove the '[]' above, if you add tags to this list. - # - # NOTE: A tag is limited to a single word comprised of alphanumeric characters. - # Maximum 20 tags per role. - -dependencies: [] - # List your role dependencies here, one per line. Be sure to remove the '[]' above, - # if you add dependencies to this list. diff --git a/roles/base-config/tasks/install-packages.yml b/roles/base-config/tasks/install-packages.yml deleted file mode 100644 index fabef30..0000000 --- a/roles/base-config/tasks/install-packages.yml +++ /dev/null @@ -1,25 +0,0 @@ ---- -# This is work in progress -- name: Install base packages - community.general.homebrew: - name: - - git - # - shellcheck - # - hadolint - # - ngrok - # - nmap - # - lolcat - # - figlet - state: present - -- name: Setup hashicorp tab - community.general.homebrew_tap: - name: hashicorp/tap - state: present - -- name: Install vagrant - # when: - community.general.homebrew: - name: hashicorp/tap/hashicorp-vagrant - state: present - \ No newline at end of file diff --git a/roles/base-config/tasks/main.yml b/roles/base-config/tasks/main.yml deleted file mode 100644 index 4869e2a..0000000 --- a/roles/base-config/tasks/main.yml +++ /dev/null @@ -1,3 +0,0 @@ ---- -# tasks file for roles/base-config -- import_tasks: install-packages.yml \ No newline at end of file diff --git a/roles/base-config/tasks/setup-nvim.yml b/roles/base-config/tasks/setup-nvim.yml deleted file mode 100644 index e69de29..0000000 diff --git a/roles/base-config/tasks/setup-zsh.yml b/roles/base-config/tasks/setup-zsh.yml deleted file mode 100644 index e69de29..0000000 diff --git a/roles/base-config/tests/inventory b/roles/base-config/tests/inventory deleted file mode 100644 index 878877b..0000000 --- a/roles/base-config/tests/inventory +++ /dev/null @@ -1,2 +0,0 @@ -localhost - diff --git a/roles/base-config/tests/test.yml b/roles/base-config/tests/test.yml deleted file mode 100644 index cd421b0..0000000 --- a/roles/base-config/tests/test.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -- hosts: localhost - remote_user: root - roles: - - roles/base-config diff --git a/roles/base-config/vars/main.yml b/roles/base-config/vars/main.yml deleted file mode 100644 index f656d5a..0000000 --- a/roles/base-config/vars/main.yml +++ /dev/null @@ -1,2 +0,0 @@ ---- -# vars file for roles/base-config diff --git a/zsh/zshrc b/zsh/zshrc index 5d7422e..f3a2dc6 100644 --- a/zsh/zshrc +++ b/zsh/zshrc @@ -1,6 +1,6 @@ # If you come from bash you might have to change your $PATH. # export PATH=$HOME/bin:/usr/local/bin:$PATH -export GOROOT=/usr/local/go +export GOROOT=/opt/homebrew/bin/go export PATH=$HOME/bin:$GOROOT/bin:$PATH @@ -49,8 +49,8 @@ alias ddown='docker-compose down' alias lll='ls -lahtr' alias grep2="grep -v '^\s*$\|^\s*\#' $1" alias cls="clear" -alias pd="cd ~/src/personal/github" -alias wd="cd ~/src/work/github" +alias pd="cd ~/work" +alias wd="cd ~/personal" alias c="clear" # Check internet and dns