Ideally, I'd like to have some "incremental" strategy which stores 
successfully applied "server migration" to database and then while next run 
it won't execute it again

середа, 3 січня 2018 р. 01:54:53 UTC+1 користувач Sergey Glazyrin написав:
>
> Hey guys!
> I'd like to  emulate "migration" system for ansible provisioning of my 
> servers. For example, let's say:
> 1. I add to my product "Feature A" which requires changes on hosts with 
> role: elasticsearch, postgres, redis
> 2.Then I add "feature b" which partially rollbacks changes made for 
> feature A on some servers.
>
> Let's say I've one common ansible(site.yml) playbook with includes:
> include: - featurea/playbook.yml
> include: - featureb/playbook.yml
>
> And I apply my server changes using command ansible-playbook -i 
> inventory_file site.yml
> Right now, as far as I undetstand, all playbooks from site.yml would be 
> executed always, if I use the command I mentioned above.
> Sure, there's a lot of ways to avoid it, like: storing facts about 
> servers, something similar to: applied database for featureA, checking if 
> changes required for featureA are in database and storing it into variable, 
> and then skipping whole playbook for featurea BUT what is the best solution 
> ? To be honest, as far as I understand ansible doesn't support such 
> feature. What do I expect from ansible ?
> For intance, first time I executed site.yml, applied only: 
> featurea/playbook.yml
> While second time execution, I expected featureb/playbook.yml should be 
> executed but featurea/playbook.yml. How do I achieve that ?
> Maybe ansible tower may help here but I don't want to setup ansible tower 
> just for this purpose....
>
>

-- 
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/dee6fd10-052c-4010-b01c-5a3688842451%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to