plugins:
  docker:
    executor: central_deployment_agent
    package_name: cloudify-docker-plugin
    package_version: 2.0.14
dsl_definitions:
  client_config:
    client_config: &id001
      type: cloudify.types.docker.ClientConfig
      required: false
  docker_machine:
    docker_machine: &id002
      type: cloudify.types.docker.DockerMachineConfig
      required: false
  playbook_config:
    ansible_playbook_executable_path: &id003
      type: string
      default: ansible-playbook
    playbook_source_path: &id004
      type: string
      default: ''
    playbook_path: &id005
      type: string
      default: ''
    site_yaml_path: &id006
      type: string
      default: ''
    additional_playbook_files: &id007
      type: list
      default: []
    sources: &id008
      default: {}
    run_data: &id009
      default: {}
    sensitive_keys: &id010
      type: list
      default:
        - ansible_password
    options_config: &id011
      default: {}
    ansible_env_vars: &id012
      default:
        ANSIBLE_HOST_KEY_CHECKING: 'False'
        ANSIBLE_INVALID_TASK_ATTRIBUTE_FAILED: 'False'
    debug_level: &id013
      type: integer
      default: 2
    additional_args: &id014
      type: string
      default: ''
    save_playbook: &id015
      type: boolean
      default: false
    remerge_sources: &id016
      type: boolean
      default: false
    ansible_become: &id017
      type: boolean
      default: false
  playbook_inputs:
    ansible_playbook_executable_path: &id018
      default: { get_property: [SELF, ansible_playbook_executable_path] }
    playbook_source_path: &id019
      default: { get_property: [SELF, playbook_source_path] }
    playbook_path: &id020
      default: { get_property: [SELF, playbook_path] }
    site_yaml_path: &id021
      default: { get_property: [SELF, site_yaml_path] }
    save_playbook: &id022
      default: { get_property: [SELF, save_playbook] }
    remerge_sources: &id023
      default: { get_property: [SELF, remerge_sources] }
    sources: &id024
      default: { get_property: [SELF, sources] }
    run_data: &id025
      default: { get_property: [SELF, run_data] }
    sensitive_keys: &id026
      default: { get_property: [SELF, sensitive_keys] }
    options_config: &id027
      default: { get_property: [SELF, options_config] }
    ansible_env_vars: &id028
      default: { get_property: [SELF, ansible_env_vars] }
    debug_level: &id029
      default: { get_property: [SELF, debug_level] }
    additional_args: &id030
      default: { get_property: [SELF, additional_args] }
data_types:
  cloudify.types.docker.DockerMachineConfig:
    properties:
      docker_ip:
        type: string
        default: ''
      docker_user:
        type: string
        default: ''
      docker_key:
        type: string
        default: ''
      container_volume:
        type: string
        default: ''
  cloudify.types.docker.DockerInstallationConfig:
    properties:
      install_url:
        type: string
        default: https://get.docker.com
      install_script:
        type: string
        default: https://raw.githubusercontent.com/cloudify-cosmo/cloudify-docker-plugin/master/cloudify_docker/resources/post-install.sh
      install_with_sudo:
        type: boolean
        default: true
      offline_installation:
        type: boolean
        default: false
      package_tar_path:
        type: string
        default: ''
      post_install_script_path:
        type: string
        default: ''
      installation_dir:
        type: string
        default: ''
  cloudify.types.docker.ClientConfig:
    properties:
      docker_host:
        type: string
        default: ''
      docker_rest_port:
        type: string
        default: ''
      docker_sock_file:
        type: string
        default: ''
  cloudify.types.docker.Image:
    properties:
      image_content:
        type: string
        default: ''
      tag:
        type: string
        default: ''
      pull_image:
        type: boolean
        default: false
      all_tags:
        type: boolean
        default: false
  cloudify.types.docker.Container:
    properties:
      image_tag:
        type: string
        default: ''
      container_args:
        type: dict
        default: {}
  cloudify.types.docker.ContainerFiles:
    properties:
      docker_machine:
        type: cloudify.types.docker.DockerMachineConfig
        default: {}
      source:
        type: string
        default: ''
      destination:
        type: string
        default: ''
      extra_files:
        type: list
        default: []
      ansible_sources:
        type: dict
        default: {}
      terraform_sources:
        type: dict
        default: {}
  cloudify.types.terraform.Backend:
    properties:
      name:
        type: string
        required: false
      options:
        required: false
  cloudify.types.terraform.RootModule:
    properties:
      source:
        type: string
        required: true
      backend:
        type: cloudify.types.terraform.Backend
        default: {}
      variables:
        required: false
        default: {}
      environment_variables:
        required: false
        default: {}
