Comments (5)
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-collection-mac.
This issue is no longer marked for closure.
from ansible-collection-mac.
I looked at #43 and see that it is closed so I'm adding my comments here. An alternative way to approach adding items via dockutil
and avoid the 7 seconds wait between each change is to use the --no-restart
option for all but the last item. I'm not sure when this option was added but it is present now.
If the task in the main playbook is modified to include extended loop information like this:
- name: Ensure required dock items exist.
ansible.builtin.include_tasks: dock-add.yml
loop: "{{ dockitems_persist }}"
loop_control:
extended: true
extended_allitems: false
tags: ['dock']
The task in the add playbook can be modified to take advantage of the ansible_loop.last
variable like this:
- name: Ensure Dock item {{ item.name | default(item) }} exists.
ansible.builtin.command: "dockutil --add '{{ item.path }}' --label '{{ item.name }}' {% if ansible_loop.last is sameas true %}--no-restart{% endif %}"
when: dockitem_exists.rc >0 or
dockitem_exists.rc == 0 and current_section == 'recent-apps'
tags: ['dock']
I've not used ansible in a while so my syntax above could be incorrect. Please feel free to correct / improve the suggestion.
from ansible-collection-mac.
@karthicraghupathi - Oh... something like that could work, and would make the setup of the Dock a bit more robust (I hope). If someone can work on a PR implementing that change it could be good to go. I haven't had a chance to dig into that or any other little issues on this project in a couple months.
from ansible-collection-mac.
@geerlingguy Thank you for taking a look. I will look to submit a PR soon. Things are a bit hectic at work atm...
from ansible-collection-mac.
Related Issues (20)
- Sudo Issue with Cask Installed Item
- Ansible fails on a warning message coming from `brew` for a Formula which has an identically named Cask HOT 2
- Homebrew - Add support for link and unlink HOT 2
- Symlink brew to homebrew_brew_bin_path with root user HOT 2
- [M2 issue] Bad CPU type in executable b''/usr/local/bin/git''' HOT 2
- Failed geerlingguy.mac.homebrew : Ensure proper ownership on homebrew_install_path subdirs. HOT 3
- Dock Command does not install correctly, causing the dock commands to skip HOT 6
- Support for spacers in the dock role
- Homebrew fails when tapping homebrew/core HOT 6
- PATH issue finding MAS, when running REMOTELY
- Tapping default homebrew taps is broken HOT 2
- install path /opt/homebrew/Homebrew is unsupported HOT 2
- TypeError during Homebrew Cask Installation of android-platform-tools on MacOS HOT 5
- Error on [geerlingguy.mac.homebrew : Ensure proper ownership on homebrew_install_path subdirs.] OSError: [Errno 63] File name too long. HOT 1
- Error during: Ensure Homebrew is installed
- Ensure proper ownership fails for apps with admin as group HOT 1
- Cannot install collection with galaxy: Connection Reset By Peer HOT 1
- Issues possibly with folder permissions HOT 1
- Cannot install git-credential-manager-core
- Make the binary path of "brew" accessible outside role context
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ansible-collection-mac.