Closed wonderphil closed 2 years ago
Also should add, if i add the --allhomes
to the command it still doesn't work, also if I run multiple times it doesn't add the app
Please look here this is all you need: https://appleshare.it/posts/use-dockutil-in-a-script/ ;)
unfortunately, nothing in that blog post helped :(
Will close this as I have found the issue and its ansible not docutil. Basically ansible is trying to run through a list of dockutil commands and overriding itself
Will close this as I have found the issue and its ansible not docutil. Basically ansible is trying to run through a list of dockutil commands and overriding itself
@wonderphil would you mind sharing how you fixed this? As I'm having the same issue using Ansible
Firstly, not sure how to troubleshoot, so if you need more details please let me know.
Basically I have a Ansible playbook that is adding 20 odd items, it was working with an older version of dockutil although it was giving an error about python but still had the exit code 0, only upgraded because I wanted to clean up and not have that error.
My play book looks like this:
Then I have the list of dock items in
dockitems_persist
:So when I run Ansible with verbose logging I can see the command is run and exits with 0 but still item is not in the dock, for example the first step check if item is in dock, in this example we look at tor broswer
This is good, as its not in the dock yet and it should move to the next task of adding it, the output of adding it is:
Now from that I gather it added the tor browser app to the dock, when it runs the screen flash and the dock disappears for a moment but when it re-appears, tor browser is not there :(
Now if I take the raw params and run that
dockutil --add '/Applications/Tor Browser.app/'
it works!Any help would be great. Also wanted to say awesome util, so hopefuly this is just user error and get going with it again.