Ansible role: the operator's account, tools and dotfiles on a Debian host
In check mode the command was skipped, so the checkout ran without SSH_AUTH_SOCK and the server refused it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> |
||
|---|---|---|
| defaults | ||
| meta | ||
| tasks | ||
| README.md | ||
operator
The operator's personal account on a Debian host: zsh as login shell, tmux,
emacs and git, SSH keys, and the dotfiles repository cloned into the home
directory and installed by its own script. All inputs are role defaults
(defaults/main.yml), so the role works alone, and a
project overrides only what differs on its hosts, such as operator_groups.
Using it in a project
requirements.yml in the project's Ansible directory:
roles:
- name: operator
src: git+https://code.netzhansa.com/hanshuebner/ansible-role-operator.git
version: main
installed into a roles directory the project's git ignores:
ansible-galaxy role install -r requirements.yml -p galaxy-roles --force
with roles_path = roles:galaxy-roles in its ansible.cfg, and then in a play:
- hosts: all
become: true
roles: [operator]
The dotfiles repository is private and cloned over ssh as root, so the play
needs the operator's ssh agent forwarded (ansible_ssh_extra_args: -o ForwardAgent=yes, or ssh_common_args in ansible.cfg).