users/tasks/main.yml functions as a thin dispatcher with logical steps imported from their own files gated by a variable
15 lines
325 B
YAML
15 lines
325 B
YAML
---
|
|
- name: Create deployment user for CI/CD
|
|
ansible.builtin.user:
|
|
name: deployment
|
|
shell: /bin/bash
|
|
create_home: yes
|
|
become: true
|
|
|
|
- name: Add SSH public key for deployment user
|
|
ansible.posix.authorized_key:
|
|
user: deployment
|
|
state: present
|
|
key: "{{ deployment_public_ssh_key }}"
|
|
become: true
|