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

24 lines
442 B
YAML

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