--- /dev/null
+extends: default
+
+rules:
+  braces:
+    max-spaces-inside: 1
+    level: error
+  brackets:
+    max-spaces-inside: 1
+    level: error
+  line-length: disable
+  truthy: disable
 
--- /dev/null
+---
+chartmuseum_port: "8879"
+chartmuseum_storage_dir: "{{ app_data_path }}/chartmuseum"
 
--- /dev/null
+# Molecule managed
+
+{% if item.registry is defined %}
+FROM {{ item.registry.url }}/{{ item.image }}
+{% else %}
+FROM {{ item.image }}
+{% endif %}
+
+RUN if [ $(command -v apt-get) ]; then apt-get update && apt-get install -y python sudo bash ca-certificates && apt-get clean; \
+    elif [ $(command -v dnf) ]; then dnf makecache && dnf --assumeyes install python sudo python-devel python*-dnf bash && dnf clean all; \
+    elif [ $(command -v yum) ]; then yum makecache fast && yum install -y python sudo yum-plugin-ovl bash && sed -i 's/plugins=0/plugins=1/g' /etc/yum.conf && yum clean all; \
+    elif [ $(command -v zypper) ]; then zypper refresh && zypper install -y python sudo bash python-xml && zypper clean -a; \
+    elif [ $(command -v apk) ]; then apk update && apk add --no-cache python sudo bash ca-certificates; \
+    elif [ $(command -v xbps-install) ]; then xbps-install -Syu && xbps-install -y python sudo bash ca-certificates && xbps-remove -O; fi
 
--- /dev/null
+---
+dependency:
+  name: galaxy
+driver:
+  name: docker
+lint:
+  name: yamllint
+platforms:
+  - name: instance-chartmuseum
+    image: centos:7
+    groups:
+      - infrastructure
+provisioner:
+  name: ansible
+  lint:
+    name: ansible-lint
+  env:
+    ANSIBLE_ROLES_PATH: ../../../../test/roles
+    ANSIBLE_LIBRARY: ../../../../library
+  inventory:
+    group_vars:
+      all:
+        app_name: moleculetestapp
+        app_data_path: "/opt/{{ app_name }}"
+        helm_bin_dir: /usr/local/bin
+        chartmuseum_storage_dir: "/opt/{{ app_name }}/chartmuseum"
+        chartmuseum_port: "1234"
+scenario:
+  name: default
+verifier:
+  name: testinfra
+  lint:
+    name: flake8
 
--- /dev/null
+---
+- name: Converge
+  hosts: all
+  roles:
+    - chartmuseum
 
--- /dev/null
+---
+- name: Prepare infra
+  hosts: infrastructure
+  roles:
+    - prepare-chartmuseum
 
--- /dev/null
+import os
+
+import testinfra.utils.ansible_runner
+
+testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
+    os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all')
+
+
+def test_chartmuseum(host):
+    ansible_vars = host.ansible.get_variables()
+    p = host.process.get(comm="chartmuseum")
+    assert 'chartmuseum --storage local --storage-local-rootdir /opt/' +\
+           ansible_vars['app_name'] + '/chartmuseum -port ' +\
+           ansible_vars['chartmuseum_port'] in p.args
+    assert host.file("/opt/" + ansible_vars['app_name'] +
+           "/chartmuseum").is_directory
 
--- /dev/null
+---
+- name: Install chartmuseum
+  copy:
+    src: "{{ app_data_path }}/downloads/chartmuseum"
+    dest: "{{ helm_bin_dir }}"
+    remote_src: true
+    mode: 0755
+
+- name: Create storage directory for chartmuseum
+  file:
+    path: "{{ chartmuseum_storage_dir }}"
+    state: directory
+
+- name: Run Helm chart repository
+  shell: "{{ helm_bin_dir }}/chartmuseum --storage local --storage-local-rootdir {{ chartmuseum_storage_dir }} -port {{ chartmuseum_port }} &"
+  async: 10
+  poll: 3
+  register: chart_repository
+  changed_when: "'address already in use' not in chart_repository.stderr"
+  failed_when: "'Starting ChartMuseum' not in chart_repository.stderr"
 
--- /dev/null
+---
+- name: "Ensure {{ app_data_path }}/downloads directory exists"
+  file:
+    path: "{{ app_data_path }}/downloads"
+    recurse: true
+    state: directory
+
+- name: "Download chartmuseum"
+  get_url:
+    url: "https://s3.amazonaws.com/chartmuseum/release/latest/bin/linux/amd64/chartmuseum"
+    dest: "{{ app_data_path }}/downloads"
+    remote_src: true