-
Notifications
You must be signed in to change notification settings - Fork 37
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Inspired by this Ansible playbook step:
- name: setup user
hosts: new_droplet
gather_facts: false
tasks:
- name: Ensure user "debian" exists
ansible.builtin.user:
name: debian
shell: /bin/bash
groups: sudo
create_home: true
home: /home/debian
append: yes
password: "{{ 'foobar123' | password_hash('sha512') }}"
- name: add ssh key
ansible.posix.authorized_key:
user: debian
state: present
key: "{{ lookup('file', '~/.ssh/id_rsa.pub') }}"https://docs.ansible.com/ansible/latest/collections/ansible/builtin/user_module.html
https://docs.ansible.com/ansible/latest/collections/ansible/posix/authorized_key_module.html
https://nixpkgs-manual-sphinx-markedown-example.netlify.app/configuration/user-mgmt.xml.html
vimtoe, mipmip and josh
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request