On 05/20/14 20:40, Andrew Pashkin wrote: > On 20.05.2014 21:26, 'Petros Moisiadis' via Ansible Project wrote: >> First of all, it is unclear to me how effectively you are going to do >> your staging if you are not deploying a full stack of the software >> needed to run on production. > Staging and production include all parts of stack, they are same and > differ only by values like size of cache of something, etc. > What does not include all stack is development machine - local virtual > machine of developer, it not require some parts of system - for > example instead of production web-servers it use lightweight > develpment server built into web-framework, it also does not need a queue. > >> That said, if you do have some parts that can be omitted from >> deploying your staging servers, it seems that you should reorganize >> your deployment tasks by creating roles that can be selectively >> applied as you want. For example, you could have a production >> playbook which would apply all needed roles and a staging playbook >> which would apply all roles except those that can be omitted (e.g. >> the 'web-server' and the 'queue' role, according to your saying). > Yeah, seems like you right, it fits best in Ansible model: > > * Hosts are for defining ip-addresses and host-specific variables > * Conditional statements are for task-wide purposes, not for > globally subsetting tasks - there would be a lot of refactoring if > there would be need to add new, fouth environment, for example. > * And roles are for grouping tasks in them - so they fit just right. > > Thanks for the answer! > > -- > With kind regards, Andrew Pashkin. > cell phone - +7 (985) 898 57 59 > Skype - waves_in_fluids > e-mail - [email protected] > -- > 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] > <mailto:[email protected]>. > To post to this group, send email to [email protected] > <mailto:[email protected]>. > To view this discussion on the web visit > https://groups.google.com/d/msgid/ansible-project/537B9370.9030807%40gmx.co.uk > <https://groups.google.com/d/msgid/ansible-project/537B9370.9030807%40gmx.co.uk?utm_medium=email&utm_source=footer>. > For more options, visit https://groups.google.com/d/optout.
Also, if creating a new role for a group of tasks does not make much sense (e.g. because the tasks are too specific and are not meant to be reused by other projects), you can just create a separate task file and use "include" statements in order to include it only in playbook for the environments that need these tasks. -- 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/537B95B1.3090002%40yahoo.gr. For more options, visit https://groups.google.com/d/optout.
