vn-ansible/roles/awx/tasks/main.yaml

24 lines
437 B
YAML

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