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

24 lines
442 B
YAML
Raw Normal View History

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