Re: [ansible-project] store the output of math operator

2019-04-29 Thread Andy Magana
Hello from Oklahoma City, My name is Andreas I noticed your post looking around for something about subtracting two variables but my vars are dates converted to strings but I can't seem to get the two vars to subtract I started with a bash script. #!/bin/bash # TO PRINT THE NUMBER OF DAYS

Re: [ansible-project] store the output of math operator

2017-02-15 Thread Nehal J Wani
Invoking the shell module is not necessary. One can use jinja2. An example: $ cat a.yaml - hosts: localhost tasks: - set_fact: A="5" - set_fact: B="6" - set_fact: C="{{ A|int - B|int }}" - debug: var=C $ ansible-playbook -v a.yaml No config file found; using defaults

Re: [ansible-project] store the output of math operator

2017-02-14 Thread DHAVAL JAISWAL
- name: Set the output of the this state set_fact: A="{{image_avl.stdout}}" -- this is coming from the previous registered output tags: avl1 - name: Define our static value for the desired image number set_fact: B={{retain}} -- this is coming from

Re: [ansible-project] store the output of math operator

2017-02-14 Thread Dick Visser
On 14 February 2017 at 16:12, DHAVAL JAISWAL wrote: > solved it. Well done! Any chance of sharing *how* you solved it? Thanks, -- Dick Visser Sr. System & Network Engineer GÉANT Want to join us? We're hiring: https://www.geant.org/jobs -- You received this message

Re: [ansible-project] store the output of math operator

2017-02-14 Thread DHAVAL JAISWAL
solved it. On Tue, Feb 14, 2017 at 6:00 PM, bablu wrote: > >- name: Set the output of the this state > set_fact: A="{{image_avl.stdout}}" -- this is coming from > the previous registered output > tags: avl1 > >- name: Define our static value for

[ansible-project] store the output of math operator

2017-02-14 Thread bablu
- name: Set the output of the this state set_fact: A="{{image_avl.stdout}}" -- this is coming from the previous registered output tags: avl1 - name: Define our static value for the desired image number set_fact: B={{retain}} -- this is coming