diff options
| author | Eugene Triguba <eugenetriguba@gmail.com> | 2022-05-14 10:29:07 -0500 |
|---|---|---|
| committer | Eugene Triguba <eugenetriguba@gmail.com> | 2022-05-14 10:29:07 -0500 |
| commit | 0e1c7c11d58e86a5a738a025e1afb69596f4d9b2 (patch) | |
| tree | 0d33bc20d97ccf3ee9b057244c2fe85d0d4e1e7c /ansible | |
| parent | Add license (diff) | |
| download | dotfiles-0e1c7c11d58e86a5a738a025e1afb69596f4d9b2.zip | |
Add more dotfiles
Diffstat (limited to 'ansible')
| -rw-r--r-- | ansible/setup.yaml | 43 | ||||
| -rw-r--r-- | ansible/tasks/desktop.yaml | 33 | ||||
| -rw-r--r-- | ansible/tasks/dnf_packages.yaml | 57 | ||||
| -rw-r--r-- | ansible/tasks/link_dotfiles.yaml | 32 | ||||
| -rw-r--r-- | ansible/tasks/pkg_packages.yaml | 52 |
5 files changed, 0 insertions, 217 deletions
diff --git a/ansible/setup.yaml b/ansible/setup.yaml deleted file mode 100644 index 05e7612..0000000 --- a/ansible/setup.yaml +++ /dev/null @@ -1,43 +0,0 @@ ---- -- name: Playbook to manage personal dotfiles - hosts: localhost - connection: local - tasks: - - name: Create folders - file: - path: "{{item}}" - state: directory - loop: - - "$HOME/.config/i3" - - "$HOME/.config/alacritty" - - "$HOME/.config/nvim/autoload" - - "$HOME/src" - - "$HOME/bin" - - - include_tasks: tasks/link_dotfiles.yaml - - - include_tasks: tasks/dnf_packages.yaml - when: ansible_os_family == "RedHat" - - - include_tasks: tasks/pkg_packages.yaml - when: ansible_os_family == "FreeBSD" - - - include_tasks: tasks/desktop.yaml - when: ansible_os_family == "FreeBSD" - - - name: Ensure shell is set to zsh - vars: - current_user: "{{ ansible_user_id }}" - become: yes - user: - name: "{{ current_user }}" - shell: /usr/local/bin/zsh - - - name: Install vim-plug - get_url: - url: https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim - dest: "$HOME/.config/nvim/autoload/plug.vim" - - - name: Install vim-plug plugins - shell: nvim +PlugInstall +qall --headless - diff --git a/ansible/tasks/desktop.yaml b/ansible/tasks/desktop.yaml deleted file mode 100644 index e9abdc2..0000000 --- a/ansible/tasks/desktop.yaml +++ /dev/null @@ -1,33 +0,0 @@ ---- -- name: Link user files - file: - src: "{{ item.value.src }}" - dest: "{{ item.value.dest }}" - state: link - with_dict: "{{user_desktop_files}}" - vars: - user_desktop_files: - xinitrc: - src: "{{playbook_dir}}/../configs/desktop/home/.xinitrc" - dest: "{{ lookup('env', 'HOME') }}/.xinitrc" - -- name: Link system files - become: true - become_method: su - copy: - src: "{{ item.value.src }}" - dest: "{{ item.value.dest }}" - backup: yes - owner: root - group: wheel - mode: u=rw,g=r,o=r - with_dict: "{{system_desktop_files}}" - vars: - system_desktop_files: - etc-rc: - src: "{{playbook_dir}}/../configs/desktop/etc/rc.conf" - dest: "/etc/rc.conf" - - boot-loader: - src: "{{playbook_dir}}/../configs/desktop/boot/loader.conf" - dest: "/boot/loader.conf" diff --git a/ansible/tasks/dnf_packages.yaml b/ansible/tasks/dnf_packages.yaml deleted file mode 100644 index 3786e86..0000000 --- a/ansible/tasks/dnf_packages.yaml +++ /dev/null @@ -1,57 +0,0 @@ ---- -- name: Import 1Password key - become: yes - ansible.builtin.rpm_key: - state: present - key: https://downloads.1password.com/linux/keys/1password.asc - -- name: Add 1Password YUM Repo - become: yes - yum_repository: - name: 1password - description: 1Password Stable Channel - baseurl: https://downloads.1password.com/linux/rpm/stable/$basearch - enabled: yes - gpgcheck: yes - repo_gpgcheck: yes - gpgkey: https://downloads.1password.com/linux/keys/1password.asc - state: present - -- name: Install dnf packages - become: yes - - dnf: - name: "{{ item.key }}" - state: "{{ item.value.state | default('present') }}" - - with_dict: "{{dnf}}" - vars: - dnf: - "@Development tools": - 1password: - alacritty: - cmake: - dmenu: - vim: - feh: - firefox: - fzf: - git: - go: - hack-fonts: - i3-gaps: - i3lock: - i3status: - jq: - neofetch: - neovim: - openssl: - python: - python-devel: - python-neovim: - redshift: - ripgrep: - rsync: - scrot: - wget: - zsh: diff --git a/ansible/tasks/link_dotfiles.yaml b/ansible/tasks/link_dotfiles.yaml deleted file mode 100644 index 454c3a7..0000000 --- a/ansible/tasks/link_dotfiles.yaml +++ /dev/null @@ -1,32 +0,0 @@ ---- -- name: Link shared dotfiles - file: - src: "{{ item.value.src }}" - dest: "{{ item.value.dest }}" - state: link - with_dict: "{{dotfiles}}" - vars: - dotfiles: - zshrc: - src: "{{playbook_dir}}/../configs/shared/.zshrc" - dest: "{{ lookup('env', 'HOME') }}/.zshrc" - - gitconfig: - src: "{{playbook_dir}}/../configs/shared/.gitconfig" - dest: "{{ lookup('env', 'HOME') }}/.gitconfig" - - gdbinit: - src: "{{playbook_dir}}/../configs/shared/.gdbinit" - dest: "{{ lookup('env', 'HOME') }}/.gdbinit" - - vimrc: - src: "{{playbook_dir}}/../configs/shared/.vimrc" - dest: "{{ lookup('env', 'HOME') }}/.config/nvim/init.vim" - - tmux: - src: "{{playbook_dir}}/../configs/shared/.tmux.conf" - dest: "{{ lookup('env', 'HOME') }}/.tmux.conf" - - alacritty: - src: "{{playbook_dir}}/../configs/shared/alacritty.yml" - dest: "{{ lookup('env', 'HOME') }}/.config/alacritty/alacritty.yml" diff --git a/ansible/tasks/pkg_packages.yaml b/ansible/tasks/pkg_packages.yaml deleted file mode 100644 index ad744fc..0000000 --- a/ansible/tasks/pkg_packages.yaml +++ /dev/null @@ -1,52 +0,0 @@ ---- -- name: Install pkg packages - become: yes - become_method: su - - community.general.pkgng: - name: "{{ item.key }}" - state: "{{ item.value.state | default('present') }}" - - with_dict: "{{pkg}}" - vars: - pkg: - 1password-client2: - audio/virtual_oss: - alacritty: - brlaser: - cmake: - devcpu-data: - devel/xdg-user-dirs: - dmenu: - drm-kmod: - editors/vim: - editors/vscode: - en-freebsd-doc: - feh: - firefox: - fzf: - git: - go: - hack-font: - i3-gaps: - i3lock: - i3status: - jq: - neovim: - openssl: - pfetch: - pkg: - poudriere: - editors/py-pynvim: - python: - redshift: - ripgrep: - rsync: - rust-analyzer: - scrot: - spotify-tui: - spotifyd: - wget: - x11/xclip: - x11/xorg: - zsh: |