From 77fee07a882f7ef58a78ddeeee27269840c49b01 Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Wed, 3 Oct 2018 08:41:34 +0200 Subject: [PATCH] Change with_*: loops to loop: loops. Fix some examples. (#46373) --- lib/ansible/modules/crypto/acme/acme_certificate.py | 2 +- lib/ansible/modules/crypto/acme/acme_challenge_cert_helper.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/ansible/modules/crypto/acme/acme_certificate.py b/lib/ansible/modules/crypto/acme/acme_certificate.py index ff36082c10d..cf6b4e0b69e 100644 --- a/lib/ansible/modules/crypto/acme/acme_certificate.py +++ b/lib/ansible/modules/crypto/acme/acme_certificate.py @@ -247,7 +247,7 @@ EXAMPLES = R''' # # Note: item.value is a list of TXT entries, and route53 # # requires every entry to be enclosed in quotes # value: "{{ item.value | map('regex_replace', '^(.*)$', '\'\\1\'' ) | list }}" -# with_dict: sample_com_challenge.challenge_data_dns +# loop: "{{ sample_com_challenge.challenge_data_dns | dictsort }}" # when: sample_com_challenge is changed - name: Let the challenge be validated and retrieve the cert and intermediate certificate diff --git a/lib/ansible/modules/crypto/acme/acme_challenge_cert_helper.py b/lib/ansible/modules/crypto/acme/acme_challenge_cert_helper.py index 0f41b3514e7..9ef05703419 100644 --- a/lib/ansible/modules/crypto/acme/acme_challenge_cert_helper.py +++ b/lib/ansible/modules/crypto/acme/acme_challenge_cert_helper.py @@ -64,7 +64,7 @@ EXAMPLES = ''' challenge: tls-alpn-01 challenge_data: "{{ item.value['tls-alpn-01'] }}" private_key_src: /etc/pki/cert/key/sample.com.key - with_items: "{{ sample_com_challenge.challenge_data }}" + loop: "{{ sample_com_challenge.challenge_data | dictsort }}" register: sample_com_challenge_certs - name: Install challenge certificates @@ -81,7 +81,7 @@ EXAMPLES = ''' challenge_certificate: "{{ item.challenge_certificate }}" regular_certificate: "{{ item.regular_certificate }}" private_key: /etc/pki/cert/key/sample.com.key - with_items: "{{ sample_com_challenge_certs.results }}" + loop: "{{ sample_com_challenge_certs.results }}" - name: Create certificate for a given CSR for sample.com acme_certificate: