Conversation
tasks/completion.sh
Outdated
| @@ -0,0 +1,4 @@ | |||
| #!/bin/sh | |||
| mkdir -p /usr/share/bash-completion /usr/share/zsh/vendor-completions | |||
There was a problem hiding this comment.
Does tasks have no way to be OS aware? I am not sure this is a valid path for, lets say, BSD?
There was a problem hiding this comment.
Unfortunately, while I would love some data to be gathered with hiera, this is not currently supported. The FreeBSD package the completions, but it is indeed better to overwrite these files (with same content) rather than pollute the system if the task happen to be run there.
I reworked the code to look for completion directories and if found install completion there. Not ideal, but maybe a bit less worse?
There was a problem hiding this comment.
OK, seems better :)
I wonder if this is the best place for it though - like its the only place at present - but do you maybe have other similar tasks? Like a bag or random useful choria related tasks?
This is a building block that might be used when/if we want to add Bolt tasks / plans to setup Choria on nodes not managed by Puppet, in particular client nodes. Currently our systems administrator manually add the choria repo and install the software, but this is not enough to have shell completion and we might need to update it from time to time. Add a bolt task that make managing the completions easier: ``` bolt task run choria::completion -t localhost --run-as root ```
e9538aa to
72d870b
Compare
This is a building block that might be used when/if we want to add Bolt tasks / plans to setup Choria on nodes not managed by Puppet, in particular client nodes.
Currently our systems administrator manually add the choria repo and install the software, but this is not enough to have shell completion and we might need to update it from time to time.
Add a bolt task that make managing the completions easier: