playbook task

- name: "create Assessment template" 

    command: "{{ item }}"

    with_items: 

      - aws inspector create-assessment-template --assessment-target-arn {{ 
target_arn }} --assessment-template-name {{ assessment_template_name }} 
--duration-in-seconds {{ run_duration }} --rules-package-arns {{ rules_arn 
}}

    register: template_arn

    tags: create-assessment-template

  - debug:

      var: template_arn.results.0.stdout_lines[1]

    tags: create-assessment-template

On Wednesday, March 27, 2019 at 3:57:05 PM UTC-7, [email protected] 
wrote:
>
> how can i get only the arn value but not complete output saved in to 
> variable
>
> in the below example
>
> TASK [debug] 
> ****************************************************************************************************************************************************************************************************************************
>
> ok: [localhost] => {
>
>     "template_arn.results.0.stdout_lines[1]": "  
>   \"assessmentTemplateArn\": 
> \"arn:aws:inspector:us-west-2:024283424342:target/0-Rrtw16WK/template/0-5KIIPQREcC\""
>
>
>
> i want to print 
> only 
> arn:aws:inspector:us-west-2:024283424342:target/0-Rrtw16WK/template/0-5KIIPQREcC\
>  
> i dont want """"assessmentTemplateArn"""" to be saved to my variable 
> Can anyone please help
>
> Thank you 
>

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/b73f4838-849d-4590-9231-2007e0acd344%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to