You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
821 B
30 lines
821 B
---
|
|
|
|
- name: This module has only been tested on RHEL and CentOS
|
|
assert:
|
|
that:
|
|
- "ansible_os_family == 'RedHat' or ansible_os_family == 'CentOS'"
|
|
|
|
- name: Create user RedHat
|
|
user: name=redhat group=users groups=users,wheel state=present comment="RedHat privileged user" password="*"
|
|
tags:
|
|
- bootstrap
|
|
- user
|
|
|
|
- name: Set SSH key for root
|
|
authorized_key: user=root key="{{ ansible_ssh_public_key }}" manage_dir=yes
|
|
tags:
|
|
- bootstrap
|
|
- user
|
|
|
|
- name: Set SSH key for user RedHat
|
|
authorized_key: user=redhat key="{{ ansible_ssh_public_key }}" manage_dir=yes
|
|
tags:
|
|
- bootstrap
|
|
- user
|
|
|
|
- name: Configure SUDO
|
|
template: src=sudoers dest=/etc/sudoers owner=root group=root mode=0440 validate="/usr/sbin/visudo -cf %s"
|
|
tags:
|
|
- bootstrap
|
|
- config
|
|
|