mirror of
https://github.com/morten-olsen/configs.git
synced 2026-02-08 00:46:24 +01:00
Add arch support
This commit is contained in:
@@ -1,6 +1,9 @@
|
|||||||
FROM fedora
|
FROM fedora
|
||||||
RUN dnf update -y && dnf install -y \
|
RUN dnf update -y && dnf install -y \
|
||||||
ansible
|
ansible
|
||||||
|
WORKDIR /opt/setuo
|
||||||
|
COPY ./requirements.yml /opt/setup
|
||||||
|
RUN ansible-galaxy collection install -r requirements.yml.
|
||||||
COPY . /opt/setup
|
COPY . /opt/setup
|
||||||
RUN ansible-playbook /opt/setup/playbooks/image.yml
|
RUN ansible-playbook /opt/setup/playbooks/image.yml
|
||||||
RUN mkdir /workspace && chown alice:alice /workspace
|
RUN mkdir /workspace && chown alice:alice /workspace
|
||||||
|
|||||||
17
Vagrantfile
vendored
17
Vagrantfile
vendored
@@ -1,9 +1,20 @@
|
|||||||
# -*- mode: ruby -*-
|
# -*- mode: ruby -*-
|
||||||
# vi: set ft=ruby :
|
# vi: set ft=ruby :
|
||||||
|
|
||||||
|
$script = <<-SCRIPT
|
||||||
|
pacman -Syu --noconfirm python
|
||||||
|
SCRIPT
|
||||||
|
|
||||||
|
|
||||||
Vagrant.configure("2") do |config|
|
Vagrant.configure("2") do |config|
|
||||||
config.vm.provider "virtualbox"
|
config.vm.provider :libvirt do |libvirt|
|
||||||
config.vm.box = "generic/fedora39"
|
libvirt.cpus = 2
|
||||||
|
libvirt.memory = 2048
|
||||||
|
end
|
||||||
|
config.vm.box = "archlinux/archlinux"
|
||||||
|
config.vm.synced_folder "./", "/vagrant", type: "rsync"
|
||||||
|
config.vm.provision "shell", inline: $script
|
||||||
config.vm.provision "ansible" do |ansible|
|
config.vm.provision "ansible" do |ansible|
|
||||||
ansible.playbook = "playbooks/setup.yml"
|
ansible.playbook = "playbooks/desktop.yml"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
8
playbooks/desktop.yml
Normal file
8
playbooks/desktop.yml
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
---
|
||||||
|
- name: Setup host
|
||||||
|
hosts: all
|
||||||
|
tasks:
|
||||||
|
roles:
|
||||||
|
- env_terminal
|
||||||
|
- env_develop
|
||||||
|
- desktop_hyprland
|
||||||
56
playbooks/library/yay/README.md
Normal file
56
playbooks/library/yay/README.md
Normal file
@@ -0,0 +1,56 @@
|
|||||||
|
# ansible-yay
|
||||||
|
|
||||||
|
An Ansible module for installing [AUR](https://aur.archlinux.org/) packages via
|
||||||
|
the [yay][yay] AUR helper.
|
||||||
|
|
||||||
|
This assumes your target node already has yay and its dependecies installed.
|
||||||
|
|
||||||
|
## Dependencies (Managed Node)
|
||||||
|
|
||||||
|
- [Arch Linux](https://www.archlinux.org/) (Obviously)
|
||||||
|
- [yay][yay]
|
||||||
|
|
||||||
|
## Installation
|
||||||
|
|
||||||
|
1. Clone this repo
|
||||||
|
2. Copy or link the `yay` file into your global Ansible library (usually
|
||||||
|
`/usr/share/ansible`) or into the `./library` folder alongside your
|
||||||
|
top-level playbook
|
||||||
|
|
||||||
|
## Usage
|
||||||
|
|
||||||
|
Pretty much identical to the [pacman module][pacman-mod]. Note that package
|
||||||
|
status, removal, the corresponding `pacman` commands are used (`-Q`, `-R`,
|
||||||
|
respectively).
|
||||||
|
|
||||||
|
### Options
|
||||||
|
|
||||||
|
| parameter | required | default | choices | description |
|
||||||
|
| ------------ | -------- | ------- | --------------------- | ---------------------------------------------------------------------------------------------------------------------------- |
|
||||||
|
| name | no | | | Name of the AUR package to install. |
|
||||||
|
| recurse | no | no | yes/no | Whether to recursively remove packages. See [pacman module docs][pacman-mod]. |
|
||||||
|
| state | no | no | absent/present/latest | Whether the package needs to be installed or updated. |
|
||||||
|
| update_cache | no | no | yes/no | Whether or not to refresh the master package lists. This can be run as part of a package installation or as a separate step. |
|
||||||
|
| upgrade | no | no | yes/no | Whether or not to upgrade the whole systemd. |
|
||||||
|
|
||||||
|
### Examples
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
# Install package foo
|
||||||
|
- yay: name=foo state=present
|
||||||
|
|
||||||
|
# Ensure package fuzz is installed and up-to-date
|
||||||
|
- yay: name=fuzz state=latest
|
||||||
|
|
||||||
|
# Remove packages foo and bar
|
||||||
|
- yay: name=foo,bar state=absent
|
||||||
|
|
||||||
|
# Recursively remove package baz
|
||||||
|
- yay: name=baz state=absent recurse=yes
|
||||||
|
|
||||||
|
# Effectively run yay -Syu
|
||||||
|
- yay: update_cache=yes upgrade=yes
|
||||||
|
```
|
||||||
|
|
||||||
|
[yay]: https://github.com/Jguer/yay
|
||||||
|
[pacman-mod]: http://docs.ansible.com/pacman_module.html
|
||||||
272
playbooks/library/yay/yay
Normal file
272
playbooks/library/yay/yay
Normal file
@@ -0,0 +1,272 @@
|
|||||||
|
#!/usr/local/bin/python
|
||||||
|
|
||||||
|
# The MIT License (MIT)
|
||||||
|
#
|
||||||
|
# Copyright (c) 2014 Austin Hyde
|
||||||
|
#
|
||||||
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
# of this software and associated documentation files (the "Software"), to deal
|
||||||
|
# in the Software without restriction, including without limitation the rights
|
||||||
|
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
# copies of the Software, and to permit persons to whom the Software is
|
||||||
|
# furnished to do so, subject to the following conditions:
|
||||||
|
#
|
||||||
|
# The above copyright notice and this permission notice shall be included in
|
||||||
|
# all copies or substantial portions of the Software.
|
||||||
|
#
|
||||||
|
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
|
# THE SOFTWARE.
|
||||||
|
|
||||||
|
def yay_in_path(module):
|
||||||
|
rc, _, _ = module.run_command('which yay', check_rc=False)
|
||||||
|
return rc == 0
|
||||||
|
|
||||||
|
|
||||||
|
def pacman_in_path(module):
|
||||||
|
rc, _, _ = module.run_command('which pacman', check_rc=False)
|
||||||
|
return rc == 0
|
||||||
|
|
||||||
|
def get_version(yay_output):
|
||||||
|
'''Take yay -Qi or yay -Si output and get the Version'''
|
||||||
|
lines = yay_output.split('\n')
|
||||||
|
for line in lines:
|
||||||
|
if 'Version' in line:
|
||||||
|
return line.split(':')[1].strip()
|
||||||
|
return None
|
||||||
|
|
||||||
|
def query_package(module, pkg, state):
|
||||||
|
'''
|
||||||
|
Query the package status in both the local system and the repository.
|
||||||
|
Returns three booleans to indicate:
|
||||||
|
* If the package is installed
|
||||||
|
* If the package is up-to-date
|
||||||
|
* Whether online information was available
|
||||||
|
'''
|
||||||
|
local_check_cmd = 'yay -Qi %s' % pkg
|
||||||
|
local_check_rc, local_check_stdout, _ = module.run_command(local_check_cmd, check_rc=False)
|
||||||
|
if local_check_rc != 0:
|
||||||
|
return False, False, False
|
||||||
|
|
||||||
|
# No need to check for the repo version in some situations
|
||||||
|
# Indicate the package is out-of-date, because we chose not to check
|
||||||
|
if state == 'present' or state == 'absent':
|
||||||
|
return True, False, False
|
||||||
|
|
||||||
|
local_version = get_version(local_check_stdout)
|
||||||
|
|
||||||
|
repo_check_cmd = 'yay -Si %s' % pkg
|
||||||
|
repo_check_rc, repo_check_stdout, repo_check_stderr = module.run_command(repo_check_cmd, check_rc=False)
|
||||||
|
repo_version = get_version(repo_check_stdout)
|
||||||
|
|
||||||
|
if repo_check_rc == 0 and repo_check_stderr == '':
|
||||||
|
return True, (local_version == repo_version), False
|
||||||
|
else:
|
||||||
|
# Indicate package is up-to-date, but just because we hit an error contacting the repo
|
||||||
|
return True, True, True
|
||||||
|
|
||||||
|
def update_package_db(module):
|
||||||
|
rc, _, stderr = module.run_command('yay -Sy', check_rc=False)
|
||||||
|
|
||||||
|
if rc == 0 and stderr == '':
|
||||||
|
return False, 'Package DB up-to-date'
|
||||||
|
elif rc == 1 and stderr == '':
|
||||||
|
return True, 'Updated the package DB'
|
||||||
|
else:
|
||||||
|
module.fail_json(msg='could not update package db: %s' % stderr)
|
||||||
|
|
||||||
|
def upgrade(module):
|
||||||
|
check_rc, check_stdout, check_stderr = module.run_command('yay -Qqu', check_rc=False)
|
||||||
|
|
||||||
|
if check_rc == 0 and check_stderr == '' and module.check_mode:
|
||||||
|
return True, '%s package(s) would be upgraded' % (len(check_stdout.split('\n')) - 1)
|
||||||
|
elif check_rc == 0 and check_stderr == '' and not module.check_mode:
|
||||||
|
upgrade_rc, _, upgrade_stderr = module.run_command(
|
||||||
|
'yay -Su --noconfirm',
|
||||||
|
check_rc=False,
|
||||||
|
)
|
||||||
|
|
||||||
|
if upgrade_rc == 0:
|
||||||
|
return True, 'System upgraded'
|
||||||
|
else:
|
||||||
|
module.fail_json(msg='unable to upgrade: %s' % upgrade_stderr)
|
||||||
|
elif check_rc == 1 and check_stderr == '':
|
||||||
|
return False, 'Nothing to upgrade'
|
||||||
|
else:
|
||||||
|
module.fail_json(msg='unable to check for upgrade: %s' % check_stderr)
|
||||||
|
|
||||||
|
def get_sudo_user(module):
|
||||||
|
# ansible sets the SUDO_USER environment variable. Default to using this,
|
||||||
|
# checking USER and then `logname` as backups.
|
||||||
|
user = os.environ.get('SUDO_USER')
|
||||||
|
|
||||||
|
# If ansible is run as root with become_user set, use the specified user
|
||||||
|
# instead of root.
|
||||||
|
if not user or user == 'root':
|
||||||
|
user = os.environ.get('USER')
|
||||||
|
|
||||||
|
if not user:
|
||||||
|
rc, stdout, _ = module.run_command('logname', check_rc=True)
|
||||||
|
user = stdout
|
||||||
|
|
||||||
|
return user
|
||||||
|
|
||||||
|
def check_packages(module, pkgs, state):
|
||||||
|
would_be_changed = []
|
||||||
|
|
||||||
|
for pkg in pkgs:
|
||||||
|
installed, updated, _ = query_package(module, pkg, state)
|
||||||
|
if ((state in ['present', 'latest'] and not installed) or
|
||||||
|
(state == 'latest' and not updated) or
|
||||||
|
(state == 'absent' and installed)):
|
||||||
|
would_be_changed.append(pkg)
|
||||||
|
|
||||||
|
word = 'installed'
|
||||||
|
if state == 'absent':
|
||||||
|
word = 'removed'
|
||||||
|
|
||||||
|
if would_be_changed:
|
||||||
|
return True, '%s package(s) would be %s' % (len(would_be_changed), word)
|
||||||
|
else:
|
||||||
|
return False, 'All packages are already %s' % word
|
||||||
|
|
||||||
|
def install_packages(module, pkgs, state):
|
||||||
|
num_installed = 0
|
||||||
|
package_err = []
|
||||||
|
message = ''
|
||||||
|
|
||||||
|
sudo_user = get_sudo_user(module)
|
||||||
|
cmd = 'sudo -u %s yay --noconfirm -S %s'
|
||||||
|
|
||||||
|
for pkg in pkgs:
|
||||||
|
installed, updated, latest_error = query_package(module, pkg, state)
|
||||||
|
if latest_error and state == 'latest':
|
||||||
|
package_err.append(pkg)
|
||||||
|
|
||||||
|
if installed and (state == 'present' or (state == 'latest' and updated)):
|
||||||
|
continue
|
||||||
|
|
||||||
|
rc, _, stderr = module.run_command(cmd % (sudo_user, pkg), check_rc=False)
|
||||||
|
|
||||||
|
if rc != 0:
|
||||||
|
module.fail_json(msg='Failed to install package %s, because: %s' % (pkg, stderr))
|
||||||
|
|
||||||
|
num_installed += 1
|
||||||
|
|
||||||
|
if state == 'latest' and len(package_err) > 0:
|
||||||
|
message = 'But could not ensure "latest" state for %s package(s) as remote version could not be fetched.' % package_err
|
||||||
|
|
||||||
|
if num_installed > 0:
|
||||||
|
return True, 'Installed %s package(s). %s' % (num_installed, message)
|
||||||
|
else:
|
||||||
|
return False, 'All packages were already installed. %s' % message
|
||||||
|
|
||||||
|
def remove_packages(module, pkgs, recurse, state):
|
||||||
|
num_removed = 0
|
||||||
|
|
||||||
|
arg = 'R'
|
||||||
|
word = 'remove'
|
||||||
|
if recurse:
|
||||||
|
arg = 'Rs'
|
||||||
|
word = 'recursively remove'
|
||||||
|
|
||||||
|
cmd = 'pacman -%s --noconfirm %s'
|
||||||
|
|
||||||
|
for pkg in pkgs:
|
||||||
|
installed, _, _ = query_package(module, pkg, state)
|
||||||
|
if not installed:
|
||||||
|
continue
|
||||||
|
|
||||||
|
rc, _, stderr = module.run_command(cmd % (arg, pkg), check_rc=False)
|
||||||
|
|
||||||
|
if rc != 0:
|
||||||
|
module.fail_json(msg='failed to %s package %s because: %s' % (word, pkg, stderr))
|
||||||
|
|
||||||
|
num_removed += 1
|
||||||
|
|
||||||
|
if num_removed > 0:
|
||||||
|
return True, 'Removed %s package(s)' % num_removed
|
||||||
|
else:
|
||||||
|
return False, 'All packages were already removed'
|
||||||
|
|
||||||
|
|
||||||
|
def main():
|
||||||
|
module = AnsibleModule(
|
||||||
|
argument_spec = dict(
|
||||||
|
name = dict(type='list'),
|
||||||
|
state = dict(
|
||||||
|
default='present',
|
||||||
|
choices=['absent', 'present', 'latest'],
|
||||||
|
),
|
||||||
|
recurse = dict(default='no', type='bool'),
|
||||||
|
upgrade = dict(default='no', type='bool'),
|
||||||
|
update_cache = dict(
|
||||||
|
default='no',
|
||||||
|
aliases=['update-cache'],
|
||||||
|
type='bool',
|
||||||
|
),
|
||||||
|
),
|
||||||
|
required_one_of = [['name', 'update_cache', 'upgrade']],
|
||||||
|
supports_check_mode = True
|
||||||
|
)
|
||||||
|
|
||||||
|
if not yay_in_path(module):
|
||||||
|
module.fail_json(msg="could not locate yay executable")
|
||||||
|
|
||||||
|
if not pacman_in_path(module):
|
||||||
|
module.fail_json(msg="could not locate pacman executable")
|
||||||
|
|
||||||
|
p = module.params
|
||||||
|
|
||||||
|
changed = False
|
||||||
|
messages = []
|
||||||
|
if p["update_cache"] and not module.check_mode:
|
||||||
|
updated, update_message = update_package_db(module)
|
||||||
|
changed = changed or updated
|
||||||
|
messages.append(update_message)
|
||||||
|
|
||||||
|
if p['update_cache'] and module.check_mode:
|
||||||
|
changed = True
|
||||||
|
messages.append('Would have updated the package cache')
|
||||||
|
|
||||||
|
if p['upgrade']:
|
||||||
|
upgraded, upgrade_message = upgrade(module)
|
||||||
|
changed = changed or upgraded
|
||||||
|
messages.append(upgrade_message)
|
||||||
|
|
||||||
|
if p['name'] and module.check_mode:
|
||||||
|
packages_would_change, check_message = check_packages(
|
||||||
|
module,
|
||||||
|
p['name'],
|
||||||
|
p['state'],
|
||||||
|
)
|
||||||
|
changed = changed or packages_would_change
|
||||||
|
messages.append(check_message)
|
||||||
|
elif p['name'] and not module.check_mode:
|
||||||
|
if p['name']:
|
||||||
|
if p['state'] in ['present', 'latest']:
|
||||||
|
packages_changed, package_message = install_packages(
|
||||||
|
module,
|
||||||
|
p['name'],
|
||||||
|
p['state'],
|
||||||
|
)
|
||||||
|
elif p['state'] == 'absent':
|
||||||
|
packages_changed, package_message = remove_packages(
|
||||||
|
module,
|
||||||
|
p['name'],
|
||||||
|
p['recurse'],
|
||||||
|
p['state'],
|
||||||
|
)
|
||||||
|
|
||||||
|
changed = changed or packages_changed
|
||||||
|
messages.append(package_message)
|
||||||
|
|
||||||
|
module.exit_json(changed=changed, msg='. '.join(messages))
|
||||||
|
|
||||||
|
|
||||||
|
from ansible.module_utils.basic import *
|
||||||
|
main()
|
||||||
@@ -1,3 +1,10 @@
|
|||||||
|
---
|
||||||
|
- name: Info
|
||||||
|
debug:
|
||||||
|
msg:
|
||||||
|
ansible_os_family: "{{ ansible_os_family }}"
|
||||||
|
ansible_distribution: "{{ ansible_distribution }}"
|
||||||
|
|
||||||
- name: Setting generic facts
|
- name: Setting generic facts
|
||||||
tags: always
|
tags: always
|
||||||
ansible.builtin.set_fact:
|
ansible.builtin.set_fact:
|
||||||
@@ -5,6 +12,7 @@
|
|||||||
home: "/home/alice"
|
home: "/home/alice"
|
||||||
use_become: true
|
use_become: true
|
||||||
mac_os: "{{ ansible_distribution == 'MacOSX' }}"
|
mac_os: "{{ ansible_distribution == 'MacOSX' }}"
|
||||||
|
archlinux: "{{ ansible_distribution == 'Archlinux' }}"
|
||||||
|
|
||||||
- name: Setting macos facts
|
- name: Setting macos facts
|
||||||
tags: always
|
tags: always
|
||||||
|
|||||||
@@ -1,2 +1,4 @@
|
|||||||
dependencies:
|
dependencies:
|
||||||
- role: base_info
|
- role: base_info
|
||||||
|
collections:
|
||||||
|
- kewlfft.aur
|
||||||
|
|||||||
27
playbooks/roles/base_system/tasks/flatpak.yml
Normal file
27
playbooks/roles/base_system/tasks/flatpak.yml
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
---
|
||||||
|
- name: Install dependencies
|
||||||
|
tags:
|
||||||
|
- install
|
||||||
|
become: "{{ use_become }}"
|
||||||
|
ansible.builtin.package:
|
||||||
|
name: flatpak
|
||||||
|
|
||||||
|
- name: Add the flathub flatpak repository remote to the user installation
|
||||||
|
become: "{{ use_become }}"
|
||||||
|
become_user: "{{ username }}"
|
||||||
|
tags:
|
||||||
|
- config
|
||||||
|
community.general.flatpak_remote:
|
||||||
|
name: flathub
|
||||||
|
state: present
|
||||||
|
flatpakrepo_url: https://dl.flathub.org/repo/flathub.flatpakrepo
|
||||||
|
method: user
|
||||||
|
|
||||||
|
- name: Add the flathub flatpak repository remote
|
||||||
|
tags:
|
||||||
|
- config
|
||||||
|
become: "{{ use_become }}"
|
||||||
|
community.general.flatpak_remote:
|
||||||
|
name: flathub
|
||||||
|
state: present
|
||||||
|
flatpakrepo_url: https://dl.flathub.org/repo/flathub.flatpakrepo
|
||||||
@@ -23,3 +23,15 @@
|
|||||||
path: "{{ home }}"
|
path: "{{ home }}"
|
||||||
state: directory
|
state: directory
|
||||||
owner: "{{ username }}"
|
owner: "{{ username }}"
|
||||||
|
|
||||||
|
- name: Install yay
|
||||||
|
tags:
|
||||||
|
- install
|
||||||
|
when: archlinux
|
||||||
|
include_tasks: yay.yml
|
||||||
|
|
||||||
|
- name: Install flatpak
|
||||||
|
tags:
|
||||||
|
- install
|
||||||
|
when: archlinux
|
||||||
|
include_tasks: flatpak.yml
|
||||||
|
|||||||
21
playbooks/roles/base_system/tasks/yay.yml
Normal file
21
playbooks/roles/base_system/tasks/yay.yml
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
---
|
||||||
|
- name: Create the `aur_builder` user
|
||||||
|
become: yes
|
||||||
|
ansible.builtin.user:
|
||||||
|
name: aur_builder
|
||||||
|
create_home: yes
|
||||||
|
group: wheel
|
||||||
|
|
||||||
|
- name: Allow the `aur_builder` user to run `sudo pacman` without a password
|
||||||
|
become: yes
|
||||||
|
ansible.builtin.lineinfile:
|
||||||
|
path: /etc/sudoers.d/11-install-aur_builder
|
||||||
|
line: "aur_builder ALL=(ALL) NOPASSWD: /usr/bin/pacman"
|
||||||
|
create: yes
|
||||||
|
mode: 0644
|
||||||
|
validate: "visudo -cf %s"
|
||||||
|
|
||||||
|
- name: Yay
|
||||||
|
aur: name=yay use=makepkg state=present
|
||||||
|
become: yes
|
||||||
|
become_user: aur_builder
|
||||||
2
playbooks/roles/base_system/vars/main.yml
Normal file
2
playbooks/roles/base_system/vars/main.yml
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
---
|
||||||
|
srcdir: "{{ home }}/.src"
|
||||||
@@ -1,4 +1,5 @@
|
|||||||
install_with_root: true
|
install_with_root: true
|
||||||
terminal_casks: []
|
terminal_casks: []
|
||||||
pkgs: []
|
terminal_pkgs: []
|
||||||
|
terminal_aur: []
|
||||||
contexts: {}
|
contexts: {}
|
||||||
|
|||||||
@@ -2,3 +2,5 @@
|
|||||||
dependencies:
|
dependencies:
|
||||||
- role: base_info
|
- role: base_info
|
||||||
- role: base_system
|
- role: base_system
|
||||||
|
collections:
|
||||||
|
- kewlfft.aur
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
- name: Setup directories
|
- name: Setup directories
|
||||||
tags:
|
tags:
|
||||||
- config
|
- config
|
||||||
|
become: true
|
||||||
ansible.builtin.file:
|
ansible.builtin.file:
|
||||||
mode: "{{ item.mode }}"
|
mode: "{{ item.mode }}"
|
||||||
path: "{{ home }}/{{ item.path }}"
|
path: "{{ home }}/{{ item.path }}"
|
||||||
@@ -14,6 +15,7 @@
|
|||||||
when: item.state == 'directory'
|
when: item.state == 'directory'
|
||||||
|
|
||||||
- name: Copy config
|
- name: Copy config
|
||||||
|
become: true
|
||||||
tags:
|
tags:
|
||||||
- config
|
- config
|
||||||
ansible.builtin.copy:
|
ansible.builtin.copy:
|
||||||
|
|||||||
@@ -27,3 +27,12 @@
|
|||||||
community.general.homebrew_cask:
|
community.general.homebrew_cask:
|
||||||
name: "{{ terminal_casks }}"
|
name: "{{ terminal_casks }}"
|
||||||
state: installed
|
state: installed
|
||||||
|
|
||||||
|
- name: "Install aur"
|
||||||
|
tags:
|
||||||
|
- install
|
||||||
|
when: terminal_aur
|
||||||
|
become: yes
|
||||||
|
become_user: aur_builder
|
||||||
|
aur:
|
||||||
|
name: "{{ terminal_aur }}"
|
||||||
|
|||||||
15
playbooks/roles/base_terminal/vars/Archlinux.yml
Normal file
15
playbooks/roles/base_terminal/vars/Archlinux.yml
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
---
|
||||||
|
terminal_pkgs:
|
||||||
|
- bat
|
||||||
|
- eza
|
||||||
|
- direnv
|
||||||
|
- fzf
|
||||||
|
- gnupg
|
||||||
|
- jq
|
||||||
|
- ripgrep
|
||||||
|
- neovim
|
||||||
|
- tmux
|
||||||
|
- zoxide
|
||||||
|
- sshpass
|
||||||
|
terminal_aur:
|
||||||
|
- gh
|
||||||
@@ -23,6 +23,7 @@
|
|||||||
- name: "Ensure dir"
|
- name: "Ensure dir"
|
||||||
tags:
|
tags:
|
||||||
- config
|
- config
|
||||||
|
become: "{{ use_become }}"
|
||||||
ansible.builtin.file:
|
ansible.builtin.file:
|
||||||
path: "{{ home }}/.config/dunst"
|
path: "{{ home }}/.config/dunst"
|
||||||
state: directory
|
state: directory
|
||||||
@@ -32,6 +33,7 @@
|
|||||||
- name: "Copy templates"
|
- name: "Copy templates"
|
||||||
tags:
|
tags:
|
||||||
- config
|
- config
|
||||||
|
become: "{{ use_become }}"
|
||||||
ansible.builtin.template:
|
ansible.builtin.template:
|
||||||
src: "{{ item.src }}"
|
src: "{{ item.src }}"
|
||||||
dest: "{{ home }}/.config/dunst/{{ item.path | regex_replace('\\.j2$', '') }}"
|
dest: "{{ home }}/.config/dunst/{{ item.path | regex_replace('\\.j2$', '') }}"
|
||||||
|
|||||||
@@ -20,9 +20,18 @@
|
|||||||
ansible.builtin.package:
|
ansible.builtin.package:
|
||||||
name: "{{ desktop_hyprland_pkgs }}"
|
name: "{{ desktop_hyprland_pkgs }}"
|
||||||
|
|
||||||
|
- name: "Install flatpak"
|
||||||
|
tags:
|
||||||
|
- install
|
||||||
|
when: desktop_hyprland_flatpak
|
||||||
|
become: "{{ install_with_root }}"
|
||||||
|
community.general.flatpak:
|
||||||
|
name: "{{ desktop_hyprland_flatpak }}"
|
||||||
|
|
||||||
- name: "Ensure dir"
|
- name: "Ensure dir"
|
||||||
tags:
|
tags:
|
||||||
- config
|
- config
|
||||||
|
become: "{{ use_become }}"
|
||||||
ansible.builtin.file:
|
ansible.builtin.file:
|
||||||
path: "{{ home }}/.config/hypr"
|
path: "{{ home }}/.config/hypr"
|
||||||
state: directory
|
state: directory
|
||||||
@@ -32,6 +41,7 @@
|
|||||||
- name: "Copy templates"
|
- name: "Copy templates"
|
||||||
tags:
|
tags:
|
||||||
- config
|
- config
|
||||||
|
become: "{{ use_become }}"
|
||||||
ansible.builtin.template:
|
ansible.builtin.template:
|
||||||
src: "{{ item.src }}"
|
src: "{{ item.src }}"
|
||||||
dest: "{{ home }}/.config/hypr/{{ item.path | regex_replace('\\.j2$', '') }}"
|
dest: "{{ home }}/.config/hypr/{{ item.path | regex_replace('\\.j2$', '') }}"
|
||||||
|
|||||||
@@ -4,8 +4,7 @@ $browser = firefox
|
|||||||
bind = SUPER, Return, exec, $term
|
bind = SUPER, Return, exec, $term
|
||||||
bind = SUPER SHIFT, Return, exec, $browser
|
bind = SUPER SHIFT, Return, exec, $browser
|
||||||
bind = SUPER, E, exec, $files
|
bind = SUPER, E, exec, $files
|
||||||
bind = SUPER, D, exec, killall rofi || rofi -show drun -theme ~/.config/rofi/config.rasi
|
bind = SUPER, D, exec, killall wofi || wofi -show drun
|
||||||
bind = SUPER, period, exec, killall rofi || rofi -show emoji -emoji-format "{emoji}" -modi emoji -theme ~/.config/rofi/global/emoji
|
|
||||||
bind = SUPER SHIFT, B, exec, killall -SIGUSR2 waybar # Reload waybar
|
bind = SUPER SHIFT, B, exec, killall -SIGUSR2 waybar # Reload waybar
|
||||||
bind = SUPER, B, exec, killall -SIGUSR1 waybar # Hide waybar
|
bind = SUPER, B, exec, killall -SIGUSR1 waybar # Hide waybar
|
||||||
|
|
||||||
@@ -86,4 +85,4 @@ bind = SUPER, mouse_up, workspace, e-1
|
|||||||
binde = ,XF86MonBrightnessDown, exec, brightnessctl set 10%-
|
binde = ,XF86MonBrightnessDown, exec, brightnessctl set 10%-
|
||||||
binde = ,XF86MonBrightnessUp, exec, brightnessctl set 10%+
|
binde = ,XF86MonBrightnessUp, exec, brightnessctl set 10%+
|
||||||
|
|
||||||
bind = SUPER, L, exec, systemctl suspend
|
bind = SUPER CTRL, L, exec, systemctl suspend
|
||||||
|
|||||||
@@ -3,3 +3,8 @@ desktop_hyprland_pkgs:
|
|||||||
- hyprland
|
- hyprland
|
||||||
- hyprlock
|
- hyprlock
|
||||||
- swaybg
|
- swaybg
|
||||||
|
- wofi
|
||||||
|
desktop_hyprland_flatpak:
|
||||||
|
- org.mozilla.firefox
|
||||||
|
- com.spotify.Client
|
||||||
|
- com.github.iwalton3.jellyfin-media-player
|
||||||
|
|||||||
@@ -15,7 +15,7 @@
|
|||||||
- name: "Install dependencies"
|
- name: "Install dependencies"
|
||||||
tags:
|
tags:
|
||||||
- install
|
- install
|
||||||
when: desktop_kitty_pks
|
when: desktop_kitty_pkgs
|
||||||
become: "{{ install_with_root }}"
|
become: "{{ install_with_root }}"
|
||||||
ansible.builtin.package:
|
ansible.builtin.package:
|
||||||
name: "{{ desktop_kitty_pkgs }}"
|
name: "{{ desktop_kitty_pkgs }}"
|
||||||
@@ -23,8 +23,9 @@
|
|||||||
- name: "Ensure dir"
|
- name: "Ensure dir"
|
||||||
tags:
|
tags:
|
||||||
- config
|
- config
|
||||||
|
become: "{{ use_become }}"
|
||||||
ansible.builtin.file:
|
ansible.builtin.file:
|
||||||
path: "{{ home }}/.config/dunst"
|
path: "{{ home }}/.config/kitty"
|
||||||
state: directory
|
state: directory
|
||||||
mode: "0700"
|
mode: "0700"
|
||||||
owner: "{{ username }}"
|
owner: "{{ username }}"
|
||||||
@@ -32,6 +33,7 @@
|
|||||||
- name: "Copy templates"
|
- name: "Copy templates"
|
||||||
tags:
|
tags:
|
||||||
- config
|
- config
|
||||||
|
become: "{{ use_become }}"
|
||||||
ansible.builtin.template:
|
ansible.builtin.template:
|
||||||
src: "{{ item.src }}"
|
src: "{{ item.src }}"
|
||||||
dest: "{{ home }}/.config/kitty/{{ item.path | regex_replace('\\.j2$', '') }}"
|
dest: "{{ home }}/.config/kitty/{{ item.path | regex_replace('\\.j2$', '') }}"
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
---
|
---
|
||||||
- name: Download atuin
|
- name: Download atuin
|
||||||
tags: always
|
tags: always
|
||||||
|
become: "{{ use_become }}"
|
||||||
ansible.builtin.get_url:
|
ansible.builtin.get_url:
|
||||||
url: "{{ software_atuin_download_url }}"
|
url: "{{ software_atuin_download_url }}"
|
||||||
dest: "{{ software_atuin_download_dir }}"
|
dest: "{{ software_atuin_download_dir }}"
|
||||||
@@ -8,6 +9,7 @@
|
|||||||
|
|
||||||
- name: Create dir
|
- name: Create dir
|
||||||
tags: always
|
tags: always
|
||||||
|
become: "{{ use_become }}"
|
||||||
ansible.builtin.file:
|
ansible.builtin.file:
|
||||||
path: "{{ software_atuin_unpack_dir }}"
|
path: "{{ software_atuin_unpack_dir }}"
|
||||||
mode: "0755"
|
mode: "0755"
|
||||||
@@ -15,12 +17,15 @@
|
|||||||
|
|
||||||
- name: Unpacking atuin
|
- name: Unpacking atuin
|
||||||
tags: always
|
tags: always
|
||||||
|
become: "{{ use_become }}"
|
||||||
ansible.builtin.unarchive:
|
ansible.builtin.unarchive:
|
||||||
|
remote_src: true
|
||||||
src: "{{ software_atuin_download_dir }}"
|
src: "{{ software_atuin_download_dir }}"
|
||||||
dest: "{{ software_atuin_unpack_dir }}"
|
dest: "{{ software_atuin_unpack_dir }}"
|
||||||
|
|
||||||
- name: Ensure dir
|
- name: Ensure dir
|
||||||
tags: always
|
tags: always
|
||||||
|
become: "{{ use_become }}"
|
||||||
ansible.builtin.file:
|
ansible.builtin.file:
|
||||||
path: "{{ home }}/.local/bin"
|
path: "{{ home }}/.local/bin"
|
||||||
mode: "0755"
|
mode: "0755"
|
||||||
@@ -29,6 +34,7 @@
|
|||||||
|
|
||||||
- name: Move bin
|
- name: Move bin
|
||||||
tags: always
|
tags: always
|
||||||
|
become: "{{ use_become }}"
|
||||||
ansible.builtin.copy:
|
ansible.builtin.copy:
|
||||||
remote_src: true
|
remote_src: true
|
||||||
mode: "0755"
|
mode: "0755"
|
||||||
@@ -37,6 +43,7 @@
|
|||||||
|
|
||||||
- name: Cleanup
|
- name: Cleanup
|
||||||
tags: always
|
tags: always
|
||||||
|
become: "{{ use_become }}"
|
||||||
ansible.builtin.file:
|
ansible.builtin.file:
|
||||||
path: "{{ software_atuin_unpack_file }}"
|
path: "{{ software_atuin_unpack_file }}"
|
||||||
state: absent
|
state: absent
|
||||||
@@ -44,6 +51,7 @@
|
|||||||
- name: Setup config dirctories
|
- name: Setup config dirctories
|
||||||
tags:
|
tags:
|
||||||
- config
|
- config
|
||||||
|
become: "{{ use_become }}"
|
||||||
ansible.builtin.file:
|
ansible.builtin.file:
|
||||||
mode: "{{ item.mode }}"
|
mode: "{{ item.mode }}"
|
||||||
path: "{{ home }}/{{ item.path }}"
|
path: "{{ home }}/{{ item.path }}"
|
||||||
@@ -58,6 +66,7 @@
|
|||||||
- name: Copy config {{ context }}
|
- name: Copy config {{ context }}
|
||||||
tags:
|
tags:
|
||||||
- config
|
- config
|
||||||
|
become: "{{ use_become }}"
|
||||||
ansible.builtin.copy:
|
ansible.builtin.copy:
|
||||||
src: "{{ item.src }}"
|
src: "{{ item.src }}"
|
||||||
dest: "{{ home }}/{{ item.path }}"
|
dest: "{{ home }}/{{ item.path }}"
|
||||||
|
|||||||
@@ -13,6 +13,7 @@
|
|||||||
tags:
|
tags:
|
||||||
- git
|
- git
|
||||||
- config
|
- config
|
||||||
|
become: "{{ use_become }}"
|
||||||
ansible.builtin.file:
|
ansible.builtin.file:
|
||||||
mode: "{{ item.mode }}"
|
mode: "{{ item.mode }}"
|
||||||
path: "{{ home }}/{{ item.path }}"
|
path: "{{ home }}/{{ item.path }}"
|
||||||
@@ -28,6 +29,7 @@
|
|||||||
tags:
|
tags:
|
||||||
- git
|
- git
|
||||||
- config
|
- config
|
||||||
|
become: "{{ use_become }}"
|
||||||
ansible.builtin.copy:
|
ansible.builtin.copy:
|
||||||
src: "{{ item.src }}"
|
src: "{{ item.src }}"
|
||||||
dest: "{{ home }}/{{ item.path }}"
|
dest: "{{ home }}/{{ item.path }}"
|
||||||
@@ -43,6 +45,7 @@
|
|||||||
tags:
|
tags:
|
||||||
- git
|
- git
|
||||||
- config
|
- config
|
||||||
|
become: "{{ use_become }}"
|
||||||
ansible.builtin.template:
|
ansible.builtin.template:
|
||||||
src: "../templates/gitconfig.j2"
|
src: "../templates/gitconfig.j2"
|
||||||
dest: "{{ home }}/.gitconfig"
|
dest: "{{ home }}/.gitconfig"
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
tags:
|
tags:
|
||||||
- git
|
- git
|
||||||
- config
|
- config
|
||||||
|
become: "{{ use_become }}"
|
||||||
ansible.builtin.template:
|
ansible.builtin.template:
|
||||||
src: "../templates/gitconfig.context.j2"
|
src: "../templates/gitconfig.context.j2"
|
||||||
dest: "{{ context.path }}/.gitconfig"
|
dest: "{{ context.path }}/.gitconfig"
|
||||||
@@ -16,6 +17,7 @@
|
|||||||
tags:
|
tags:
|
||||||
- git
|
- git
|
||||||
- config
|
- config
|
||||||
|
become: "{{ use_become }}"
|
||||||
ansible.builtin.file:
|
ansible.builtin.file:
|
||||||
path: "{{ context.path }}"
|
path: "{{ context.path }}"
|
||||||
state: directory
|
state: directory
|
||||||
@@ -26,6 +28,7 @@
|
|||||||
tags:
|
tags:
|
||||||
- git
|
- git
|
||||||
- config
|
- config
|
||||||
|
become: "{{ use_become }}"
|
||||||
ansible.builtin.template:
|
ansible.builtin.template:
|
||||||
src: "../templates/sshconfig.context.j2"
|
src: "../templates/sshconfig.context.j2"
|
||||||
dest: "{{ home }}/.ssh/config.d/git-{{ name }}"
|
dest: "{{ home }}/.ssh/config.d/git-{{ name }}"
|
||||||
@@ -39,6 +42,7 @@
|
|||||||
tags:
|
tags:
|
||||||
- git
|
- git
|
||||||
- config
|
- config
|
||||||
|
become: "{{ use_become }}"
|
||||||
ansible.builtin.file:
|
ansible.builtin.file:
|
||||||
path: "{{ home }}/.ssh/keys"
|
path: "{{ home }}/.ssh/keys"
|
||||||
state: directory
|
state: directory
|
||||||
@@ -49,6 +53,7 @@
|
|||||||
tags:
|
tags:
|
||||||
- git
|
- git
|
||||||
- config
|
- config
|
||||||
|
become: "{{ use_become }}"
|
||||||
ansible.builtin.copy:
|
ansible.builtin.copy:
|
||||||
content: "{{ context.git.signing_key }}"
|
content: "{{ context.git.signing_key }}"
|
||||||
dest: "{{ home }}/.ssh/keys/github-{{ name }}.pub"
|
dest: "{{ home }}/.ssh/keys/github-{{ name }}.pub"
|
||||||
|
|||||||
@@ -12,6 +12,7 @@
|
|||||||
tags:
|
tags:
|
||||||
- nvim
|
- nvim
|
||||||
- config
|
- config
|
||||||
|
become: "{{ use_become }}"
|
||||||
ansible.builtin.file:
|
ansible.builtin.file:
|
||||||
mode: "{{ item.mode }}"
|
mode: "{{ item.mode }}"
|
||||||
path: "{{ home }}/{{ item.path }}"
|
path: "{{ home }}/{{ item.path }}"
|
||||||
@@ -27,6 +28,7 @@
|
|||||||
tags:
|
tags:
|
||||||
- nvim
|
- nvim
|
||||||
- config
|
- config
|
||||||
|
become: "{{ use_become }}"
|
||||||
ansible.builtin.copy:
|
ansible.builtin.copy:
|
||||||
src: "{{ item.src }}"
|
src: "{{ item.src }}"
|
||||||
dest: "{{ home }}/{{ item.path }}"
|
dest: "{{ home }}/{{ item.path }}"
|
||||||
@@ -56,6 +58,7 @@
|
|||||||
tags:
|
tags:
|
||||||
- config
|
- config
|
||||||
- nvim
|
- nvim
|
||||||
|
become: "{{ use_become }}"
|
||||||
ansible.builtin.file:
|
ansible.builtin.file:
|
||||||
path: "{{ home }}/.config"
|
path: "{{ home }}/.config"
|
||||||
owner: "{{ username }}"
|
owner: "{{ username }}"
|
||||||
@@ -66,6 +69,7 @@
|
|||||||
tags:
|
tags:
|
||||||
- config
|
- config
|
||||||
- nvim
|
- nvim
|
||||||
|
become: "{{ use_become }}"
|
||||||
ansible.builtin.file:
|
ansible.builtin.file:
|
||||||
src: "{{ home }}/Projects/private/nvim"
|
src: "{{ home }}/Projects/private/nvim"
|
||||||
dest: "{{ home }}/.config/nvim"
|
dest: "{{ home }}/.config/nvim"
|
||||||
|
|||||||
@@ -18,19 +18,20 @@
|
|||||||
repo: https://github.com/nvm-sh/nvm
|
repo: https://github.com/nvm-sh/nvm
|
||||||
dest: "{{ home }}/.nvm"
|
dest: "{{ home }}/.nvm"
|
||||||
|
|
||||||
- name: Install node and set version
|
# - name: Install node and set version
|
||||||
tags:
|
# tags:
|
||||||
- config
|
# - config
|
||||||
become_user: "{{ username }}"
|
# become_user: "{{ username }}"
|
||||||
register: nodeinstall
|
# register: nodeinstall
|
||||||
ansible.builtin.shell: source {{ home }}/.nvm/nvm.sh && nvm install 22
|
# ansible.builtin.shell: source {{ home }}/.nvm/nvm.sh && nvm install 22
|
||||||
changed_when: "'is already installed' not in nodeinstall.stderr"
|
# changed_when: "'is already installed' not in nodeinstall.stderr"
|
||||||
args:
|
# args:
|
||||||
executable: /bin/bash
|
# executable: /bin/bash
|
||||||
|
|
||||||
- name: Setup config dirctories
|
- name: Setup config dirctories
|
||||||
tags:
|
tags:
|
||||||
- config
|
- config
|
||||||
|
become: "{{ use_become }}"
|
||||||
ansible.builtin.file:
|
ansible.builtin.file:
|
||||||
mode: "{{ item.mode }}"
|
mode: "{{ item.mode }}"
|
||||||
path: "{{ home }}/{{ item.path }}"
|
path: "{{ home }}/{{ item.path }}"
|
||||||
@@ -45,6 +46,7 @@
|
|||||||
- name: Copy config {{ context }}
|
- name: Copy config {{ context }}
|
||||||
tags:
|
tags:
|
||||||
- config
|
- config
|
||||||
|
become: "{{ use_become }}"
|
||||||
ansible.builtin.copy:
|
ansible.builtin.copy:
|
||||||
src: "{{ item.src }}"
|
src: "{{ item.src }}"
|
||||||
dest: "{{ home }}/{{ item.path }}"
|
dest: "{{ home }}/{{ item.path }}"
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
---
|
---
|
||||||
- name: Ensure dir
|
- name: Ensure dir
|
||||||
|
become: "{{ use_become }}"
|
||||||
tags:
|
tags:
|
||||||
- config
|
- config
|
||||||
ansible.builtin.file:
|
ansible.builtin.file:
|
||||||
@@ -9,6 +10,7 @@
|
|||||||
state: directory
|
state: directory
|
||||||
|
|
||||||
- name: Setup config
|
- name: Setup config
|
||||||
|
become: "{{ use_become }}"
|
||||||
tags:
|
tags:
|
||||||
- config
|
- config
|
||||||
ansible.builtin.template:
|
ansible.builtin.template:
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
- name: Download starship
|
- name: Download starship
|
||||||
tags: always
|
tags: always
|
||||||
|
become: "{{ use_become }}"
|
||||||
ansible.builtin.get_url:
|
ansible.builtin.get_url:
|
||||||
mode: "0600"
|
mode: "0600"
|
||||||
url: "{{ software_starship_download_url }}"
|
url: "{{ software_starship_download_url }}"
|
||||||
@@ -7,6 +8,7 @@
|
|||||||
|
|
||||||
- name: Create dir
|
- name: Create dir
|
||||||
tags: always
|
tags: always
|
||||||
|
become: "{{ use_become }}"
|
||||||
ansible.builtin.file:
|
ansible.builtin.file:
|
||||||
mode: "0755"
|
mode: "0755"
|
||||||
path: "{{ software_starship_unpack_dir }}"
|
path: "{{ software_starship_unpack_dir }}"
|
||||||
@@ -14,12 +16,15 @@
|
|||||||
|
|
||||||
- name: Extract starship
|
- name: Extract starship
|
||||||
tags: always
|
tags: always
|
||||||
|
become: "{{ use_become }}"
|
||||||
ansible.builtin.unarchive:
|
ansible.builtin.unarchive:
|
||||||
|
remote_src: true
|
||||||
src: "{{ software_starship_download_dir }}"
|
src: "{{ software_starship_download_dir }}"
|
||||||
dest: "{{ software_starship_unpack_dir }}"
|
dest: "{{ software_starship_unpack_dir }}"
|
||||||
|
|
||||||
- name: Ensure dir
|
- name: Ensure dir
|
||||||
tags: always
|
tags: always
|
||||||
|
become: "{{ use_become }}"
|
||||||
ansible.builtin.file:
|
ansible.builtin.file:
|
||||||
mode: "0755"
|
mode: "0755"
|
||||||
path: "{{ home }}/.local/bin"
|
path: "{{ home }}/.local/bin"
|
||||||
@@ -28,6 +33,7 @@
|
|||||||
|
|
||||||
- name: Move bin
|
- name: Move bin
|
||||||
tags: always
|
tags: always
|
||||||
|
become: "{{ use_become }}"
|
||||||
ansible.builtin.copy:
|
ansible.builtin.copy:
|
||||||
remote_src: true
|
remote_src: true
|
||||||
mode: "0755"
|
mode: "0755"
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
- name: Copy config
|
- name: Copy config
|
||||||
tags:
|
tags:
|
||||||
- config
|
- config
|
||||||
|
become: "{{ use_become }}"
|
||||||
ansible.builtin.file:
|
ansible.builtin.file:
|
||||||
mode: "{{ item.mode }}"
|
mode: "{{ item.mode }}"
|
||||||
path: "{{ home }}/{{ item.path }}"
|
path: "{{ home }}/{{ item.path }}"
|
||||||
@@ -16,6 +17,7 @@
|
|||||||
- name: "Copy templates"
|
- name: "Copy templates"
|
||||||
tags:
|
tags:
|
||||||
- config
|
- config
|
||||||
|
become: "{{ use_become }}"
|
||||||
ansible.builtin.template:
|
ansible.builtin.template:
|
||||||
src: "{{ item.src }}"
|
src: "{{ item.src }}"
|
||||||
dest: "{{ home }}/{{ item.path | regex_replace('\\.j2$', '') }}"
|
dest: "{{ home }}/{{ item.path | regex_replace('\\.j2$', '') }}"
|
||||||
@@ -30,6 +32,7 @@
|
|||||||
- name: Copy config
|
- name: Copy config
|
||||||
tags:
|
tags:
|
||||||
- config
|
- config
|
||||||
|
become: "{{ use_become }}"
|
||||||
ansible.builtin.copy:
|
ansible.builtin.copy:
|
||||||
src: "{{ item.src }}"
|
src: "{{ item.src }}"
|
||||||
dest: "{{ home }}/{{ item.path }}"
|
dest: "{{ home }}/{{ item.path }}"
|
||||||
|
|||||||
@@ -18,6 +18,7 @@
|
|||||||
- name: Copy config
|
- name: Copy config
|
||||||
tags:
|
tags:
|
||||||
- config
|
- config
|
||||||
|
become: "{{ use_become }}"
|
||||||
ansible.builtin.file:
|
ansible.builtin.file:
|
||||||
mode: "{{ item.mode }}"
|
mode: "{{ item.mode }}"
|
||||||
path: "{{ home }}/{{ item.path }}"
|
path: "{{ home }}/{{ item.path }}"
|
||||||
@@ -32,6 +33,7 @@
|
|||||||
- name: "Copy templates"
|
- name: "Copy templates"
|
||||||
tags:
|
tags:
|
||||||
- config
|
- config
|
||||||
|
become: "{{ use_become }}"
|
||||||
ansible.builtin.template:
|
ansible.builtin.template:
|
||||||
src: "{{ item.src }}"
|
src: "{{ item.src }}"
|
||||||
dest: "{{ home }}/{{ item.path | regex_replace('\\.j2$', '') }}"
|
dest: "{{ home }}/{{ item.path | regex_replace('\\.j2$', '') }}"
|
||||||
@@ -46,6 +48,7 @@
|
|||||||
- name: Copy config
|
- name: Copy config
|
||||||
tags:
|
tags:
|
||||||
- config
|
- config
|
||||||
|
become: "{{ use_become }}"
|
||||||
ansible.builtin.copy:
|
ansible.builtin.copy:
|
||||||
src: "{{ item.src }}"
|
src: "{{ item.src }}"
|
||||||
dest: "{{ home }}/{{ item.path }}"
|
dest: "{{ home }}/{{ item.path }}"
|
||||||
|
|||||||
@@ -1,5 +0,0 @@
|
|||||||
---
|
|
||||||
- name: Setup host
|
|
||||||
hosts: localhost
|
|
||||||
roles:
|
|
||||||
- desktop_hyprland
|
|
||||||
3
requirements.yml
Normal file
3
requirements.yml
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
---
|
||||||
|
collections:
|
||||||
|
- kewlfft.aur
|
||||||
Reference in New Issue
Block a user