playbooks/setup_ubuntu1804/playbook.yml

34 lines
759 B
YAML
Raw Normal View History

2022-08-02 01:10:29 +00:00
#################################################
# DO Community Playbooks: Initial Server Setup
#################################################
---
- hosts: all
become: true
vars_files:
- vars/default.yml
tasks:
# 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'
# Install Packages
- name: Update apt
apt: update_cache=yes
- name: Install required system packages
apt: name={{ sys_packages }} state=latest