setup
Role Name
Standard setup for fresh-built Ubuntu servers
Requirements
None
Role Variables
Reboot server after setup tasks complete:
setup_reboot: no
Server timezone and locale
setup_timezone: America/Los_Angeles
setup_locale: en_US.UTF-8
Ssh authorized hosts setup_authorized_host_keys: []
Ssh host key (instead of sshkeygen). Expects dict with type, public,
private attributes. Typically created with
ssh-keygen -t rsa -C demo -N '' -b 3072 -f key
setup_ssh_host_key:
Dependencies
Example Playbook
- hosts: servers
- import_role:
name: setup
vars:
setup_reboot: yes
setup_authorized_host_keys:
- 'ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCyFeOZncDip2ZoHu1f8Ap/6xW/SXUrX2sLDKSb0BZLtnVcjFMC6PM+qzumaH2Yup1ztfWcaJGz9o5bl0lzxE/ITOq3+oZ7aSTCn5/PIr41LH0W1gjMCSiS1SU5/UDccOJw3O/gFvUrdH+DiIiioyMrRKso7fLlGzZOOH4vJONzK/0Djpb5ls8ebwdPElNxPYQuPjSY7Ga0YGLk790jK0ejnaJEHt469dJu7lJt7Dhvp1hVlMC75VQ6Pz9svxN+iNEPIy0+YsBQNiwZVs+m3+Cq54KpirvcF8AjWrvrhzZLb2OcUkRibRkrrrCjbcV8kFx2cCo6V4FvRLwJ0CuOKJ8v'
setup_ssh_host_key:
type: rsa
public: 'ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQClVeeSFfP5pBDJHj1BkPeSI64gf6rG4pHibJXH7MMvq34mwjoJN0zAq2+w0ZOJjOpI4fOE26OGIIFV7g9HoBGLbO1azjhDxIxlRhE9+FyV/q83tnUNR/tzbrDpZ5Ckxcm/s6WXNj7EOavHol1smn9xXJlE5+9EEsaWxRHOL7vFXVcpfZYDuzmAJbrB+Ltr6rrW/atjz+lzu7ayL7hT8mVuImv7whsGn2ixob5gsjV7STw2oDGgf722gxEYoujr61tokagtfQY1I/ikGbX9yqlEFCjRfIW7jCDJcWHbQbH2H7RP1XK2UyYK+BjOaa9m/SwhJFS5nxD+WLvyxbmSpuW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uLkt87
TPt6CXPFkvdHp0o3r42bWHjcBGpbgaCVZ9kBd5MCgYAn50B0F3eNKg54u4dbWTti
iOVw6CY2c8YZcF9g0tBWnVOmUBRelWCtrLdSk2fdpcNA8ZCM19bLrcDIAUrhNSwl
tqGW9IGT779CoTVpaZ6sk/H4ywU08vkuzE63FvVdqOJdqZcVKay3d9oHaGeOlvRx
U9fOcUQEPrfOLvODnFwq9QKBgEh9W+Fa2UZ2i9BEYwkBIEp7XkZzSFlQ3HkZjf80
z3F0X/Ykj/rB5QXdLNEkKs7VvefZfFSEF02VtlTXR6aKICVHk+28QB6UkI54/X+k
akEUEsg4l/ADUj5UCkQKDnx8Cteu6Q9Dx4K8n7t4v2kHNvQfWHufyIBVtIVzKCT6
jFy/AoGAL8SN9ibTjE8YT8INo1bOc066O7FZplI2nF5ZKCX35EsmSUL+1B1iE8vT
rPeYovN7XBh7xWc835d77UV55taBnmKcBTx3Gb0uEJ350CuZwAGSF+U07xSmKTIY
QBjYAwIRoOL6wTwPTchEAMBUgjA9rTtQgK2FsNr8DzBDDW9wE7M=
-----END RSA PRIVATE KEY-----
Install
ansible-galaxy install rm-software/ansible-roles-setup
License
apache-2.0
Downloads
161
Owner