---
- name: Import roles
include_role:
- name: "{{ item }}"
+ name: "{{ fretlink_import_item }}"
loop:
- programming/python
- programming/haskell
- programming/nodejs
+ loop_control:
+ loop_var: fretlink_import_item
- name: Config dirs
file:
state: directory
- name: Config files
copy:
mode: preserve
- src: "config_files/{{ config_item }}"
- dest: "$XDG_CONFIG_HOME/{{ config_item }}"
+ src: "config_files/{{ item }}"
+ dest: "$XDG_CONFIG_HOME/{{ item }}"
loop:
- tig/config
- git/templates_fretlink/hooks/pre-push
- loop_control:
- loop_var: config_item
- name: git config file
template:
src: config.j2
- name: Config dirs
file:
state: directory
- path: "$XDG_CONFIG_HOME/{{ gnupg_config_item }}"
+ path: "$XDG_CONFIG_HOME/{{ item }}"
mode: 0700
loop:
- gnupg
- loop_control:
- loop_var: gnupg_config_item
- name: Config files
copy:
- src: "gnupg/{{ gnupg_config_item }}"
- dest: "$XDG_CONFIG_HOME/gnupg/{{ gnupg_config_item }}"
+ src: "gnupg/{{ item }}"
+ dest: "$XDG_CONFIG_HOME/gnupg/{{ item }}"
loop:
- gpg-agent.conf
- gpg.conf
- loop_control:
- loop_var: gnupg_config_item
- name: Get gnupg runtime folder name
shell: 'gpgconf --list-dirs socketdir | sed -e "s@$XDG_RUNTIME_DIR/gnupg/@@"'
register: gnupg_runtime_dir_cmd
block:
- name: Add systemd overrides
template:
- src: "systemd/{{ systemd_item }}.conf.j2"
- dest: "$XDG_CONFIG_HOME/systemd/user/{{ systemd_item }}.socket.d/override.conf"
+ src: "systemd/{{ item }}.conf.j2"
+ dest: "$XDG_CONFIG_HOME/systemd/user/{{ item }}.socket.d/override.conf"
register: results
loop:
- dirmngr
- gpg-agent-browser
- gpg-agent-extra
- gpg-agent-ssh
- loop_control:
- loop_var: systemd_item
- name: Restart systemd units
systemd:
daemon_reload: true
scope: user
state: restarted
- name: "{{ restart_systemd_item }}.socket"
+ name: "{{ item }}.socket"
loop: "{{ results.results|selectattr('changed')|map(attribute='item')|list }}"
- loop_control:
- loop_var: restart_systemd_item
- name: Config files
copy:
mode: preserve
- src: "config_files/{{ lxde_config_item }}"
- dest: "$XDG_CONFIG_HOME/{{ lxde_config_item }}"
+ src: "config_files/{{ item }}"
+ dest: "$XDG_CONFIG_HOME/{{ item }}"
loop:
- libfm/libfm.conf
- pcmanfm/LXDE/pcmanfm.conf
- lxsession/LXDE/desktop.conf
- gpicview/gpicview.conf
- xinitrc
- loop_control:
- loop_var: lxde_config_item
- name: pcmanfm destkop configuration
ini_file:
path: "$XDG_CONFIG_HOME/pcmanfm/LXDE/desktop-items-0.conf"
- [ "show_documents", "0" ]
- [ "show_trash", "1" ]
- [ "show_mounts", "0" ]
-
- name: lxmusic configuration
ini_file:
path: "$XDG_CONFIG_HOME/lxmusic/config"
dest: $HOME/.ghc/
- name: Stack config files
copy:
- src: "stack/{{ stack_item }}"
- dest: "$XDG_DATA_HOME/stack/{{ stack_item }}"
+ src: "stack/{{ item }}"
+ dest: "$XDG_DATA_HOME/stack/{{ item }}"
loop:
- config.yaml
- global-project/README.txt
- global-project/stack.yaml
- loop_control:
- loop_var: stack_item
---
- name: Import other tools
include_role:
- name: "{{ item }}"
+ name: "{{ tool_import_item }}"
loop:
- git
- gnupg
+ loop_control:
+ loop_var: tool_import_item
- name: Config dirs
file:
state: directory