Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

create direcoty ~test1/.antigen #74

Open
x4IPx opened this issue Sep 27, 2023 · 1 comment
Open

create direcoty ~test1/.antigen #74

x4IPx opened this issue Sep 27, 2023 · 1 comment

Comments

@x4IPx
Copy link

x4IPx commented Sep 27, 2023

Hello.
When running ansible-playbook OhMyZSH.yml --limit=MyHome

---
- hosts: all
  vars:
    # your extra bundles here
    zsh_antigen_bundles_extras: []
    # your variables here
    # zsh_autosuggestions_bind_key: "^U"
  roles:
    - { role: viasite-ansible.zsh, zsh_user: test1 }
    #    - viasite-ansible.zsh

I'm getting an error.

PLAY [all] ******************************************************************************************************************************************************************************************************

TASK [Gathering Facts] ******************************************************************************************************************************************************************************************
ok: [myunit1-minipc-home]
ok: [u1-g6]

TASK [viasite-ansible.zsh : include_tasks] **********************************************************************************************************************************************************************
included: /home/fly/MyAnsible/roles/viasite-ansible.zsh/tasks/install.yml for u1-g6, myunit1-minipc-home

TASK [viasite-ansible.zsh : Update package cache] ***************************************************************************************************************************************************************
changed: [u1-g6]
changed: [myunit1-minipc-home]

TASK [viasite-ansible.zsh : Install zsh, git, wget, fd-find] ****************************************************************************************************************************************************
ok: [u1-g6]
ok: [myunit1-minipc-home]

TASK [viasite-ansible.zsh : check if ~test1/.antigen exist] *****************************************************************************************************************************************************
ok: [u1-g6]
ok: [myunit1-minipc-home]

TASK [viasite-ansible.zsh : create direcoty ~test1/.antigen] ****************************************************************************************************************************************************
fatal: [myunit1-minipc-home]: FAILED! => {"msg": "Failed to set permissions on the temporary files Ansible needs to create when becoming an unprivileged user (rc: 1, err: chmod: invalid mode: ‘A+user:test1:rx:allow’\nTry 'chmod --help' for more information.\n}). For information on working around this, see https://docs.ansible.com/ansible-core/2.15/playbook_guide/playbooks_privilege_escalation.html#risks-of-becoming-an-unprivileged-user#risks-of-becoming-an-unprivileged-user"}
fatal: [u1-g6]: FAILED! => {"msg": "Failed to set permissions on the temporary files Ansible needs to create when becoming an unprivileged user (rc: 1, err: chmod: invalid mode: 'A+user:test1:rx:allow'\nTry 'chmod --help' for more information.\n}). For information on working around this, see https://docs.ansible.com/ansible-core/2.15/playbook_guide/playbooks_privilege_escalation.html#risks-of-becoming-an-unprivileged-user#risks-of-becoming-an-unprivileged-user"}

PLAY RECAP ******************************************************************************************************************************************************************************************************
myunit1-minipc-home        : ok=5    changed=1    unreachable=0    failed=1    skipped=0    rescued=0    ignored=0
u1-g6                      : ok=5    changed=1    unreachable=0    failed=1    skipped=0    rescued=0    ignored=0

Please pay attention to create direcoty ~test1/.antigen and check if ~test1/.antigen exist]. I assume that the role does not form the path correctly.

Ошибка возникает на:
Ubuntu Desktop 22.04.1
and
Ubuntu Server 22.04.3

@x4IPx x4IPx changed the title {"msg": "Failed to set permissions on the temporary files Ansible needs to create when becoming an unprivileged user (rc: 1, err: chmod: invalid mode: ‘A+user:test1:rx:allow’\nTry 'chmod --help' for more information.\n}). create direcoty ~test1/.antigen Sep 27, 2023
@popstas
Copy link
Contributor

popstas commented May 26, 2024

Hello, sorry for late answer. Two ways to fix it:

  1. Add remote_user: root to playbook
  2. Run ansible-playbook with -K

Some tasks of role requires superuser permissions (only install packages as I remember).

But in your output I see that install packages task was changed. I don't know why.

Syntax ~user is the same as /home/user.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants