public inbox for kdevops@lists.linux.dev
 help / color / mirror / Atom feed
From: Daniel Gomez <da.gomez@kernel.org>
To: kdevops@lists.linux.dev, Luis Chamberlain <mcgrof@kernel.org>
Cc: Daniel Gomez <da.gomez@samsung.com>, Daniel Gomez <da.gomez@kernel.org>
Subject: [PATCH 2/5] update_ssh_config_guestfs: fix broken conditionals
Date: Mon, 12 May 2025 16:36:13 +0200	[thread overview]
Message-ID: <20250512-vagrant-fixes-v1-2-3dcfd0a380ba@samsung.com> (raw)
In-Reply-To: <20250512-vagrant-fixes-v1-0-3dcfd0a380ba@samsung.com>

From: Daniel Gomez <da.gomez@samsung.com>

Fixes error:
if [[ "y" == "y" ]]; then \
        ansible-playbook -v --connection=local \
                --inventory localhost, \
                playbooks/update_ssh_config_guestfs.yml \
                --extra-vars=@./extra_vars.yaml; \
                LIBVIRT_DEFAULT_URI="qemu:///system" \
                .//scripts/update_ssh_config_guestfs.py; \
fi
Using /scratch/dagomez/linux-kdevops/kdevops/ansible.cfg as config file
PLAY 1: LOCALHOST
task 1. [started TASK: Gathering Facts on localhost]
task 2. [started TASK: update_ssh_config_guestfs : Check if the ssh
config file exists on localhost]
task 3. [started TASK: update_ssh_config_guestfs : Check if the kdevops
include directive was used on localhost]
task 4. [started TASK: update_ssh_config_guestfs : Check if the new
include directive was used with a kdevops_version comment on localhost]
task 5.[ERROR]: Conditional result was '1' of type 'int', which
evaluates to True. Conditionals must have a boolean result.
Origin:
/scratch/dagomez/linux-kdevops/kdevops/playbooks/roles/update_ssh_config
_guestfs/tasks/main.yml:34:7

32   when:
33     - ssh_config.stat.exists
34     - kdevops_ssh_include.found
         ^ column 7

Broken conditionals can be temporarily allowed with the
`ALLOW_BROKEN_CONDITIONALS` configuration option

Signed-off-by: Daniel Gomez <da.gomez@samsung.com>
---
 playbooks/roles/update_ssh_config_guestfs/tasks/main.yml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/playbooks/roles/update_ssh_config_guestfs/tasks/main.yml b/playbooks/roles/update_ssh_config_guestfs/tasks/main.yml
index 0e728d9a84996dce592465c6f2fa2d16b62ae963..6c6c49034d8a0313cda5fd5ca673093f1a8054cf 100644
--- a/playbooks/roles/update_ssh_config_guestfs/tasks/main.yml
+++ b/playbooks/roles/update_ssh_config_guestfs/tasks/main.yml
@@ -31,8 +31,8 @@
   meta: end_play
   when:
     - ssh_config.stat.exists
-    - kdevops_ssh_include.found
-    - fixed_ssh_entry.found
+    - kdevops_ssh_include.found | bool
+    - fixed_ssh_entry.found | bool
 
 # If we're still running it means the correct include directive following a new
 # line was not found. So remove old stale include directives which may be

-- 
2.49.0


  parent reply	other threads:[~2025-05-12 14:36 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-12 14:36 [PATCH 0/5] Ansible fixes in different roles Daniel Gomez
2025-05-12 14:36 ` [PATCH 1/5] gen_nodes: remove vagrant tasks Daniel Gomez
2025-05-12 14:36 ` Daniel Gomez [this message]
2025-05-12 14:36 ` [PATCH 3/5] create_partition: fix using atribute append of list object Daniel Gomez
2025-05-12 14:36 ` [PATCH 4/5] gen_hosts: blktests: fix hosts names generation Daniel Gomez
2025-05-12 14:36 ` [PATCH 5/5] gen_nodes: " Daniel Gomez
2025-05-14 18:32 ` [PATCH 0/5] Ansible fixes in different roles Luis Chamberlain

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250512-vagrant-fixes-v1-2-3dcfd0a380ba@samsung.com \
    --to=da.gomez@kernel.org \
    --cc=da.gomez@samsung.com \
    --cc=kdevops@lists.linux.dev \
    --cc=mcgrof@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox