cowdogmoo.vnc_zsh
Ansible Role: vnc + oh-my-zsh
Deprecated
This role has been moved to https://github.com/CowDogMoo/ansible-collection-workstation/tree/main/roles/vnc_setup and https://github.com/CowDogMoo/ansible-collection-workstation/tree/main/roles/zsh_setup.
This role installs vnc and oh-my-zsh on Debian-based systems.
Requirements
Python packages
Install with:
python3 -m pip install --upgrade \ ansible-core \ molecule \ molecule-docker \ "molecule-plugins[docker]"
Role Variables
Available variables are listed below, along with default values (see defaults/main.yaml):
Path to clone vncpwd.
vncpwd_clone_path: /tmp/vncpwd
URL for the oh-my-zsh install script.
omz_install_script_url: "https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh"
URL to clone vncpwd from.
vncpwd_repo_url: https://github.com/jeroennijhof/vncpwd.git
Location on disk to install vncpwd.
vncpwd_path: /usr/local/bin/vncpwd
Client options for vnc.
vnc_client_options: "-geometry 1920x1080 --localhost no"
Specify whether to setup a systemd service to manage the vnc installation. Worth considering if you are using this role outside of a container.
setup_systemd: false
Oh-my-zsh theme to install.
zsh_theme: "af-magic"
Debian-specific vars:
Users to configure vnc for.
vnc_users:
- username: "ubuntu"
usergroup: "ubuntu"
sudo: true
# port 5901
vnc_num: 1
Required packages for the installation.
install_packages:
- bash
- ca-certificates
- colordiff
- curl
...
Local Development
Make sure to run the following to develop locally:
ansible-galaxy install -r requirements.yml
PATH_TO_ROLE="${PWD}"
ln -s "${PATH_TO_ROLE}" "${HOME}/.ansible/roles/cowdogmoo.vnc_zsh"
Get vnc password
A random 8-character password is generated when the role is run initially. To retrieve it, run this command on the provisioned system:
/usr/local/bin/vncpwd /home/ubuntu/.vnc/passwd
Testing
To test actions locally, you can install act and use the following command:
ACTION="molecule"
if [[ $(uname) == "Darwin" ]]; then
act -j $ACTION --container-architecture linux/amd64
fi
To test changes made to this role locally, run the following commands:
molecule create
molecule converge
molecule idempotence
# If everything passed, tear down the docker container spawned by molecule:
molecule destroy
ansible-galaxy install cowdogmoo.vnc_zsh