gantsign / ansible_role_antigen

Ansible role for installing the Antigen and using it to configure Zsh
https://galaxy.ansible.com/gantsign/antigen
MIT License
27 stars 16 forks source link

Apply role on Ubuntu 20.04 (focal) doesn't seem to work completely #53

Open sbancal opened 2 years ago

sbancal commented 2 years ago

I applied the following playbook on 2 fresh servers :

- hosts: all
  roles:
    - role: gantsign.antigen
      users:
        - username: root
          antigen_libraries:
            - name: oh-my-zsh
              env:
                DISABLE_AUTO_UPDATE: '"true"'
          antigen_theme:
            name: robbyrussell
          antigen_bundles:
            - name: git
            - name: docker
            - name: docker-compose
            - name: command-not-found

When I ssh root@server, I get the zsh shell, but the theme and plugins don't seem to work as expected. On 1 server, the theme is activated, on the other not (!?). On both, the plugins don't work and the following command returns an empty result.

echo $plugins

Let me know if I can post more infos to help.

BTW, is there a clean/simple way to remove everything related to this role on the servers so I can run it again from scratch ?

Regards

freemanjp commented 2 years ago

If you run rm -rf ~/.antigen-etc and remove source ~/.antigenrc from ~/.zshrc, that should be enough to undo this role so you can try it again. I'd advise against installing Antigen and Oh My Zsh into a root user account. If Log4Shell thought us anything, even widely used and trusted code can contain vulnerabilities. For that matter, I'd advise against allowing remote access to the root user over ssh. Create a user with sudo privileges and use that instead. Some things don't work properly when run as root, which may explain your issue. If you add set -x to the top of your ~/.zshrc that should allow you to trace the shell scripts and perhaps see where they're going wrong. Be warned this output is very verbose. You can temporally disable this by running set +x from the command line (by you'll have to remove the line from ~/.zshrc to disable it permanently).