This role does two things. Firstly, it installs a few packages that are required
to run some essential Ansible modules, but are sometimes absent from managed
nodes. Secondly it manages, and can create, the agent user (ansible_user
).
The role can not bootstrap a host on its own though. If used to create the
permanent ansible_user
it requires a privileged "bootstrap" user (which can
optionally be removed as part of this role) and a python executable on the
target machine.
A version of Python that Ansible can use.
Name | Required | Type / Choices | Description |
---|---|---|---|
common_agent_user_name |
no | string |
Name of the managed user. During normal operations this should be the same as
the Default: |
common_agent_user_home |
no | path |
Home directory of the managed user. Default: |
common_agent_user_shell |
no | path |
Login shell for the managed user. Default: |
common_agent_user_create_local |
no | boolean |
Use the Default: |
common_bootstrap_user_name |
no | string |
Name of a dedicated bootstrap user that WILL BE REMOVED as part of this role. This variable has no effect if the given user does not exist on the system. The idea is, that during the bootstrapping process ansible can log in to the new target host using a throwaway user that is set up with unsave credentials during system installation. This role will than create the permanent agent user, switch over to that new user for the rest of the play, and then, finally, remove the temporary user. Default: |
common_remove_unused_sshd |
no | boolean |
Remove the openssh-server package if the ansible connection does not require it.
This is option is currently only considered for the Default: |
common_configure_connection |
no | `"lxd"`, `"ssh"` |
By default this role will do some custom configuration (if applicable) for the connection type used during the playbook run. If another connection plugin should be configured instead, this variable can be used to overwrite it. Default: |
None.
- hosts: all
tasks:
- ansible.builtin.import_role:
name: gliech.common
This project is licensed under the terms of the GNU General Public License v3.0