node_types:
  cloudify.nodes.docker.images:
    derived_from: cloudify.nodes.Root
    properties:
      client_config: *id001
    interfaces:
      cloudify.interfaces.lifecycle:
        create:
          implementation: docker.cloudify_docker.tasks.list_images
  cloudify.nodes.docker.containers:
    derived_from: cloudify.nodes.Root
    properties:
      client_config: *id001
    interfaces:
      cloudify.interfaces.lifecycle:
        create:
          implementation: docker.cloudify_docker.tasks.list_containers
  cloudify.nodes.docker.host:
    derived_from: cloudify.nodes.Root
    properties:
      docker_machine: *id002
      resource_config:
        type: cloudify.types.docker.DockerInstallationConfig
        required: true
    interfaces:
      cloudify.interfaces.lifecycle:
        create:
          implementation: docker.cloudify_docker.tasks.install_docker
        delete:
          implementation: docker.cloudify_docker.tasks.uninstall_docker
  cloudify.nodes.docker.host_details:
    derived_from: cloudify.nodes.Root
    properties:
      client_config: *id001
    interfaces:
      cloudify.interfaces.lifecycle:
        create:
          implementation: docker.cloudify_docker.tasks.list_host_details
  cloudify.nodes.docker.image:
    derived_from: cloudify.nodes.Root
    properties:
      client_config: *id001
      resource_config:
        type: cloudify.types.docker.Image
        required: true
    interfaces:
      cloudify.interfaces.lifecycle:
        create:
          implementation: docker.cloudify_docker.tasks.build_image
        delete:
          implementation: docker.cloudify_docker.tasks.remove_image
  cloudify.nodes.docker.container:
    derived_from: cloudify.nodes.Root
    properties:
      client_config: *id001
      resource_config:
        type: cloudify.types.docker.Container
        required: true
    interfaces:
      cloudify.interfaces.lifecycle:
        create:
          implementation: docker.cloudify_docker.tasks.create_container
        stop:
          implementation: docker.cloudify_docker.tasks.stop_container
          inputs:
            stop_command:
              type: string
              default: ''
        delete:
          implementation: docker.cloudify_docker.tasks.remove_container
  cloudify.nodes.docker.container_files:
    derived_from: cloudify.nodes.Root
    properties:
      resource_config:
        type: cloudify.types.docker.ContainerFiles
        required: true
    interfaces:
      cloudify.interfaces.lifecycle:
        create:
          implementation: docker.cloudify_docker.tasks.prepare_container_files
        delete:
          implementation: docker.cloudify_docker.tasks.remove_container_files
  cloudify.nodes.docker.ansible_playbook:
    derived_from: cloudify.nodes.Root
    properties:
      ansible_playbook_executable_path: *id003
      playbook_source_path: *id004
      playbook_path: *id005
      site_yaml_path: *id006
      additional_playbook_files: *id007
      sources: *id008
      run_data: *id009
      sensitive_keys: *id010
      options_config: *id011
      ansible_env_vars: *id012
      debug_level: *id013
      additional_args: *id014
      save_playbook: *id015
      remerge_sources: *id016
      ansible_become: *id017
      docker_machine: *id002
    interfaces:
      cloudify.interfaces.lifecycle:
        precreate:
          implementation: docker.cloudify_docker.ansible.set_playbook_config
          inputs:
            ansible_playbook_executable_path: *id018
            playbook_source_path: *id019
            playbook_path: *id020
            site_yaml_path: *id021
            save_playbook: *id022
            remerge_sources: *id023
            sources: *id024
            run_data: *id025
            sensitive_keys: *id026
            options_config: *id027
            ansible_env_vars: *id028
            debug_level: *id029
            additional_args: *id030
        create:
          implementation: docker.cloudify_docker.ansible.create_ansible_playbook
        delete:
          implementation: docker.cloudify_docker.ansible.remove_ansible_playbook
  cloudify.nodes.docker.terraform_module:
    derived_from: cloudify.nodes.Root
    properties:
      docker_machine: *id002
      terraform_plugins:
        default: []
        required: true
      resource_config:
        type: cloudify.types.terraform.RootModule
        required: true
    interfaces:
      cloudify.interfaces.lifecycle:
        create:
          implementation: docker.cloudify_docker.terraform.prepare_terraform_files
        delete:
          implementation: docker.cloudify_docker.terraform.remove_terraform_files
