24 lines
440 B
YAML
24 lines
440 B
YAML
|
- name: Create AWX user
|
||
|
user:
|
||
|
name: awx-user
|
||
|
password: '*'
|
||
|
shell: /bin/bash
|
||
|
groups: sudo
|
||
|
state: present
|
||
|
comment: ssh user
|
||
|
- name: Adding SSH public key
|
||
|
authorized_key:
|
||
|
user: awx-user
|
||
|
key: "{{ awx_pub_key }}"
|
||
|
- name: Install sudo package
|
||
|
apt:
|
||
|
name: sudo
|
||
|
state: present
|
||
|
- name: Add user to sudoers
|
||
|
copy:
|
||
|
src: awx
|
||
|
dest: /etc/sudoers.d/
|
||
|
mode: u=rw,g=r
|
||
|
owner: root
|
||
|
group: root
|