From d5ce8ae86b22f9a3ef3b49c0d9c804a69aed88e1 Mon Sep 17 00:00:00 2001 From: Paweł Dybiec Date: Wed, 17 Apr 2019 16:55:30 +0200 Subject: Change tabs, shorten bootstrapping --- bootstrap.yml | 58 ++++++++++++++++++++++++---------------------------------- 1 file changed, 24 insertions(+), 34 deletions(-) (limited to 'bootstrap.yml') diff --git a/bootstrap.yml b/bootstrap.yml index 6a00e93..022194e 100644 --- a/bootstrap.yml +++ b/bootstrap.yml @@ -1,36 +1,26 @@ --- - - name: Bootstrap base systems - hosts: tamriel - remote_user: root - vars: - users: - - login: pawel - groups: ['sudo', 'remote_access', 'docker'] - pubkey: "{{ lookup('file', '/home/pawel/.ssh/id_rsa.pub') }}" - shell: /bin/zsh - - login: ansible_worker - groups: ['sudo', 'remote_access', 'docker'] - pubkey: "{{ lookup('file', '/home/pawel/.ssh/id_rsa.pub') }}" - shell: /bin/bash - roles: - - base_users - tasks: - - name: zsh - apt: - name: zsh - update_cache: true - - name: Allow paswordless sudo - lineinfile: - dest: /etc/sudoers - state: present - insertafter: "^%sudo" - line: "ansible_worker\tALL=(ALL:ALL) NOPASSWD: ALL" - validate: '/usr/sbin/visudo -cf %s' - # line: "%sudo ALL=(ALL) NOPASSWD: ALL" - - file: - path: /home/pawel/.zshrc - owner: pawel - group: pawel - state: touch - mode: 0660 +- name: Bootstrap base systems + hosts: tamriel + remote_user: root + vars: + users: + - login: pawel + groups: ['sudo', 'remote_access', 'docker'] + pubkey: "{{ lookup('file', '/home/pawel/.ssh/id_rsa.pub') }}" + shell: /bin/bash + - login: ansible_worker + groups: ['sudo', 'remote_access', 'docker'] + pubkey: "{{ lookup('file', '/home/pawel/.ssh/id_rsa.pub') }}" + shell: /bin/bash + roles: + - base_users + tasks: + - name: Allow paswordless sudo + lineinfile: + dest: /etc/sudoers + state: present + insertafter: "^%sudo" + line: "ansible_worker\tALL=(ALL:ALL) NOPASSWD: ALL" + validate: '/usr/sbin/visudo -cf %s' + # line: "%sudo ALL=(ALL) NOPASSWD: ALL" -- cgit 1.4.1