perryk.liquidprompt
Ansible Role Liquidprompt
This role installs and sets up liquidprompt. GitHub Link
Requirements
If you want to set this up for a user other than the one Ansible is currently using, you will need to enter your sudo password.
Run this command:
ansible-playbook -K playbook.yml
Role Variables
- liquidprompt_user_to_liquidify: By default, this is set to
ansible_user_id
, which is the user that Ansible connects as. - liquidprompt_repo_url: This is set to the main liquidprompt repository on GitHub by default: liquidprompt.
- liquidprompt_repo_version: This defaults to the master branch.
Usually, you’ll want to install liquidprompt for the user Ansible is connected to. In this case, you can leave all the variables as default, and you won’t need to enter a sudo password when running the playbook.
Sometimes, I need to install liquidprompt for a different user, often a service user created earlier in the playbook. You can specify this using the liquidprompt_user_to_liquidify
variable. As long as the connecting user has sudo privileges, it should work. However, be aware that Ansible can face permission issues when trying to run tasks as one unprivileged user acting as another unprivileged user.
Example Playbook
Here’s an example of how to install it for a different user than the one running Ansible:
- hosts: servers
vars:
liquidprompt_user_to_liquidify: 'bob'
roles:
- perryk.liquidprompt
Note: This works if you installed the role using Ansible Galaxy. If you cloned the repository directly, the role name is ansible-role-liquidprompt
.
License
MIT
Author Information
Perry Kollmorgen - GitHub Profile
Downloads and configures liquidprompt. https://github.com/nojhan/liquidprompt
ansible-galaxy install perryk.liquidprompt