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

24 lines
440 B
YAML
Raw Normal View History

2024-09-23 12:30:38 +00:00
- 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