Skip to content

Commit

Permalink
Add a bolt task to setup shell completion
Browse files Browse the repository at this point in the history
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
```
  • Loading branch information
smortex committed Dec 9, 2021
1 parent d036bb0 commit e9538aa
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tasks/completion.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"description": "Setup choria completion"
}
4 changes: 4 additions & 0 deletions tasks/completion.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
mkdir -p /usr/share/bash-completion /usr/share/zsh/vendor-completions
choria completion --bash > /usr/share/bash-completion/completions/choria
choria completion --zsh > /usr/share/zsh/vendor-completions/_choria

0 comments on commit e9538aa

Please sign in to comment.