GET /api/v1/files/4
Content-Type: application/json
Vary: Accept

    "id": 4,
    "sha1": "91f1b1e8d951ff280906397faa94844061c11cb5",
    "playbook": {
        "id": 1,
        "items": {
            "plays": 3,
            "tasks": 38,
            "results": 38,
            "hosts": 2,
            "files": 5,
            "records": 6
        "labels": [
                "id": 1,
                "name": "integration tests"
                "id": 2,
                "name": "smoke"
        "started": "2019-10-23T21:42:09.377591Z",
        "ended": "2019-10-23T21:42:19.892193Z",
        "duration": "00:00:10.514602",
        "name": "Smoke tests",
        "ansible_version": "2.8.6.post0",
        "status": "completed",
        "path": "/home/zuul/.ara-tests/git/ara/tests/integration/smoke.yaml"
    "content": "---\n#  Copyright (c) 2018 Red Hat, Inc.\n#\n#  This file is part of ARA Records Ansible.\n#\n#  ARA is free software: you can redistribute it and/or modify\n#  it under the terms of the GNU General Public License as published by\n#  the Free Software Foundation, either version 3 of the License, or\n#  (at your option) any later version.\n#\n#  ARA is distributed in the hope that it will be useful,\n#  but WITHOUT ANY WARRANTY; without even the implied warranty of\n#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n#  GNU General Public License for more details.\n#\n#  You should have received a copy of the GNU General Public License\n#  along with ARA.  If not, see <>.\n\n# Ensure no_log is respected\n- name: Print normal data\n  debug:\n    msg: \"normal data\"\n\n- name: Print confidential data\n  debug:\n    msg: \"confidential data\"\n  no_log: \"yes\"\n\n# ARA record and read modules specific tests\n- name: Record data with no type\n  ara_record:\n    key: \"notype\"\n    value: \"text\"\n  register: notype\n\n- name: Validate notype key\n  assert:\n    that:\n      - notype.key == \"notype\"\n      - notype.value == \"text\"\n      - notype.type == \"text\"\n\n- name: Update notype key with specified playbook\n  ara_record:\n    playbook_id: \"{{ notype.playbook_id }}\"\n    key: \"notype\"\n    value: \"updated text\"\n    type: \"text\"\n  register: notype_update\n\n- name: Validate notype key\n  assert:\n    that:\n      - notype_update.key == \"notype\"\n      - notype_update.value == \"updated text\"\n      - notype_update.type == \"text\"\n\n- name: Record data with text type\n  ara_record:\n    key: \"foo\"\n    value: \"bar\"\n    type: \"text\"\n\n- name: Update existing key's value and type\n  ara_record:\n    key: \"foo\"\n    value: \"http://barfoo\"\n    type: \"url\"\n  register: foo\n\n- name: Validate foo key\n  assert:\n    that:\n      - foo.key == \"foo\"\n      - foo.value == \"http://barfoo\"\n      - foo.type == \"url\"\n\n- name: Add another k/v pair with ara_record\n  ara_record:\n    key: \"bar\"\n    value: '{ \"foo\": \"bar\" }'\n    type: \"json\"\n  register: bar\n\n- name: Validate bar key\n  assert:\n    that:\n      - bar.key == \"bar\"\n      - \"bar.value == '{ \\\"foo\\\": \\\"bar\\\" }'\"\n      - bar.type == \"json\"\n\n- name: Record a list value\n  vars:\n    someitems:\n      - one\n      - two\n      - three\n      - go\n  ara_record:\n    key: \"somelist\"\n    value: \"{{ someitems }}\"\n    type: \"list\"\n  register: somelist\n\n- name: Validate somelist key\n  vars:\n    someitems:\n      - one\n      - two\n      - three\n      - go\n  assert:\n    that:\n      - somelist.key == \"somelist\"\n      - somelist.value == someitems\n      - somelist.type == \"list\"\n\n- name: Record a dict value\n  vars:\n    dictdata:\n      foo: \"bar\"\n      bar: \"foo\"\n  ara_record:\n    key: \"somedict\"\n    value: \"{{ dictdata }}\"\n    type: \"dict\"\n  register: somedict\n\n- name: Validate somedict key\n  vars:\n    dictdata:\n      foo: \"bar\"\n      bar: \"foo\"\n  assert:\n    that:\n      - somedict.key == \"somedict\"\n      - somedict.value == dictdata\n      - somedict.type == \"dict\"\n\n- name: Record a list as a text type\n  vars:\n    list:\n      - foo\n      - bar\n  ara_record:\n    key: \"list_as_text\"\n    value: \"{{ list }}\"\n    type: \"text\"\n  register: list_as_text\n\n# The key is still recorded as an actual list, however, it will be rendered\n# as text in the UI.\n- name: Validate list_as_text key\n  vars:\n    list:\n      - foo\n      - bar\n  assert:\n    that:\n      - list_as_text.key == \"list_as_text\"\n      - list_as_text.value == list\n      - list_as_text.value != \"[u'foo', u'bar']\"\n      - list_as_text.type == \"text\"\n\n# Things that should fail\n- name: Record with no key\n  ara_record:\n    value: \"value\"\n  ignore_errors: \"yes\"\n  register: nokey\n\n- name: Validate nokey failure\n  assert:\n    that:\n      - nokey.failed\n\n- name: Record with no value\n  ara_record:\n    key: \"key\"\n  ignore_errors: \"yes\"\n  register: novalue\n\n- name: Validate novalue failure\n  assert:\n    that:\n      - novalue.failed\n\n- name: Record with invalid type\n  ara_record:\n    key: \"key\"\n    value: \"value\"\n    type: \"hadoop\"\n  ignore_errors: \"yes\"\n  register: invalid\n\n- name: Validate invalid failure\n  assert:\n    that:\n      - invalid.failed\n",
    "created": "2019-10-23T21:42:11.326725Z",
    "updated": "2019-10-23T21:42:11.326769Z",
    "path": "/home/zuul/.ara-tests/git/ara/tests/integration/roles/smoke-tests/tasks/ara-ops.yaml"