Skip to content

Instantly share code, notes, and snippets.

@adduc
Last active April 15, 2020 17:41
Show Gist options
  • Save adduc/4b4784599549aac3222ebe6c6c9d9fb4 to your computer and use it in GitHub Desktop.
Save adduc/4b4784599549aac3222ebe6c6c9d9fb4 to your computer and use it in GitHub Desktop.
#cloud-config
# https://cloudinit.readthedocs.io/en/latest/topics/modules.html#users-and-groups
users:
- name: ansible
uid: 999
shell: /bin/bash
sudo: ['ALL=(ALL) NOPASSWD:ALL']
ssh_authorized_keys:
- '[REDACTED]'
# Only needed if we go with RHEL/CentOS
write_files:
- path: /etc/sudoers.d/999-ansible-cloud-init-requiretty
permissions: 440
content: |
Defaults:ansible !requiretty
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment