Hi Firesh

You are in danger of re-inventing the wheel here.

As Jean-Yves points out, you are starting to negate the whole point of 
Ansibles idempotency. You write something once and no matter how many times 
you run it, it checks and only makes changes as necessary. Writing a 
timestamp to every file on every remote host is not a good practice.

So you want to log what's going on? As Stefan points out look at something 
like ARA or better still look at AWX was you'll probably quickly get to the 
point of needing other features which AWX has taken care of.

Regards
Phil.

On Tuesday, 21 July 2020 07:08:57 UTC+1, Firesh Bakhda wrote:
>
> Hi ,
>
> I would like to post to this group to find out if there is anyway for 
> ansible to actually stamp the client with 
> Ansible Deployment or Deployment Stamp on what tasks were ran and when it 
> was ran, like a VERSION or DEPLOYMENT file that we could deposit to the 
> targets. 
>
> For example, 
>
> On first deployment the ansible scripts may just have tasks like: 
>
>
>    1. APT UPDATE
>       2. NTPDATE
>    
> this then was deployment and stamps on the client like this: 
>
>
>    1. Ansible Deployment 21/07/2020 13.35pm - v1.0
>          1. Tasks:
>             1. APT UPDATE 21/072020 13;40pm 
>             2. NTPDATE 21/072020 13.42pm
>          
>
> Then this ansible script was updated to contain 2 more tasks like the 
> below:
>
>
>    1. APT UPDATE
>       2. TIMESYNC DAEMON UPDATE
>       3. NTPDATE
>       4. PROXY UPDATE
>    
> And when this was ran again, the target system file gets updated once it 
> completes with:
>
>
>    1. Ansible Deployment 21/07/2020 13.35pm - v1.0
>          1. Tasks:
>             1. APT UPDATE 21/072020 13;40pm 
>             2. NTPDATE 21/072020 13.42pm
>          2. Ansible Deployment 21/07/2020 14.00pm - v1.1
>          1. Tasks:
>             1. APT UPDATE 21/07/2020 14.01pm
>             2. TIMESYNC DAEMON UPDATE 21/07/2020 14.03pm
>             3. NTPDATE 21/07/2020 14.04pm
>             4. PROXY UPDATE 21/07/2020 14.07pm
>          
>
>
> Something like this, this allows those who are maintaining individual 
> platforms gets to know if the deployed platform is upto date or not. 
> This would also help to know if the target system is to the latest 
> deployment or not. 
> Or is there any mechanism for this  ?
>
>
>
>

-- 
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 ansible-project+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/f9d48506-f3a9-4701-87aa-5b3dad92f49bo%40googlegroups.com.

Reply via email to