add a playbook for automating migrations #13
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Write a playbook that allows for migration of services and other facts from one host to another. There are three possible approaches to implementing this playbook:
roles/init-server, e.g.roles/migrateroles/init-server, to for the migration playbookIn the second implementation case above, this would mean re-using variables, handlers or tasks in those roles, or otherwise extending them, to also fit the migration use-case. This is the best option if the playbook is written under the assumption that playbooks for creating and configuring the given hosts, based on the same role(s), were already run under this repo. That is, if one assumes that the migration is from a host with a predictable state due to use of playbooks in the same repo, as this would mean facts about the host to be migrated from share some values and semantics with variables and data structures already extant in given roles (especially role templates and role files) or variable files in the repo.
The first implementation case is best if no such assumption is made, provided some of the state information about the host to be migrated cannot simply be acquired through facts automatically gathered by Ansible. Since this may not be certain, it may be best to start with an implementation with the third approach, and then have periods of refactoring that lead the implementation into the first approach. This can be written as an initial migration is being manually attempted--that way, if a migration is needed one is not stuck waiting for completion of this implementation. So an active manual migration and an attempt to automate it in this way should run in tandem/parallel.