mirror of
https://codeberg.org/ProgramSnail/config.git
synced 2025-12-28 02:08:42 +00:00
init, dotfiles and install basic roles
This commit is contained in:
commit
46bdf4dda0
21 changed files with 283 additions and 0 deletions
27
roles/dotfiles/tasks/bash.yml
Normal file
27
roles/dotfiles/tasks/bash.yml
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
- name: Link bashrc
|
||||
ansible.builtin.file:
|
||||
src: '{{ role_path }}/files/.bashrc'
|
||||
dest: '{{ ansible_env.HOME }}/.bashrc'
|
||||
state: link
|
||||
force: true
|
||||
|
||||
- name: Link inputrc
|
||||
ansible.builtin.file:
|
||||
src: '{{ role_path }}/files/.inputrc'
|
||||
dest: '{{ ansible_env.HOME }}/.inputrc'
|
||||
state: link
|
||||
force: true
|
||||
|
||||
- name: Link profile
|
||||
ansible.builtin.file:
|
||||
src: '{{ role_path }}/files/.profile'
|
||||
dest: '{{ ansible_env.HOME }}/.profile'
|
||||
state: link
|
||||
force: true
|
||||
|
||||
- name: Link bash profile
|
||||
ansible.builtin.file:
|
||||
src: '{{ role_path }}/files/.bash_profile'
|
||||
dest: '{{ ansible_env.HOME }}/.bash_profile'
|
||||
state: link
|
||||
force: true
|
||||
34
roles/dotfiles/tasks/cli.yml
Normal file
34
roles/dotfiles/tasks/cli.yml
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
|
||||
# shell
|
||||
- ansible.builtin.import_tasks: bash.yml
|
||||
|
||||
- name: Link fish configuration directory
|
||||
ansible.builtin.file:
|
||||
src: '{{ role_path }}/files/.config/fish'
|
||||
dest: '{{ ansible_env.HOME }}/.config/fish'
|
||||
state: link
|
||||
force: true
|
||||
|
||||
# apps
|
||||
- name: Link tmux configuration
|
||||
ansible.builtin.file:
|
||||
src: '{{ role_path }}/files/.tmux.conf'
|
||||
dest: '{{ ansible_env.HOME }}/.tmux.conf'
|
||||
state: link
|
||||
force: true
|
||||
|
||||
# TODO: set server keys
|
||||
- name: Link tmate configuration
|
||||
ansible.builtin.file:
|
||||
src: '{{ role_path }}/files/.tmate.conf'
|
||||
dest: '{{ ansible_env.HOME }}/.tmate.conf'
|
||||
state: link
|
||||
force: true
|
||||
|
||||
- name: Link helix configuration
|
||||
ansible.builtin.file:
|
||||
src: '{{ role_path }}/files/.config/helix'
|
||||
dest: '{{ ansible_env.HOME }}/.config/helix'
|
||||
state: link
|
||||
force: true
|
||||
|
||||
1
roles/dotfiles/tasks/de.yml
Normal file
1
roles/dotfiles/tasks/de.yml
Normal file
|
|
@ -0,0 +1 @@
|
|||
# TODO
|
||||
6
roles/dotfiles/tasks/git.yml
Normal file
6
roles/dotfiles/tasks/git.yml
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
- name: Link gitconfig
|
||||
ansible.builtin.file:
|
||||
src: '{{ role_path }}/files/.gitconfig'
|
||||
dest: '{{ ansible_env.HOME }}/.gitconfig'
|
||||
state: link
|
||||
force: true
|
||||
20
roles/dotfiles/tasks/gui.yml
Normal file
20
roles/dotfiles/tasks/gui.yml
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
- name: Link kitty configuration directory
|
||||
ansible.builtin.file:
|
||||
src: '{{ role_path }}/files/.config/kitty'
|
||||
dest: '{{ ansible_env.HOME }}/.config/kitty'
|
||||
state: link
|
||||
force: true
|
||||
|
||||
- name: Link alacritty configuration file
|
||||
ansible.builtin.file:
|
||||
src: '{{ role_path }}/files/.alacritty.toml'
|
||||
dest: '{{ ansible_env.HOME }}/.alacritty.toml'
|
||||
state: link
|
||||
force: true
|
||||
|
||||
- name: Link alacritty configuration directory
|
||||
ansible.builtin.file:
|
||||
src: '{{ role_path }}/files/.config/alacritty'
|
||||
dest: '{{ ansible_env.HOME }}/.config/alacritty'
|
||||
state: link
|
||||
force: true
|
||||
21
roles/dotfiles/tasks/main.yml
Normal file
21
roles/dotfiles/tasks/main.yml
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
- ansible.builtin.import_tasks: bash.yml
|
||||
when: "'bash' in configure"
|
||||
|
||||
- ansible.builtin.import_tasks: cli.yml
|
||||
when: "'cli' in configure"
|
||||
|
||||
- ansible.builtin.import_tasks: git.yml
|
||||
when: "'git' in configure"
|
||||
|
||||
- ansible.builtin.import_tasks: ssh.yml
|
||||
when: "'ssh' in configure"
|
||||
|
||||
- ansible.builtin.import_tasks: gui.yml
|
||||
when: "'gui' in configure"
|
||||
|
||||
- ansible.builtin.import_tasks: scripts.yml
|
||||
when: "'scripts' in configure"
|
||||
|
||||
- ansible.builtin.import_tasks: de.yml
|
||||
when: "'de' in configure"
|
||||
|
||||
6
roles/dotfiles/tasks/scripts.yml
Normal file
6
roles/dotfiles/tasks/scripts.yml
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
- name: Link scripts directory
|
||||
ansible.builtin.file:
|
||||
src: '{{ role_path }}/files/.bin'
|
||||
dest: '{{ ansible_env.HOME }}/.bin'
|
||||
state: link
|
||||
force: true
|
||||
10
roles/dotfiles/tasks/ssh.yml
Normal file
10
roles/dotfiles/tasks/ssh.yml
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
# TODO: create keys ??
|
||||
# TODO: copy directory ??
|
||||
|
||||
# create .ssh in files by hand, use everywere automatically
|
||||
- name: Link gitconfig
|
||||
ansible.builtin.file:
|
||||
src: '{{ role_path }}/files/.ssh'
|
||||
dest: '{{ ansible_env.HOME }}/.ssh'
|
||||
state: link
|
||||
force: true
|
||||
Loading…
Add table
Add a link
Reference in a new issue