From 4833144d704372d60ef73d249234631b8f20af8c Mon Sep 17 00:00:00 2001 From: "Antonio J. Delgado" Date: Mon, 18 Sep 2023 19:31:00 +0300 Subject: [PATCH] fix cmd --- tasks/configure.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tasks/configure.yml b/tasks/configure.yml index 8de8681..5a7d5e3 100644 --- a/tasks/configure.yml +++ b/tasks/configure.yml @@ -18,9 +18,15 @@ - where_result.stdout == "" - which_result.stdout == "" -- name: Set command for opendkim-genkey +- name: Set command for opendkim-genkey (using which) set_fact: opendkim_genkey_cmd: "{{ which_result.stdout }}" + when: which_result.stdout != '' + +- name: Set command for opendkim-genkey (using where) + set_fact: + opendkim_genkey_cmd: "{{ where_result.stdout }}" + when: where_result.stdout != '' - name: Generate DKIM keys shell: "{{opendkim_genkey_cmd }} -D /etc/dkimkeys --domain={{ item }} --selector={{ item }}"