Create directories in a separate task
This commit is contained in:
parent
8352272bb5
commit
7869dbb013
3 changed files with 19 additions and 8 deletions
17
roles/home/tasks/dirs.yml
Normal file
17
roles/home/tasks/dirs.yml
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
---
|
||||||
|
- name: Create user bin directory
|
||||||
|
file:
|
||||||
|
path: "{{ ansible_env.HOME }}/bin"
|
||||||
|
state: directory
|
||||||
|
- name: Create user opt directory
|
||||||
|
file:
|
||||||
|
path: "{{ ansible_env.HOME }}/opt"
|
||||||
|
state: directory
|
||||||
|
- name: Create systemd user directory
|
||||||
|
file:
|
||||||
|
path: "{{ ansible_env.HOME }}/.config/systemd/user"
|
||||||
|
state: directory
|
||||||
|
- name: Create user applications directory
|
||||||
|
file:
|
||||||
|
path: "{{ ansible_env.HOME }}/.local/share/applications"
|
||||||
|
state: directory
|
|
@ -10,10 +10,6 @@
|
||||||
recurse: yes
|
recurse: yes
|
||||||
depth: 3
|
depth: 3
|
||||||
register: emacs_service_files
|
register: emacs_service_files
|
||||||
- name: Create systemd user directory
|
|
||||||
file:
|
|
||||||
path: "{{ ansible_env.HOME }}/.config/systemd/user"
|
|
||||||
state: directory
|
|
||||||
- name: Create Emacs user service
|
- name: Create Emacs user service
|
||||||
copy:
|
copy:
|
||||||
src: '{{ item.path }}'
|
src: '{{ item.path }}'
|
||||||
|
@ -27,10 +23,6 @@
|
||||||
daemon_reload: yes
|
daemon_reload: yes
|
||||||
enabled: yes
|
enabled: yes
|
||||||
state: started
|
state: started
|
||||||
- name: Create user applications directory
|
|
||||||
file:
|
|
||||||
path: "{{ ansible_env.HOME }}/.local/share/applications"
|
|
||||||
state: directory
|
|
||||||
- name: Create Emacs client launcher
|
- name: Create Emacs client launcher
|
||||||
copy:
|
copy:
|
||||||
src: "{{ ansible_env.HOME }}/.emacs.d/emacs-client.desktop"
|
src: "{{ ansible_env.HOME }}/.emacs.d/emacs-client.desktop"
|
||||||
|
|
|
@ -1,4 +1,6 @@
|
||||||
---
|
---
|
||||||
|
- include: dirs.yml
|
||||||
|
|
||||||
- include: repos.yml
|
- include: repos.yml
|
||||||
- include: vim.yml
|
- include: vim.yml
|
||||||
- include: shell.yml
|
- include: shell.yml
|
||||||
|
|
Loading…
Reference in a new issue