ansible_role_antigen icon indicating copy to clipboard operation
ansible_role_antigen copied to clipboard

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

Open sbancal opened this issue 3 years ago • 1 comments

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

sbancal avatar Jan 14 '22 11:01 sbancal

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).

freemanjp avatar Jan 16 '22 17:01 freemanjp