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

24 lines
442 B
YAML
Raw Normal View History

2024-10-16 15:53:15 +00:00
- 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