From 6ab3ad74be362aae1b541de07a4df1713c0cd284 Mon Sep 17 00:00:00 2001 From: Gene Liverman Date: Tue, 11 Oct 2022 16:37:43 -0400 Subject: [PATCH] Add bigboy, update MS repo setup --- ansible/ansible_hosts.yaml | 2 + ansible/bigboy.yaml | 142 +++++++++++++++++++++++++++++++++++++ ansible/carbonbean.yaml | 9 ++- 3 files changed, 148 insertions(+), 5 deletions(-) create mode 100644 ansible/bigboy.yaml diff --git a/ansible/ansible_hosts.yaml b/ansible/ansible_hosts.yaml index 904e200..06c8af2 100644 --- a/ansible/ansible_hosts.yaml +++ b/ansible/ansible_hosts.yaml @@ -1,6 +1,8 @@ --- all: hosts: + bigboy-wsl: + ansible_connection: local carbonbean: ansible_connection: local children: diff --git a/ansible/bigboy.yaml b/ansible/bigboy.yaml new file mode 100644 index 0000000..ae85eaa --- /dev/null +++ b/ansible/bigboy.yaml @@ -0,0 +1,142 @@ +--- +- name: Install packages + hosts: bigboy-wsl + vars: + ansible_python_interpreter: '/usr/bin/python3' + tasks: + + - name: Install Microsoft keys and repo + become: true + ansible.builtin.apt: + state: present + force: true + deb: https://packages.microsoft.com/config/ubuntu/22.04/packages-microsoft-prod.deb + + - name: Base packages from apt + become: true + ansible.builtin.apt: + update_cache: true + state: latest + pkg: + - bat + - bundler + - cmake + - dconf-editor + - dos2unix + - exa + - gh + - git + - git-lfs + - gnupg + - htop + - httpie + - hub + - hugo + - iftop + - jq + - libssl-dev + - neofetch + - pass + - pcsc-tools + - pcscd + - powershell + - rake + - ruby + - ruby-dev + - scdaemon + - snapd + - tilix + - traceroute + - tree + - vim + - xclip + - zsh + + - name: Install git-credential-manager deb package + become: true + ansible.builtin.apt: + state: present + deb: https://github.com/GitCredentialManager/git-credential-manager/releases/download/v2.0.696/gcmcore-linux_amd64.2.0.696.deb + + - name: Install delta via deb package on GitHub + become: true + ansible.builtin.apt: + state: present + deb: https://github.com/dandavison/delta/releases/download/0.13.0/git-delta_0.13.0_amd64.deb + + - name: Base packages from Snapcraft + become: true + community.general.snap: + name: + - cctv-viewer # only available here + + - name: hiera-eyaml gem + community.general.gem: + name: hiera-eyaml + state: latest + + - name: vmfloaty gem + community.general.gem: + name: vmfloaty + state: latest + + - name: Python packages via pip + ansible.builtin.pip: + state: latest + name: + - ansible + - ansible-lint + - flake8 + - pywinrm + + - name: ensure fonts directory + file: + path: "{{ lookup('env', 'HOME') }}/.fonts" + state: directory + + - name: Hack exists + shell: "ls {{ lookup('env', 'HOME') }}/.fonts/Hack*Nerd*Font*Complete*" + register: hack_exists + ignore_errors: true + + - name: Download Hack + when: hack_exists is failed + ansible.builtin.unarchive: + src: https://github.com/ryanoasis/nerd-fonts/releases/download/v2.1.0/Hack.zip + dest: "{{ lookup('env', 'HOME') }}/.fonts/" + remote_src: true + + - name: Setup Oh My ZSH + include_role: + name: gantsign.oh-my-zsh + vars: + oh_my_zsh_theme: steeef + oh_my_zsh_plugins: + - git + users: + - username: "{{ lookup('env', 'USER') }}" + + # - name: Symlink .zshrc + # ansible.builtin.file: + # src: "{{ lookup('env', 'HOME') }}/repos/dots/link/nix/zshrc" + # dest: "{{ lookup('env', 'HOME') }}/.zshrc" + # state: link + + # - name: Set shell to zsh and add to groups + # become: true + # ansible.builtin.user: + # name: "{{ lookup('env', 'USER') }}" + # shell: /usr/bin/zsh + # append: true + # groups: + # - dialout + + - name: Add passwordless sudo entries + become: true + community.general.sudoers: + name: "{{ lookup('env', 'USER') }}-no-password" + user: "{{ lookup('env', 'USER') }}" + nopassword: true + commands: + - /usr/bin/systemctl restart pcscd + - /usr/bin/pkill -9 gpg-agent diff --git a/ansible/carbonbean.yaml b/ansible/carbonbean.yaml index 0e14e7e..89370a3 100644 --- a/ansible/carbonbean.yaml +++ b/ansible/carbonbean.yaml @@ -101,13 +101,12 @@ filename: virtualbox update_cache: false - - name: Add Microsoft Ubuntu 22.04 repo + - name: Install Microsoft keys and repo become: true - ansible.builtin.apt_repository: - repo: deb [arch=amd64,arm64,armhf] https://packages.microsoft.com/ubuntu/22.04/prod jammy main + ansible.builtin.apt: state: present - filename: microsoft-prod - update_cache: false + force: true + deb: https://packages.microsoft.com/config/ubuntu/22.04/packages-microsoft-prod.deb - name: Install puppet-tools repo via Focal (20.04) deb package become: true