about summary refs log tree commit diff
path: root/bootstrap.yml
blob: 6a00e93586274d304d6debdc1d940048fa498a25 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
---
  - 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