ansible-debops-infrastructure

DebOps and Ansible scripts to manage my infrastructure
git clone git://git.erethon.com/ansible-debops-infrastructure
Log | Files | Refs

commit 954385e1ce0b73a91767f3b5067895b5a98a4efb
parent 563ce685f5b84cc7d815a75b6c1a6996b91e75fd
Author: Dionysis Grigoropoulos <dgrig@erethon.com>
Date:   Wed, 20 Nov 2019 00:44:37 +0200

openbsd: Setup /etc/doas.conf for privileged users

Diffstat:
ansible/roles/openbsd/tasks/main.yml | 10++++++++++
1 file changed, 10 insertions(+), 0 deletions(-)

diff --git a/ansible/roles/openbsd/tasks/main.yml b/ansible/roles/openbsd/tasks/main.yml @@ -32,3 +32,13 @@ key: "{{ item.sshkeys[0] }}" with_items: - "{{ users__accounts }}" + +- name: Add management user to doas.conf + lineinfile: + path: /etc/doas.conf + state: present + line: "permit nopass keepenv setenv { HOME } {{ item.name }} as root" + create: yes + with_items: + - "{{ users__accounts }}" + when: item.doas == True