blob: 6aa3322faad1d7579967789848d9cab7c03fc1fe (
plain) (
tree)
|
|
# workstation ~~ roles/workstation/tasks/main.yml
# init workstation
---
- name: retrieve BECOME method
stat: path=/usr/bin/doas
register: ws_become
- 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
- name: include distribution specific task
include_tasks: "setup_{{ ws_distribution }}.yml"
when: ws_distribution_task.stat.exists
- name: gracefully stop playbook and skip testing tasks
meta: end_host
- name: download dotfiles configuration repository
git:
repo: "{{ workstation_git_root }}/dot-config"
dest: "{{ workstation_dotfiles_dir }}/config"
bare: true
|