Paul Belanger 311c5dfecd Move sudoers logic into users role
It makes a little more sense to have our users role enable no password
for the sudo group.

Change-Id: Ibcba8b2d927dd630d8c9deeeaf5ae162ec5b1aa2
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2019-02-27 20:29:17 -05:00

44 lines
1.2 KiB
YAML

# Copyright 2019 Red Hat, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
---
- hosts: all
gather_facts: false
tasks:
- name: bootstrap ansible
raw: sudo apt-get update && sudo apt-get install -y python3-minimal && sudo apt-get clean
tags: skip_ansible_lint
- hosts: all
tasks:
- name: Update apt cache
become: true
apt:
update_cache: true
upgrade: dist
- import_playbook: ../bootstrap/site.yaml
- hosts: all
tasks:
- name: reboot
become: true
reboot:
# NOTE(pabelanger): This user should be completely removed but cannot here
# because we are using the ubuntu user to bootstrap the server.
- name: Disable SSH access for ubuntu user
file:
path: ~/.ssh
state: absent