diff --git a/TODO b/TODO index 75a0e71..2e9cd0c 100644 --- a/TODO +++ b/TODO @@ -2,6 +2,7 @@ - add tmux - mv files to sync if synchronize, then reinit submodules - use maximum of copy + backup=yes +- TOFIX: autolaunch i3 apps good order - TOFIX: startx blank screen in vm - TOFIX: ssh-agent ssh-add in zshrc startx - TOFIX: find a way to clean tmp dir while packer install diff --git a/roles/packages-desktop/README.md b/roles/packages-desktop/README.md new file mode 100644 index 0000000..878863c --- /dev/null +++ b/roles/packages-desktop/README.md @@ -0,0 +1,13 @@ +# Specific hosts packages +Add a tasks file named with hostname of target +``` +echo <<\EOF > tasks/$(hostname).yml +--- +- name: Install $(hostname) packages + pacman: name={{item}} state=present + with_items: + - vim + become: True +EOF +``` + diff --git a/roles/packages-desktop/tasks/arch-itect.yml b/roles/packages-desktop/tasks/arch-itect.yml new file mode 100644 index 0000000..ec5f4d6 --- /dev/null +++ b/roles/packages-desktop/tasks/arch-itect.yml @@ -0,0 +1,6 @@ +--- +- name: Install arch-itect packages + pacman: name={{item}} state=present + with_items: + - thunderbird + become: True diff --git a/roles/packages-desktop/tasks/main.yml b/roles/packages-desktop/tasks/main.yml index 5fd388d..723c77f 100644 --- a/roles/packages-desktop/tasks/main.yml +++ b/roles/packages-desktop/tasks/main.yml @@ -12,7 +12,6 @@ - xorg-xrdb - xorg-xfd - connman - - geary - ttf-hack become: True @@ -28,5 +27,13 @@ when: ansible_os_family == "Archlinux" notify: clean tmp packer +- name: Test if hostname specific tasks exists + stat: path={{ playbook_dir }}roles/packages-desktop/tasks/{{ ansible_hostname }}.yml + register: hostname_packages_file + +- name: Run hostname specific tasks + import_tasks: {{ playbook_dir }}roles/packages-desktop/tasks/{{ ansible_hostname }}.yml + when: hostname_packages_file.stat.exists + - name: Flush handlers to clean /tmp meta: flush_handlers diff --git a/roles/packages-desktop/tasks/osz.yml b/roles/packages-desktop/tasks/osz.yml new file mode 100644 index 0000000..064efc9 --- /dev/null +++ b/roles/packages-desktop/tasks/osz.yml @@ -0,0 +1,6 @@ +--- +- name: Install osz packages + pacman: name={{item}} state=present + with_items: + - geary + become: True