-
Notifications
You must be signed in to change notification settings - Fork 0
/
playbook.yml
executable file
·48 lines (40 loc) · 1.17 KB
/
playbook.yml
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
37
38
39
40
41
42
43
44
45
46
47
#################################################
# DO Community Playbooks: Initial Server Setup
#################################################
---
- hosts: localhost
connection: local
become: true
vars_files:
- vars/default.yml
tasks:
- name: Install Prerequisites
apt: name=aptitude update_cache=yes state=latest force_apt_get=yes
# Sudo Group Setup
- name: Make sure we have a 'wheel' group
group:
name: wheel
state: present
- name: Allow 'wheel' group to have passwordless sudo
lineinfile:
path: /etc/sudoers
state: present
regexp: '^%wheel'
line: '%wheel ALL=(ALL) NOPASSWD: ALL'
validate: '/usr/sbin/visudo -cf %s'
- name: Add 'hchauhan' to 'wheel' group
user:
name: hchauhan
group: hchauhan
groups: wheel
append: yes
# Install Packages
- name: Update apt
apt: update_cache=yes
- name: Installing packages
apt: name={{ all_packages }} state=latest
- name: Add 'hchauhan' to 'libvirt-qemu' and 'libvirt-dnsmasq' groups
user:
name: hchauhan
groups: libvirt-qemu libvirt-dnsmasq
append: yes