diff options
author | binary <me@rgoncalves.se> | 2021-03-01 15:46:23 +0100 |
---|---|---|
committer | binary <me@rgoncalves.se> | 2021-03-01 15:46:23 +0100 |
commit | a29fa5af783977e298777d5a870fc4191466371a (patch) | |
tree | f8e9bf5ae86170b441dffde43caa7430efe72575 /roles/_workstation/sysconf/tasks | |
parent | 637d9584c27edd835c24f30eed4ab7d8b4189925 (diff) | |
download | infrastructure-a29fa5af783977e298777d5a870fc4191466371a.tar.gz |
Add env role and meta tasks for workstation playbook
Diffstat (limited to 'roles/_workstation/sysconf/tasks')
-rw-r--r-- | roles/_workstation/sysconf/tasks/main.yml | 21 |
1 files changed, 2 insertions, 19 deletions
diff --git a/roles/_workstation/sysconf/tasks/main.yml b/roles/_workstation/sysconf/tasks/main.yml index 2a6f4a4..0f37962 100644 --- a/roles/_workstation/sysconf/tasks/main.yml +++ b/roles/_workstation/sysconf/tasks/main.yml @@ -4,20 +4,6 @@ --- -- name: retrieve BECOME method - stat: path=/usr/bin/doas - register: ws_become - -- name: retrieve original user - shell: logname - register: ws_user - -- name: retrieve host facts - set_fact: - ansible_become_method: "{{ 'doas' if ws_become.stat.exists else 'sudo' }}" - ansible_become_user: root - ws_user: "{{ ws_user.stdout }}" - - name: include distribution specific task include_tasks: "_{{ ansible_distribution | lower }}.yml" ignore_errors: true @@ -25,8 +11,8 @@ - name: generate doas configuration lineinfile: path: /etc/doas.conf - regexp: "^permit persist keepenv {{ ws_user }} as root" - line: "permit persist keepenv {{ ws_user }} as root" + regexp: "^permit persist keepenv {{ _workstation_env_user }} as root" + line: "permit persist keepenv {{ _workstation_env_user }} as root" owner: root mode: 0644 create: true @@ -49,6 +35,3 @@ when: sudo.rc == 0 register: sudo ignore_errors: true - -- name: setup dotfiles from upstream and user script - meta: end_host |