1
0
Fork 0
mirror of https://github.com/roles-ansible/ansible_role_dotfiles.git synced 2024-08-16 16:09:49 +02:00
ansible_role_dotfiles/tasks/main.yml
2019-02-01 14:59:07 +01:00

86 lines
1.7 KiB
YAML

---
- debug: var=bash
- name: install the latest libselinux-python package
dnf:
name: libselinux-python
state: latest
when: ansible_distribution == "Fedora"
- name: Create a global bashrc configuration
template:
src: 'templates/bash.bashrc'
dest: '/etc/bash.bashrc'
owner: root
group: root
mode: 'u=rw,g=r,o=r'
- name: Copy bashrc configuration to admin users
template:
src: 'templates/bashrc'
dest: '/home/{{ item }}/.bashrc'
owner: '{{ item }}'
group: '{{ item }}'
mode: 'u=rw,g=r,o='
with_items: '{{ admins }}'
when: admins is defined
- name: Copy vimrc configuration to root
copy:
src: 'templates/vimrc'
dest: '/root/.vimrc'
owner: root
group: root
mode: 'u=rw,g=r,o='
- name: Copy vimrc configuration to admin users
copy:
src: 'templates/vimrc'
dest: '/home/{{ item }}/.vimrc'
owner: '{{ item }}'
group: '{{ item }}'
mode: 'u=rw,g=r,o='
with_items: "{{ admins }}"
when: admins is defined
- name: install nextcloud-client systemd unit file
template:
src: nextcloud.j2
dest: /etc/systemd/system/nextcloud.service
when: bash.nextcloud
- name: start nextcloud
systemd:
state: started
name: nextcloud
daemon_reload: yes
when: bash.nextcloud
- name: enable nextcloud
systemd:
name: nextcloud
enabled: yes
masked: no
when: bash.nextcloud
- name: install networkmanager-applet systemd unit file
template:
src: nm-applet.j2
dest: /etc/systemd/system/nm-applet.service
when: bash.nm
- name: start nm-applet
systemd:
state: started
name: nm-applet
daemon_reload: yes
when: bash.nm
- name: enable nm-applet
systemd:
name: nm-applet
enabled: yes
masked: no
when: bash.nm