Coder Social home page Coder Social logo

Comments (6)

aaraza avatar aaraza commented on May 28, 2024

You can use the -K option. This will prompt you to enter a password for commands that require privilege escalation.
https://docs.ansible.com/ansible/latest/cli/ansible.html#cmdoption-ansible-k

from ansible-role-homebrew.

rounakdatta avatar rounakdatta commented on May 28, 2024

You can consider using the ask-become-flag while using it in a playbook. Example: https://github.com/rounakdatta/computer.setup/blob/master/start.sh#L25

from ansible-role-homebrew.

kubaraczkowski avatar kubaraczkowski commented on May 28, 2024

Could it be that the 'bug' here is that the wrapper created in this repo does not expose (or set) the sudo_password?
It looks like that argument is not set by default to sudo_password: "{{ ansible_become_pass }}"

Perhaps there could come a parameter to this role to be passed through to homebrew_cask ?
Somewhere here:
https://github.com/geerlingguy/ansible-role-homebrew/blob/master/tasks/main.yml#L111

from ansible-role-homebrew.

stale avatar stale commented on May 28, 2024

This issue has been marked 'stale' due to lack of recent activity. If there is no further activity, the issue will be closed in another 30 days. Thank you for your contribution!

Please read this blog post to see the reasons why I mark issues as stale.

from ansible-role-homebrew.

stale avatar stale commented on May 28, 2024

This issue has been closed due to inactivity. If you feel this is in error, please reopen the issue or file a new issue with the relevant details.

from ansible-role-homebrew.

maspotts avatar maspotts commented on May 28, 2024

hi: I'm also facing this issue: I'm trying to install the mactex cask, and the installer hangs because it needs a (sudo?) password. I tried adding sudo_password: "{{ ansible_become_pass }}" but I get undefined variable error. The module doesn't seem to support become: true. I'm very new to ansible so I can't figure out how this problem was solved: would you mind awfully pasting some brief instructions? This is my current task:

    - name: Install mactex
      community.general.homebrew_cask:
        name:
          - mactex
        path: /opt/brew/bin
        state: present
        sudo_password: "{{ ansible_become_password }}"

Thanks!

from ansible-role-homebrew.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.