Sha256: 57ff99400ead734d3f3bb905a97ed66c2febeebaeb2668b50689b3c0cdbe94bf

Contents?: true

Size: 678 Bytes

Versions: 15

Compression:

Stored size: 678 Bytes

Contents

export function transformAnsiblePlaybook(playbook) {

  const ansiblePlaybook = new Object;
  ansiblePlaybook.id = playbook.id;
  ansiblePlaybook.name = playbook.name;
  ansiblePlaybook.groups = {};

  if (playbook.hasOwnProperty('groups')) {
    Object.entries(playbook.groups).forEach(([group_name,group_vars]) => {
      ansiblePlaybook.groups[group_name] = [];

      let id=0;
      Object.entries(group_vars).forEach(([var_name,var_value]) => {
        let entry = {
          id: id,
          name: var_name,
          value: var_value
        }
        ansiblePlaybook.groups[group_name].push(entry);
        id += 1;
      });
    });
  }

  return ansiblePlaybook;
}

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
foreman_acd-0.9.7 webpack/components/ApplicationDefinition/ApplicationDefinitionHelper.js
foreman_acd-0.9.5 webpack/components/ApplicationDefinition/ApplicationDefinitionHelper.js
foreman_acd-0.9.4 webpack/components/ApplicationDefinition/ApplicationDefinitionHelper.js
foreman_acd-0.9.3 webpack/components/ApplicationDefinition/ApplicationDefinitionHelper.js
foreman_acd-0.9.2.3 webpack/components/ApplicationDefinition/ApplicationDefinitionHelper.js
foreman_acd-0.9.2.2 webpack/components/ApplicationDefinition/ApplicationDefinitionHelper.js
foreman_acd-0.9.2.1 webpack/components/ApplicationDefinition/ApplicationDefinitionHelper.js
foreman_acd-0.9.2 webpack/components/ApplicationDefinition/ApplicationDefinitionHelper.js
foreman_acd-0.9.1 webpack/components/ApplicationDefinition/ApplicationDefinitionHelper.js
foreman_acd-0.9.0 webpack/components/ApplicationDefinition/ApplicationDefinitionHelper.js
foreman_acd-0.7.0 webpack/components/ApplicationDefinition/ApplicationDefinitionHelper.js
foreman_acd-0.6.0 webpack/components/ApplicationDefinition/ApplicationDefinitionHelper.js
foreman_acd-0.5.0 webpack/components/ApplicationDefinition/ApplicationDefinitionHelper.js
foreman_acd-0.4.0 webpack/components/ApplicationDefinition/ApplicationDefinitionHelper.js
foreman_acd-0.3.0 webpack/components/ApplicationDefinition/ApplicationDefinitionHelper.js