Pour tout problème contactez-nous par mail : support@froggit.fr | La FAQ :grey_question: | Rejoignez-nous sur le Chat :speech_balloon:

Skip to content
Snippets Groups Projects
Commit 52218a46 authored by Freezed's avatar Freezed
Browse files

:zap: Isolate system & user configuration

Some tasks were on both side, this will tidy it.
System and user config are now clearly identified.
parent 517b3d60
No related branches found
No related tags found
No related merge requests found
---
- name: FONT | JetBrainsMono presence
when: inventory_hostname in groups.station
ansible.builtin.find:
path: "/usr/local/share/fonts/"
patterns: "JetBrainsMono*"
recurse: yes
register: font_presence
- name: FONT | install JetBrainsMono font
when: (inventory_hostname in groups.station) and
(font_presence.matched < 50)
ansible.builtin.unarchive:
dest: "/usr/local/share/"
remote_src: yes
src: https://download.jetbrains.com/fonts/JetBrainsMono-2.242.zip
...@@ -6,11 +6,11 @@ ...@@ -6,11 +6,11 @@
tasks: tasks:
- name: "IMPORT_TASKS | root" - name: IMPORT_TASKS | font
ansible.builtin.import_tasks: root.yml ansible.builtin.import_tasks: font.yml
- name: "IMPORT_TASKS | ntp" - name: IMPORT_TASKS | ntp
ansible.builtin.import_tasks: ntp.yml ansible.builtin.import_tasks: ntp.yml
- name: "IMPORT_TASKS | {{ my_user }}" - name: IMPORT_TASKS | shell
ansible.builtin.import_tasks: my_user.yml ansible.builtin.import_tasks: shell.yml
---
- name: ROOT | dotfiles presence
become: no
ansible.builtin.copy:
src: "{{ item }}"
dest: "/root/.{{ item | basename }}"
mode: 0640
owner: root
group: root
with_fileglob:
../user_cfg/files/dotfiles/*
loop_control:
label: "{{ item | basename }}"
- name: ROOT | ZSH files absence
become: no
ansible.builtin.file:
path: "/etc/zsh/zlogin"
state: absent
- name: ROOT | Set ZSH for shell
become: no
ansible.builtin.user:
name: root
shell: /bin/zsh
state: present
- name: ROOT | TEMP-FIX font dir absence
become: no
ansible.builtin.file:
path: "/usr/local/share/fonts/fonts/"
state: absent
- name: ROOT | JetBrainsMono presence
become: no
ansible.builtin.find:
path: "/usr/local/share/fonts/"
patterns: "JetBrainsMono*"
recurse: yes
register: font_presence
- name: ROOT | install JetBrainsMono font
become: no
when: font_presence.matched < 50
ansible.builtin.unarchive:
dest: "/usr/local/share/"
remote_src: yes
src: https://download.jetbrains.com/fonts/JetBrainsMono-2.242.zip
--- ---
- name: MY USER | set zsh for shell - name: "SHELL | set zsh for {{ my_user }}"
become: no
ansible.builtin.user: ansible.builtin.user:
name: "{{ my_user }}" name: "{{ my_user }}"
shell: /bin/zsh shell: /bin/zsh
......
...@@ -13,14 +13,8 @@ ...@@ -13,14 +13,8 @@
loop_control: loop_control:
label: "{{ item | basename }}" label: "{{ item | basename }}"
- name: MY USER | set zsh for shell
become: no
ansible.builtin.user:
name: "{{ my_user }}"
shell: /bin/zsh
state: present
- name: MY USER | ssh config - name: MY USER | ssh config
become: yes
ansible.builtin.template: ansible.builtin.template:
src: templates/ssh_config.j2 src: templates/ssh_config.j2
dest: "/home/{{ my_user }}/.ssh/config" dest: "/home/{{ my_user }}/.ssh/config"
...@@ -37,6 +31,7 @@ ...@@ -37,6 +31,7 @@
state: directory state: directory
- name: INCLUDE_VARS | git - name: INCLUDE_VARS | git
when: inventory_hostname in groups.station
ansible.builtin.include_vars: "vars/git.yml" ansible.builtin.include_vars: "vars/git.yml"
- name: MY USER | clone git repos - name: MY USER | clone git repos
...@@ -63,6 +58,8 @@ ...@@ -63,6 +58,8 @@
state: directory state: directory
- name: MY USER | gps prune config - name: MY USER | gps prune config
become: yes
when: inventory_hostname in groups.station
ansible.builtin.template: ansible.builtin.template:
src: templates/pruneconfig.j2 src: templates/pruneconfig.j2
dest: "/home/{{ my_user }}/.pruneconfig" dest: "/home/{{ my_user }}/.pruneconfig"
......
--- ---
- name: ROOT | dotfiles presence - name: ROOT | dotfiles
become: no become: no
ansible.builtin.copy: ansible.builtin.copy:
src: "{{ item }}" src: "{{ item }}"
...@@ -13,37 +13,9 @@ ...@@ -13,37 +13,9 @@
loop_control: loop_control:
label: "{{ item | basename }}" label: "{{ item | basename }}"
- name: ROOT | ZSH files absence - name: ROOT | set zsh for shell
become: no
ansible.builtin.file:
path: "/etc/zsh/zlogin"
state: absent
- name: ROOT | Set ZSH for shell
become: no become: no
ansible.builtin.user: ansible.builtin.user:
name: root name: root
shell: /bin/zsh shell: /bin/zsh
state: present state: present
- name: ROOT | TEMP-FIX font dir absence
become: no
ansible.builtin.file:
path: "/usr/local/share/fonts/fonts/"
state: absent
- name: ROOT | JetBrainsMono presence
become: no
ansible.builtin.find:
path: "/usr/local/share/fonts/"
patterns: "JetBrainsMono*"
recurse: yes
register: font_presence
- name: ROOT | install JetBrainsMono font
become: no
when: font_presence.matched < 50
ansible.builtin.unarchive:
dest: "/usr/local/share/"
remote_src: yes
src: https://download.jetbrains.com/fonts/JetBrainsMono-2.242.zip
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment