aboutsummaryrefslogtreecommitdiffstats
path: root/roles/workstation/tasks/main.yml
diff options
context:
space:
mode:
Diffstat (limited to 'roles/workstation/tasks/main.yml')
-rw-r--r--roles/workstation/tasks/main.yml26
1 files changed, 8 insertions, 18 deletions
diff --git a/roles/workstation/tasks/main.yml b/roles/workstation/tasks/main.yml
index 6aa3322..2789c9b 100644
--- a/roles/workstation/tasks/main.yml
+++ b/roles/workstation/tasks/main.yml
@@ -8,29 +8,19 @@
stat: path=/usr/bin/doas
register: ws_become
+- name: retrieve original user
+ shell: logname
+ register: ws_user
+
- name: retrieve host facts
set_fact:
- ws_distribution: "{{ ansible_distribution | lower }}"
ansible_become_method: "{{ 'doas' if ws_become.stat.exists else 'sudo' }}"
ansible_become_user: root
-
-- name: download packages
- include_tasks: packages.yml
- tags: packages
-
-- name: check for distribution specific task
- stat: path="{{ role_path }}/tasks/setup_{{ ws_distribution }}.yml"
- register: ws_distribution_task
+ ws_user: ws_user.results.stdout
- name: include distribution specific task
- include_tasks: "setup_{{ ws_distribution }}.yml"
- when: ws_distribution_task.stat.exists
+ include_tasks: "_{{ ansible_distribution | lower }}.yml"
+ ignore_errors: true
-- name: gracefully stop playbook and skip testing tasks
+- name: setup dotfiles from upstream and user script
meta: end_host
-
-- name: download dotfiles configuration repository
- git:
- repo: "{{ workstation_git_root }}/dot-config"
- dest: "{{ workstation_dotfiles_dir }}/config"
- bare: true
remember that computers suck.