mirror of
https://github.com/roles-ansible/ansible_role_dotfiles.git
synced 2024-08-16 16:09:49 +02:00
split config to more subtasks
This commit is contained in:
parent
b34fc14d8b
commit
140381b5a6
4 changed files with 58 additions and 52 deletions
|
@ -13,55 +13,8 @@
|
||||||
ansible.builtin.include_tasks: bashrc.yml
|
ansible.builtin.include_tasks: bashrc.yml
|
||||||
when: dotfiles__modify_bashrc | bool
|
when: dotfiles__modify_bashrc | bool
|
||||||
|
|
||||||
- name: Copy vimrc configuration to root
|
- name: deploy vimrc
|
||||||
become: true
|
ansible.builtin.include_tasks: vimrc.yml
|
||||||
ansible.builtin.copy:
|
|
||||||
src: 'templates/vimrc'
|
|
||||||
dest: '/root/.vimrc'
|
|
||||||
owner: root
|
|
||||||
group: root
|
|
||||||
mode: 'u=rw,g=r,o='
|
|
||||||
|
|
||||||
- name: Copy vimrc configuration to non admin users
|
- name: deploy ranger config
|
||||||
become: true
|
ansible.builtin.include_tasks: ranger.yml
|
||||||
ansible.builtin.copy:
|
|
||||||
src: 'templates/vimrc'
|
|
||||||
dest: '/home/{{ item }}/.vimrc'
|
|
||||||
owner: '{{ item }}'
|
|
||||||
group: '{{ item }}'
|
|
||||||
mode: 'u=rw,g=r,o='
|
|
||||||
with_items: "{{ accounts }}"
|
|
||||||
when:
|
|
||||||
- accounts is defined
|
|
||||||
- accounts != ['root']
|
|
||||||
- accounts != 'root'
|
|
||||||
|
|
||||||
- name: create .config/ranger/ directory
|
|
||||||
become: true
|
|
||||||
ansible.builtin.file:
|
|
||||||
path: "/home/{{ item }}/.config/ranger"
|
|
||||||
state: directory
|
|
||||||
owner: "{{ item }}"
|
|
||||||
group: "{{ item }}"
|
|
||||||
recurse: true
|
|
||||||
with_items: "{{ accounts }}"
|
|
||||||
when:
|
|
||||||
- dotfiles__ranger_hidden_files | bool
|
|
||||||
- accounts is defined
|
|
||||||
- accounts != ['root']
|
|
||||||
- accounts != 'root'
|
|
||||||
|
|
||||||
- name: create .config/ranger/rc.conf file
|
|
||||||
become: true
|
|
||||||
ansible.builtin.template:
|
|
||||||
src: templates/ranger_rc.conf.j2
|
|
||||||
dest: "/home/{{ item }}/.config/ranger/rc.conf"
|
|
||||||
owner: "{{ item }}"
|
|
||||||
group: "{{ item }}"
|
|
||||||
mode: '0644'
|
|
||||||
with_items: "{{ accounts }}"
|
|
||||||
when:
|
|
||||||
- dotfiles__ranger_hidden_files | bool
|
|
||||||
- accounts is defined
|
|
||||||
- accounts != ['root']
|
|
||||||
- accounts != 'root'
|
|
||||||
|
|
30
tasks/ranger.yml
Normal file
30
tasks/ranger.yml
Normal file
|
@ -0,0 +1,30 @@
|
||||||
|
---
|
||||||
|
- name: create .config/ranger/ directory
|
||||||
|
become: true
|
||||||
|
ansible.builtin.file:
|
||||||
|
path: "/home/{{ item }}/.config/ranger"
|
||||||
|
state: directory
|
||||||
|
owner: "{{ item }}"
|
||||||
|
group: "{{ item }}"
|
||||||
|
recurse: true
|
||||||
|
with_items: "{{ accounts }}"
|
||||||
|
when:
|
||||||
|
- dotfiles__ranger_hidden_files | bool
|
||||||
|
- accounts is defined
|
||||||
|
- accounts != ['root']
|
||||||
|
- accounts != 'root'
|
||||||
|
|
||||||
|
- name: create .config/ranger/rc.conf file
|
||||||
|
become: true
|
||||||
|
ansible.builtin.template:
|
||||||
|
src: templates/ranger_rc.conf.j2
|
||||||
|
dest: "/home/{{ item }}/.config/ranger/rc.conf"
|
||||||
|
owner: "{{ item }}"
|
||||||
|
group: "{{ item }}"
|
||||||
|
mode: '0644'
|
||||||
|
with_items: "{{ accounts }}"
|
||||||
|
when:
|
||||||
|
- dotfiles__ranger_hidden_files | bool
|
||||||
|
- accounts is defined
|
||||||
|
- accounts != ['root']
|
||||||
|
- accounts != 'root'
|
23
tasks/vimrc.yml
Normal file
23
tasks/vimrc.yml
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
---
|
||||||
|
- name: Copy vimrc configuration to root
|
||||||
|
become: true
|
||||||
|
ansible.builtin.copy:
|
||||||
|
src: 'templates/vimrc'
|
||||||
|
dest: '/root/.vimrc'
|
||||||
|
owner: root
|
||||||
|
group: root
|
||||||
|
mode: 'u=rw,g=r,o='
|
||||||
|
|
||||||
|
- name: Copy vimrc configuration to non admin users
|
||||||
|
become: true
|
||||||
|
ansible.builtin.copy:
|
||||||
|
src: 'templates/vimrc'
|
||||||
|
dest: '/home/{{ item }}/.vimrc'
|
||||||
|
owner: '{{ item }}'
|
||||||
|
group: '{{ item }}'
|
||||||
|
mode: 'u=rw,g=r,o='
|
||||||
|
with_items: "{{ accounts }}"
|
||||||
|
when:
|
||||||
|
- accounts is defined
|
||||||
|
- accounts != ['root']
|
||||||
|
- accounts != 'root'
|
|
@ -1,3 +1,3 @@
|
||||||
---
|
---
|
||||||
playbook_version_number: 2072 # should be increased integer
|
playbook_version_number: 2073 # should be increased integer
|
||||||
playbook_version_path: 'role_dotfiles_chaos-bodensee_github.version'
|
playbook_version_path: 'role_dotfiles_chaos-bodensee_github.version'
|
||||||
|
|
Loading…
Reference in a new issue