From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 4284 invoked from network); 19 Apr 2021 09:59:20 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 19 Apr 2021 09:59:20 -0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=zsh.org; s=rsa-20200801; h=List-Archive:List-Owner:List-Post:List-Unsubscribe: List-Subscribe:List-Help:List-Id:Sender:Message-ID:Date:Content-ID: Content-Type:MIME-Version:Subject:To:From:Reply-To:Cc: Content-Transfer-Encoding:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References; bh=J7HaofEwfW4WQxu/IGB1X83xRKdGcKiBljzj1vNpHdg=; b=n5EOtEjX5DnTKsuvPQkwe+GeTy T+vi0Al1205rPj+W+A7T17+6/yFch0G5nqA3Tz1MT+dul2l6A3jlG9VcuDR2I3iIOu2+viVhta3YG 9rT0K6nHzxMjv+gLe4zXK1TKPCVDxZuF2LL5h+brbh9mhfrouA/Q9lHiDMxlRz0tqBIbG47e+TVg1 f4V9V5GreSbWYUfz2uIqXz0m+M4BuUojITKARbYhKHFLqOMaKh2q3yzaKfrq2qK24AV9mOiuhAxxy 0h9Ps4ZJPlCzANcjeLit+/tzfRe8TDw2F6Kz1pzN2f4Q5ZpSgsGAtK6vtZjKw09mSIwkPTRVDm9j3 SjEc+tNQ==; Received: from authenticated user by zero.zsh.org with local id 1lYQgV-000MCp-Sh; Mon, 19 Apr 2021 09:59:15 +0000 Received: from authenticated user by zero.zsh.org with esmtpsa (TLS1.3:TLS_AES_256_GCM_SHA384:256) id 1lYQfn-000LxP-2M; Mon, 19 Apr 2021 09:58:31 +0000 Received: from [192.168.178.21] (helo=hydra) by mail.kiddle.eu with esmtp(Exim 4.94) (envelope-from ) id 1lYQfk-0003HH-Ou for zsh-workers@zsh.org; Mon, 19 Apr 2021 11:58:28 +0200 From: Oliver Kiddle To: Zsh workers Subject: PATCH: complete for another ansible variable MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <12601.1618826308.1@hydra> Date: Mon, 19 Apr 2021 11:58:28 +0200 Message-ID: <12602-1618826308.769636@wv8v.ZfED.RB9V> X-Seq: 48619 Archived-At: X-Loop: zsh-workers@zsh.org Errors-To: zsh-workers-owner@zsh.org Precedence: list Precedence: bulk Sender: zsh-workers-request@zsh.org X-no-archive: yes List-Id: List-Help: List-Subscribe: List-Unsubscribe: List-Post: List-Owner: List-Archive: This adds completion of inventory plugins in assignments to ANSIBLE_INVENTORY_ENABLED. There are lots more variables most of which I never use. Also, ansible-inventory now takes hosts or groups as a normal parameter and the login action has been removed from ansible-galaxy role at some point. They now require an API key. Oliver diff --git a/Completion/Unix/Command/_ansible b/Completion/Unix/Command/_ansible index 9de9b6675..c81308586 100644 --- a/Completion/Unix/Command/_ansible +++ b/Completion/Unix/Command/_ansible @@ -1,4 +1,4 @@ -#compdef ansible ansible-config ansible-console ansible-doc ansible-galaxy ansible-inventory ansible-playbook ansible-pull ansible-vault -value-,ANSIBLE_STDOUT_CALLBACK,-default- +#compdef ansible ansible-config ansible-console ansible-doc ansible-galaxy ansible-inventory ansible-playbook ansible-pull ansible-vault -value-,ANSIBLE_STDOUT_CALLBACK,-default- -value-,ANSIBLE_INVENTORY_ENABLED,-default- local curcontext="$curcontext" plug plugvar subcmd ign ret=1 local -a args state line expl gactions @@ -9,6 +9,10 @@ case $service in plug=callback state=plugins ;; + *,ANSIBLE_INVENTORY_ENABLED,*) + plug=inventory + state=plugins + ;; ansible|ansible-console|ansible-doc|ansible-playbook) args=( \*{-M+,--module-path=}'[specify path to modules]:module path:_dir_list' @@ -125,6 +129,7 @@ case $service in '(-y --yaml --vars --graph)--toml[use TOML format instead of JSON]' '(-y --yaml)--vars[add variables to the graph display]' '(-y --yaml --toml --vars --graph)'{-y,--yaml}'[use YAML format instead of JSON]' + ':host or group:->hosts' ) ;; ansible-galaxy) @@ -238,7 +243,7 @@ case $state in ;; galaxy) ign='' - gactions=( delete import info init install list login remove search setup ) + gactions=( delete import info init install list remove search setup ) case ${(j.:.)line[1,3]} in (role|collection):*:*) subcmd="${line[1]}-${line[2]}" @@ -326,11 +331,6 @@ case $state in '--role-name=[specify name the role should have]:role' ) ;; - role-login) - args+=( - '--github-token=[identify with github token rather than username and password]' - ) - ;; collection-build) args+=( '--output-path=[specify path in which the collection is built to]:path [.]:_directories'