Create Ansible playbook
Create a new playbook.
Org is the organisation identifier.
tfqProject is the project identifier.
qfwAccount is the internal customer account ID.
7Install Ansible Galaxy dependencies
falseExample: truePath to Ansible Galaxy requirements file
requirements.ymlDescription documents the playbook purpose and usage
Playbook for deploying web services to productionThe unique identifier for this playbook
Totam dolores deserunt illo.Name is the human readable name
test playbookRepository is the name of the repository to use.
my-repoRepository Branch in which the playbook should be accessed.
mainRepository Commit/Tag in which the playbook should be accessed.
abc10edRepository Connector is the reference to the connector to use for this playbook.
my-connectorRepository Path is the path in which the playbook resides.
""Example: playbooks/Tags associated with the playbook
["Occaecati molestiae.","Repellat provident aut vitae doloremque.","Deserunt exercitationem dolor labore ut.","Rerum non nulla eaque."]Created response.
Account is the internal customer account ID.
bInstall Ansible Galaxy dependencies
falseExample: truePath to Ansible Galaxy requirements file
requirements.ymlTimestamp when the resource was created.
1627590400Description documents the playbook purpose and usage
Playbook for deploying web services to productionThe environment vars in the playbook
Et impedit dignissimos consequatur veniam delectus.The unique identifier for this playbook
Porro facere nihil in nulla.Name is the human readable name
test playbookOrg is the organisation identifier.
2ohProject is the project identifier.
3wiRepository is the name of the repository to use.
my-repoRepository Branch in which the playbook should be accessed.
mainRepository Commit/Tag in which the playbook should be accessed.
abc10edRepository Connector is the reference to the connector to use for this playbook.
my-connectorRepository Path is the path in which the playbook resides.
""Example: playbooks/Tags associated with the playbook
["Dolor voluptatem.","Dolores voluptatem ratione.","Repellat doloribus dolorem aut sapiente ratione.","Distinctio facere animi expedita."]Timestamp when the resource was last updated.
1627686800The vars in the playbook
Velit corrupti id nisi.BadRequestError: Bad Request response.
UnauthorizedError: Unauthorized response.
ForbiddenError: Forbidden response.
NotFoundError: Not Found response.
TimeoutError: Request Timeout response.
ConflictError: Conflict response.
LockedError: Locked response.
ContextCancelledError: response.
InternalServerError: Internal Server Error response.
BadGatewayError: Bad Gateway response.
POST /api/orgs/{org}/projects/{project}/ansible/playbook HTTP/1.1
Host: localhost:80
Harness-Account: 7
Content-Type: application/json
Accept: */*
Content-Length: 1652
{
"ansible_galaxy": false,
"ansible_galaxy_requirements_file": "requirements.yml",
"description": "Playbook for deploying web services to production",
"env_vars": {
"Beatae qui quam ipsam incidunt qui.": {
"file_name": "Ut dolorum dignissimos fuga.",
"key": "ip",
"uuid": "123e4567-e89b-12d3-a456-426655440000",
"value": "Et adipisci consequatur animi enim.",
"value_type": "Voluptates molestiae odit expedita ea sed."
},
"Doloribus quidem quibusdam perspiciatis.": {
"file_name": "Ut dolorum dignissimos fuga.",
"key": "ip",
"uuid": "123e4567-e89b-12d3-a456-426655440000",
"value": "Et adipisci consequatur animi enim.",
"value_type": "Voluptates molestiae odit expedita ea sed."
}
},
"identifier": "Vitae commodi nisi maxime.",
"name": "test playbook",
"repository": "my-repo",
"repository_branch": "main",
"repository_commit": "abc10ed",
"repository_connector": "my-connector",
"repository_path": "playbooks/",
"tags": [
"Totam debitis facere voluptas iusto.",
"Non deserunt."
],
"vars": {
"Fugit vitae adipisci.": {
"file_name": "Ut dolorum dignissimos fuga.",
"key": "ip",
"uuid": "123e4567-e89b-12d3-a456-426655440000",
"value": "Et adipisci consequatur animi enim.",
"value_type": "Voluptates molestiae odit expedita ea sed."
},
"Quo distinctio consectetur unde.": {
"file_name": "Ut dolorum dignissimos fuga.",
"key": "ip",
"uuid": "123e4567-e89b-12d3-a456-426655440000",
"value": "Et adipisci consequatur animi enim.",
"value_type": "Voluptates molestiae odit expedita ea sed."
},
"Tempora sint sit perferendis optio.": {
"file_name": "Ut dolorum dignissimos fuga.",
"key": "ip",
"uuid": "123e4567-e89b-12d3-a456-426655440000",
"value": "Et adipisci consequatur animi enim.",
"value_type": "Voluptates molestiae odit expedita ea sed."
}
}
}{
"account": "1",
"ansible_galaxy": false,
"ansible_galaxy_requirements_file": "requirements.yml",
"created": 1627590400,
"description": "Playbook for deploying web services to production",
"env_vars": "Sed earum voluptas non cum.",
"identifier": "Ut est aliquid illum harum.",
"name": "test playbook",
"org": "7hd",
"policy_evaluation": {
"account_id": "XRQAjvT37acOiXx9PRaQMF",
"action": "onrun",
"created": 1636370209475,
"details": [
{
"account_id": "eBqAoNchMLKigC_qZ5EdC",
"action": "onrun",
"created": 1636669297674,
"description": "Captures critical production policies",
"details": [
{
"deny_messages": [
"deployment stage 'example-stage' does not have a HarnessApproval step",
"deployment stage 'example-stage' has step 'run-script' that is forbidden type 'ShellScript'"
],
"output": "{\n \"deny\": [\n \"deployment stage 'deploy' does not have a HarnessApproval step\"\n ],\n \"stages_with_approval\": []\n}",
"policy": {
"account_id": "eBqAoNchMLKigC_qZ5EdC",
"created": 1636669297674,
"identifier": "policy-1",
"name": "Pipeline Approval",
"org_id": "test-org",
"project_id": "test-project",
"rego": "",
"updated": 1636669297674
},
"rego_error": "policy.rego:25: rego_parse_error: non-terminated string m == \"test",
"status": "error"
},
{
"deny_messages": [
"deployment stage 'example-stage' does not have a HarnessApproval step",
"deployment stage 'example-stage' has step 'run-script' that is forbidden type 'ShellScript'"
],
"output": "{\n \"deny\": [\n \"deployment stage 'deploy' does not have a HarnessApproval step\"\n ],\n \"stages_with_approval\": []\n}",
"policy": {
"account_id": "eBqAoNchMLKigC_qZ5EdC",
"created": 1636669297674,
"identifier": "policy-1",
"name": "Pipeline Approval",
"org_id": "test-org",
"project_id": "test-project",
"rego": "",
"updated": 1636669297674
},
"rego_error": "policy.rego:25: rego_parse_error: non-terminated string m == \"test",
"status": "error"
},
{
"deny_messages": [
"deployment stage 'example-stage' does not have a HarnessApproval step",
"deployment stage 'example-stage' has step 'run-script' that is forbidden type 'ShellScript'"
],
"output": "{\n \"deny\": [\n \"deployment stage 'deploy' does not have a HarnessApproval step\"\n ],\n \"stages_with_approval\": []\n}",
"policy": {
"account_id": "eBqAoNchMLKigC_qZ5EdC",
"created": 1636669297674,
"identifier": "policy-1",
"name": "Pipeline Approval",
"org_id": "test-org",
"project_id": "test-project",
"rego": "",
"updated": 1636669297674
},
"rego_error": "policy.rego:25: rego_parse_error: non-terminated string m == \"test",
"status": "error"
},
{
"deny_messages": [
"deployment stage 'example-stage' does not have a HarnessApproval step",
"deployment stage 'example-stage' has step 'run-script' that is forbidden type 'ShellScript'"
],
"output": "{\n \"deny\": [\n \"deployment stage 'deploy' does not have a HarnessApproval step\"\n ],\n \"stages_with_approval\": []\n}",
"policy": {
"account_id": "eBqAoNchMLKigC_qZ5EdC",
"created": 1636669297674,
"identifier": "policy-1",
"name": "Pipeline Approval",
"org_id": "test-org",
"project_id": "test-project",
"rego": "",
"updated": 1636669297674
},
"rego_error": "policy.rego:25: rego_parse_error: non-terminated string m == \"test",
"status": "error"
}
],
"enabled": true,
"identifier": "policyset-1",
"name": "Production Policies",
"org_id": "test-org",
"project_id": "test-project",
"status": "error",
"type": "pipeline",
"updated": 1636669297674
},
{
"account_id": "eBqAoNchMLKigC_qZ5EdC",
"action": "onrun",
"created": 1636669297674,
"description": "Captures critical production policies",
"details": [
{
"deny_messages": [
"deployment stage 'example-stage' does not have a HarnessApproval step",
"deployment stage 'example-stage' has step 'run-script' that is forbidden type 'ShellScript'"
],
"output": "{\n \"deny\": [\n \"deployment stage 'deploy' does not have a HarnessApproval step\"\n ],\n \"stages_with_approval\": []\n}",
"policy": {
"account_id": "eBqAoNchMLKigC_qZ5EdC",
"created": 1636669297674,
"identifier": "policy-1",
"name": "Pipeline Approval",
"org_id": "test-org",
"project_id": "test-project",
"rego": "",
"updated": 1636669297674
},
"rego_error": "policy.rego:25: rego_parse_error: non-terminated string m == \"test",
"status": "error"
},
{
"deny_messages": [
"deployment stage 'example-stage' does not have a HarnessApproval step",
"deployment stage 'example-stage' has step 'run-script' that is forbidden type 'ShellScript'"
],
"output": "{\n \"deny\": [\n \"deployment stage 'deploy' does not have a HarnessApproval step\"\n ],\n \"stages_with_approval\": []\n}",
"policy": {
"account_id": "eBqAoNchMLKigC_qZ5EdC",
"created": 1636669297674,
"identifier": "policy-1",
"name": "Pipeline Approval",
"org_id": "test-org",
"project_id": "test-project",
"rego": "",
"updated": 1636669297674
},
"rego_error": "policy.rego:25: rego_parse_error: non-terminated string m == \"test",
"status": "error"
},
{
"deny_messages": [
"deployment stage 'example-stage' does not have a HarnessApproval step",
"deployment stage 'example-stage' has step 'run-script' that is forbidden type 'ShellScript'"
],
"output": "{\n \"deny\": [\n \"deployment stage 'deploy' does not have a HarnessApproval step\"\n ],\n \"stages_with_approval\": []\n}",
"policy": {
"account_id": "eBqAoNchMLKigC_qZ5EdC",
"created": 1636669297674,
"identifier": "policy-1",
"name": "Pipeline Approval",
"org_id": "test-org",
"project_id": "test-project",
"rego": "",
"updated": 1636669297674
},
"rego_error": "policy.rego:25: rego_parse_error: non-terminated string m == \"test",
"status": "error"
},
{
"deny_messages": [
"deployment stage 'example-stage' does not have a HarnessApproval step",
"deployment stage 'example-stage' has step 'run-script' that is forbidden type 'ShellScript'"
],
"output": "{\n \"deny\": [\n \"deployment stage 'deploy' does not have a HarnessApproval step\"\n ],\n \"stages_with_approval\": []\n}",
"policy": {
"account_id": "eBqAoNchMLKigC_qZ5EdC",
"created": 1636669297674,
"identifier": "policy-1",
"name": "Pipeline Approval",
"org_id": "test-org",
"project_id": "test-project",
"rego": "",
"updated": 1636669297674
},
"rego_error": "policy.rego:25: rego_parse_error: non-terminated string m == \"test",
"status": "error"
}
],
"enabled": true,
"identifier": "policyset-1",
"name": "Production Policies",
"org_id": "test-org",
"project_id": "test-project",
"status": "error",
"type": "pipeline",
"updated": 1636669297674
},
{
"account_id": "eBqAoNchMLKigC_qZ5EdC",
"action": "onrun",
"created": 1636669297674,
"description": "Captures critical production policies",
"details": [
{
"deny_messages": [
"deployment stage 'example-stage' does not have a HarnessApproval step",
"deployment stage 'example-stage' has step 'run-script' that is forbidden type 'ShellScript'"
],
"output": "{\n \"deny\": [\n \"deployment stage 'deploy' does not have a HarnessApproval step\"\n ],\n \"stages_with_approval\": []\n}",
"policy": {
"account_id": "eBqAoNchMLKigC_qZ5EdC",
"created": 1636669297674,
"identifier": "policy-1",
"name": "Pipeline Approval",
"org_id": "test-org",
"project_id": "test-project",
"rego": "",
"updated": 1636669297674
},
"rego_error": "policy.rego:25: rego_parse_error: non-terminated string m == \"test",
"status": "error"
},
{
"deny_messages": [
"deployment stage 'example-stage' does not have a HarnessApproval step",
"deployment stage 'example-stage' has step 'run-script' that is forbidden type 'ShellScript'"
],
"output": "{\n \"deny\": [\n \"deployment stage 'deploy' does not have a HarnessApproval step\"\n ],\n \"stages_with_approval\": []\n}",
"policy": {
"account_id": "eBqAoNchMLKigC_qZ5EdC",
"created": 1636669297674,
"identifier": "policy-1",
"name": "Pipeline Approval",
"org_id": "test-org",
"project_id": "test-project",
"rego": "",
"updated": 1636669297674
},
"rego_error": "policy.rego:25: rego_parse_error: non-terminated string m == \"test",
"status": "error"
},
{
"deny_messages": [
"deployment stage 'example-stage' does not have a HarnessApproval step",
"deployment stage 'example-stage' has step 'run-script' that is forbidden type 'ShellScript'"
],
"output": "{\n \"deny\": [\n \"deployment stage 'deploy' does not have a HarnessApproval step\"\n ],\n \"stages_with_approval\": []\n}",
"policy": {
"account_id": "eBqAoNchMLKigC_qZ5EdC",
"created": 1636669297674,
"identifier": "policy-1",
"name": "Pipeline Approval",
"org_id": "test-org",
"project_id": "test-project",
"rego": "",
"updated": 1636669297674
},
"rego_error": "policy.rego:25: rego_parse_error: non-terminated string m == \"test",
"status": "error"
},
{
"deny_messages": [
"deployment stage 'example-stage' does not have a HarnessApproval step",
"deployment stage 'example-stage' has step 'run-script' that is forbidden type 'ShellScript'"
],
"output": "{\n \"deny\": [\n \"deployment stage 'deploy' does not have a HarnessApproval step\"\n ],\n \"stages_with_approval\": []\n}",
"policy": {
"account_id": "eBqAoNchMLKigC_qZ5EdC",
"created": 1636669297674,
"identifier": "policy-1",
"name": "Pipeline Approval",
"org_id": "test-org",
"project_id": "test-project",
"rego": "",
"updated": 1636669297674
},
"rego_error": "policy.rego:25: rego_parse_error: non-terminated string m == \"test",
"status": "error"
}
],
"enabled": true,
"identifier": "policyset-1",
"name": "Production Policies",
"org_id": "test-org",
"project_id": "test-project",
"status": "error",
"type": "pipeline",
"updated": 1636669297674
}
],
"entity": "7bbca5d4-e9f2-4955-9b2a-019ec4d3645e",
"entity_metadata": "7bbca5d4-e9f2-4955-9b2a-019ec4d3645e",
"id": 123,
"input": "",
"org_id": "test-org",
"project_id": "test-project",
"status": "error",
"type": "pipeline,service"
},
"project": "kr",
"repository": "my-repo",
"repository_branch": "main",
"repository_commit": "abc10ed",
"repository_connector": "my-connector",
"repository_path": "playbooks/",
"tags": [
"Perferendis quisquam quasi.",
"Modi quis doloremque ex."
],
"updated": 1627686800,
"vars": "Esse quod consequatur eos voluptate beatae."
}Last updated
Was this helpful?