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
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
- 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
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
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
- 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