123456789101112131415161718192021222324 |
- ---
- # Intended to be called on a fresh box, just to set up my users
- - name: Add the fdamstra account
- hosts: all
- become: yes
- become_user: root
- tasks:
- - name: Create fdamstra user
- ansible.builtin.user:
- name: fdamstra
- state: present
- comment: Fred Damstra
- shell: /bin/bash
- append: yes # add groups, not replace
- groups:
- - sudo
- home: /home/fdamstra
- password: $6$hYFN1pnIw3Gi8Lca$HdoHUUVVPbBdp/HGeBdo2rpWjhvBYcpV2EbCkZqW0Sqp1nsxQmuAy6sy6wjLHv1EdODG8oNUBPys94bxOOwbp/
- update_password: on_create
- - name: Create authorized key
- authorized_key:
- user: fdamstra
- state: present
- key: "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDF3pGU9+HufgfEhPP7P0Lt7kqfGWLTGd6sfJgSypcSo3FP1XhwFOWkaNvZIpoIeQXhux5vTm+RoqYZ/3Gj7hcGMLdoHWArvLHD2AGjxbFnsmiCioQgsC/rYLBjiWNsDdVF5Arofby/RwzivMAi7yivhY4nGzXPsHZoucB0Wi34/9AmxbvXWv6ckuWkMjrXVe+uwFje3U7jQHRW9jQRpCRRfUjVA4FmH0PWqWFBlt/zqsDPOzbxNNhAvyrJho7jVBNjCLsq0++lT8BDKrYbaZiT0F2c9uIDRpHJSdjpqVCf9bghmeJWYMoNHAkGR7WCFjPCJ7QM57a2oRBtm1A/EWcr fdamstra@io"
|