There are cases when nailgun can send us data where there are nodes
included into list of added nodes and deleted ones. As a result, puppet
manifests failed with resource ensurance for present and absent hosts.
To avoid this situation, subtract added nodes from deleted prior to
actually deleting them from hosts.
Change-Id: I515f7fae4bbe67123d70572a4f861e879ec580f6
Closes-Bug: #1679522
The create_resources function needs a hash provided to it and we
currently store deleted nodes as an array of strings. This change
updates the logic to use ensure_resource(), which accepts an
array of host titles.
Change-Id: I6f6b87db71c93347a46fa543ed0c18ef8b102394
Closes-Bug: #1582263
Deleted nodes now will get stored in a file
/etc/hiera/deleted_nodes.yaml and be inserted into
the hiera hierarchy.
host entries for any records present in deleted_nodes.yaml
will be purged when evaluating hosts task.
The source YAML for deleted nodes is generated on master
because nodes that are deployed from scratch or from Error
state will not be able to identify deleted nodes due to
certain orchestration limitations.
Change-Id: I01db215e77a3532a6fa7bf46ab7e20e281e8c165
Closes-Bug: #1513401
Refactor osnailyfacter/modular/hosts to be compatible with Puppet Master
Blueprint: fuel-refactor-osnailyfacter-for-puppet-master-compatibility
Change-Id: I9c81c07f8b43b1f08e6c431a655ad79cde32b123