/ playbook.yaml
playbook.yaml
1 - name: DevelopmentSetup 2 hosts: localhost 3 connection: local 4 vars: 5 # This variable gives us a boolean for deciding whether or not to become 6 # root. It cascades down to any subsequent tasks unless overwritten. 7 should_be_root: "{{ true if ansible_pkg_mgr != 'brew' else false }}" 8 newest_go_version: "$(curl https://go.dev/VERSION?m=text | head -n1)" 9 10 tasks: 11 - block: 12 - name: Download atuin installer 13 get_url: 14 url: https://github.com/atuinsh/atuin/releases/latest/download/atuin-installer.sh 15 dest: ./atuin-installer.sh 16 tags: 17 - atuin 18 - name: Allow the atuin installer to execute 19 shell: chmod +x atuin-installer.sh 20 tags: 21 - atuin 22 23 - name: awscli is present 24 package: 25 name: awscli 26 state: present 27 - name: bat is present 28 package: 29 name: bat 30 state: present 31 - name: btop is present 32 package: 33 name: btop 34 state: present 35 36 37 - name: check if cargo is installed 38 shell: command -v cargo 39 register: cargo_exists 40 ignore_errors: yes 41 - name: Cargo Download Installer 42 when: cargo_exists is failed 43 get_url: 44 url: https://sh.rustup.rs 45 dest: /tmp/sh.rustup.rs 46 mode: '0755' 47 force: 'yes' 48 tags: 49 - rust 50 - name: install rust/cargo 51 when: cargo_exists is failed 52 shell: /tmp/sh.rustup.rs -y 53 tags: 54 - rust 55 56 - name: fzf is present 57 package: 58 name: fzf 59 state: present 60 - name: gcc is present 61 package: 62 name: gcc 63 state: present 64 - name: gh is present 65 package: 66 name: gh 67 state: present 68 - name: set git user info 69 shell: git config --global user.email "peteryurkovich1@gmail.com" && git config --global user.name "PeterYurkovich" 70 - name: glab is present 71 package: 72 name: glab 73 state: present 74 75 76 - name: check if go is installed 77 shell: command -v go 78 register: go_exists 79 ignore_errors: yes 80 - name: Go Download Installer 81 when: go_exists is failed 82 shell: wget "https://dl.google.com/go/{{ newest_go_version }}.linux-amd64.tar.gz" 83 tags: 84 - go 85 - name: extract go archive 86 when: go_exists is failed 87 shell: tar -C /usr/local -xzf "{{ newest_go_version }}.linux-amd64.tar.gz" 88 tags: 89 - go 90 - name: remove go archive 91 shell: rm -f "{{ newest_go_version }}.linux-amd64.tar.gz" 92 - name: add local go folder 93 shell: mkdir $HOME/go 94 95 - name: helm is present 96 package: 97 name: helm 98 state: present 99 - name: jq is present 100 package: 101 name: jq 102 state: present 103 - name: allow lazygit install 104 shell: dnf copr enable atim/lazygit -y 105 - name: lazygit is present 106 package: 107 name: lazygit 108 state: present 109 - name: lsd is present 110 package: 111 name: lsd 112 state: present 113 - name: lua is present 114 package: 115 name: lua 116 state: present 117 # - name: Download nvm installer 118 # get_url: 119 # url: https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.1/install.sh 120 # dest: ./nvm-installer.sh 121 # - name: Allow the nvm installer to execute 122 # shell: chmod +x nvm-installer.sh 123 # - name: Execute the nvm installer 124 # shell: ./nvm-installer.sh 125 # - name: Remove the nvm installer 126 # file: 127 # path: ./nvm-installer.sh 128 # state: absent 129 # - name: Install nvm 130 # ansible.builtin.shell: > 131 # curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.1/install.sh | bash 132 - name: neovim is present 133 package: 134 name: neovim 135 state: present 136 - name: neovim plugins are present 137 shell: nvim --headless "+Lazy! sync" +qa 138 - name: ripgrep is present 139 package: 140 name: ripgrep 141 state: present 142 - name: stow is present 143 package: 144 name: stow 145 state: present 146 - name: tmux is present 147 package: 148 name: tmux 149 state: present 150 - name: unzip is present 151 package: 152 name: unzip 153 state: present 154 155 156 # - [x] atuin 157 # - [x] awscli 158 # - [x] btop 159 # - [ ] colima (for docker backend on mac) 160 # - [ ] docker (cli only) 161 # - [ ] docker-compose 162 # - [x] fzf 163 # - [x] gcc 164 # - [x] glab 165 # - [ ] gnu-sed (mac only) 166 # - [x] helm 167 # - [x] jq 168 # - [ ] kind 169 # - [ ] kitty 170 # - [ ] kubernetes-cli - https://stackoverflow.com/questions/60528766/how-to-install-kubectl-with-ansible 171 # - [ ] kustomize 172 # - [ ] lazygit - needs `sudo dnf copr enable atim/lazygit -y` 173 # - [x] lsd 174 # - [ ] luajit 175 # - [ ] neovim 176 # - [ ] nvim (plugins) 177 # - [ ] nvm 178 # - [ ] openshift-cli 179 # - [ ] operator-sdk 180 # - [ ] pipx (maybe) 181 # - [ ] pixman (maybe) 182 # - [ ] podman 183 # - [ ] podman-compose 184 # - [ ] pyenv 185 # - [ ] python 186 # - [ ] qemu (mac only) 187 # - [x]] ripgrep 188 # - [ ] starship 189 # - [x] stow 190 # - [x] tmux 191 # - [ ] tree-sitter 192 # - [ ] wget 193 # - [ ] xonsh 194 # - [ ] zoxide 195 196 # run the scripts in the dotfiles repo 197 # gitconfig update based on username of account? pyurkovi means redhat email while any other means peteryurkovich1@gmail.com 198 # install python and ansible first?