30121 Commits

Author SHA1 Message Date
Jeff Bradberry
6c1ba03235
Remove EE from the workflow job template collection module 2021-06-16 15:41:09 -04:00
Jeff Bradberry
85bb4e976f
Execution environments are meaningless for workflows
so, remove them from the API endpoints for workflows.  Also, tear out
the WFJT.execution_environment step in the resolver.  If we want that
to be a thing, it ought to be a .default_environment instead.
2021-06-16 15:41:09 -04:00
Shane McDonald
d1d3711fee
Add yamllint to dev dependencies 2021-06-16 15:41:09 -04:00
Shane McDonald
d671366cad
Add flake8 back to requirements_dev.txt 2021-06-16 15:41:08 -04:00
Shane McDonald
f9043864ce
Create make target for api linter tasks 2021-06-16 15:41:08 -04:00
nixocio
a1ded8db3f
Linkify credentials on JobTemplate and Organization Details
Linkify credentials on JobTemplate and Organization Details.

See: https://github.com/ansible/awx/issues/385
2021-06-16 15:41:08 -04:00
Alex Corey
cf6b6d831f
adds visualizer button to output toolbar 2021-06-16 15:41:08 -04:00
Alex Corey
736cd4df36
refetches smart inventory after edit save 2021-06-16 15:41:08 -04:00
nixocio
8d99f79de4
Hide Edit button for non system admin
Hide Edit button for non system admin

See: https://github.com/ansible/tower/issues/5032
2021-06-16 15:41:08 -04:00
Alex Corey
1c70773cc2
shows user type fields only for sys admins 2021-06-16 15:41:07 -04:00
mabashian
c76a7d638f
Removes tooltip from user in page toolbar 2021-06-16 15:41:07 -04:00
mabashian
7a455d08d7
Change Options to Enabled Options in various details views 2021-06-16 15:41:07 -04:00
nixocio
2c5bcf268d
Update UI to reflect new API EE changes
* Show resolved EE for job template details.
* Do not show EE if a certain job status still running, since EE on the
API is not set yet. It was causing the bug to temporarily show `missing
resource`.
* Fix discrepancy about job types for list and details.

See: https://github.com/ansible/awx/issues/10327
Also: https://github.com/ansible/awx/issues/10399
2021-06-16 15:41:07 -04:00
mabashian
32cee852f0
Swap underscore for hyphen 2021-06-16 15:41:07 -04:00
mabashian
8c1cd9ee71
Fixes bug where source list page would crash if first sync was running 2021-06-16 15:41:07 -04:00
Alex Corey
da951714d1
resolves iinfinite loop 2021-06-16 15:41:07 -04:00
Alan Rominger
2309feb6bd
Make ExecutionEnvironment awxkit class able to handle null values in payload 2021-06-16 15:41:06 -04:00
nixocio
4d2c64ebb4
Add RBAC rules to the side-nav
Add RBAC rules to the side-nav

System Admin
System Auditor
Org Admin
Notification Admin
Execution Environment Admin
Normal User

Those are the user profiles taken in consideration when displaying the
side-nav.

See: https://github.com/ansible/awx/issues/4426
2021-06-16 15:37:25 -04:00
nixocio
04f6fe6cd2
Disable inventory field when editing host
Disable inventory field when editing host

See: https://github.com/ansible/awx/issues/10229
2021-06-16 15:37:25 -04:00
Bill Nottingham
372baa12a5
Update runner version. 2021-06-16 15:37:25 -04:00
mabashian
21e6e5701e
Addresses bug where advanced search by groups wasn't working on host list 2021-06-16 15:37:25 -04:00
Alex Corey
276a18b339
fixes next button and internationalizes nav buttons on wizard 2021-06-16 15:37:25 -04:00
mabashian
666acb9756
Extract strings 2021-06-16 15:37:25 -04:00
mabashian
0eff3e6bac
Pull brand name from default.strings.json 2021-06-16 15:37:24 -04:00
mabashian
9af16c18c9
Dont reconnect job output socket if it closes cleanly 2021-06-16 15:37:24 -04:00
Elijah DeLee
f0bcfc6024
add EE information to assert_status
This should help debugging to know what the EE was when an unexpected
status was found.
2021-06-16 15:37:24 -04:00
Elijah DeLee
d946103961
log perf of requests at debug level 2021-06-16 15:37:24 -04:00
softwarefactory-project-zuul[bot]
b10eb6f4c2
Merge pull request #10382 from AlanCoding/downstream_waterslide
Handle inventory types where Automation Hub collection names differ

Some collections will be moving, which is #10323
Yet, other collections will change name, which this is intended to address.

Reviewed-by: Alan Rominger <arominge@redhat.com>
Reviewed-by: Sarabraj Singh <singh.sarabraj@gmail.com>
Reviewed-by: Elijah DeLee <kdelee@redhat.com>
2021-06-16 18:15:08 +00:00
Alan Rominger
21aa1fc11f
Handle inventory types where Automation Hub collection names differ
Move imports added by Bill to be in-line, because utils should not import models at top

Remove more get_licenser inline imports
2021-06-16 13:39:52 -04:00
softwarefactory-project-zuul[bot]
d4a3143b0e
Merge pull request #10456 from jbradberry/danger-danger-will-robinson
Remove isolated instances and groups

SUMMARY
before we remove the fields that allow us to correctly identify them.
ISSUE TYPE

Bugfix Pull Request

COMPONENT NAME

API

Reviewed-by: Alan Rominger <arominge@redhat.com>
Reviewed-by: Jeff Bradberry <None>
Reviewed-by: Chris Meyers <None>
2021-06-16 15:30:48 +00:00
softwarefactory-project-zuul[bot]
b92c5076a2
Merge pull request #10446 from fosterseth/fix_a10431_validate_ee_image_field
Add validation for EE image field name

related #10431
SUMMARY

Adds validation for the EE image name

ISSUE TYPE


Bugfix Pull Request

COMPONENT NAME


API

AWX VERSION

awx: 19.2.1

Reviewed-by: Seth Foster <None>
Reviewed-by: Alan Rominger <arominge@redhat.com>
Reviewed-by: Bianca Henderson <beeankha@gmail.com>
Reviewed-by: Rebeccah Hunter <rhunter@redhat.com>
Reviewed-by: Jeff Bradberry <None>
2021-06-16 14:34:45 +00:00
Seth Foster
61846e88ca
Add validator for ee image field name
awxkit default ee image name is now a fixed valid (but bogus) name, rather than random unicode
2021-06-15 20:06:49 -04:00
Jeff Bradberry
93e90228a2 Remove isolated instances and groups
before we remove the fields that allow us to correctly identify them.
2021-06-15 17:36:26 -04:00
softwarefactory-project-zuul[bot]
395af1b5e4
Merge pull request #10425 from sarabrajsingh/bugfix/preflight-check-postgres-version-4940
introduced a pre-flight check for postgres 12

SUMMARY


Introduced a pre-flight check to check the version of Postgres 12 before the application starts - ansible/tower#4940
ISSUE TYPE


Bugfix Pull Request

COMPONENT NAME


API

AWX VERSION

awx: 19.2.0

Reviewed-by: Alan Rominger <arominge@redhat.com>
Reviewed-by: Sarabraj Singh <singh.sarabraj@gmail.com>
Reviewed-by: Christian Adams <rooftopcellist@gmail.com>
Reviewed-by: Shane McDonald <me@shanemcd.com>
2021-06-15 13:46:58 +00:00
softwarefactory-project-zuul[bot]
5d7bdb3cbc
Merge pull request #10449 from mscherer/patch-1
Update irc server

SUMMARY

See ansible/community#613

ISSUE TYPE


Docs Pull Request

COMPONENT NAME


Doc

Reviewed-by: Shane McDonald <me@shanemcd.com>
2021-06-15 11:18:12 +00:00
mscherer
95d40f037d
Update irc server
See https://github.com/ansible/community/issues/613
2021-06-15 10:19:40 +02:00
softwarefactory-project-zuul[bot]
ef67f9c65d
Merge pull request #10436 from AlanCoding/installed_default
Prefer installer defaults over user-defined global EEs

The installer knows better than the user

Reviewed-by: Jeff Bradberry <None>
Reviewed-by: Bianca Henderson <beeankha@gmail.com>
Reviewed-by: Elijah DeLee <kdelee@redhat.com>
2021-06-15 00:59:06 +00:00
softwarefactory-project-zuul[bot]
8a4421dc0c
Merge pull request #10290 from amigus/dsv
Add Thycotic DevOps Secrets Vault support

SUMMARY
Add a Credential Plugin for Thycotic DevOps Secrets Vault
ISSUE TYPE

Feature Pull Request

COMPONENT NAME

API
UI

AWX VERSION
awx: 19.1.0

Reviewed-by: Shane McDonald <me@shanemcd.com>
Reviewed-by: Adam C. Migus <adam@migus.org>
Reviewed-by: Matthew Jones <bsdmatburt@gmail.com>
2021-06-14 19:22:59 +00:00
softwarefactory-project-zuul[bot]
2900bbbbd8
Merge pull request #10441 from shanemcd/bump-19.2.1
AWX 19.2.1

Reviewed-by: Jeff Bradberry <None>
Reviewed-by: Shane McDonald <me@shanemcd.com>
Reviewed-by: Jake McDermott <yo@jakemcdermott.me>
Reviewed-by: Bianca Henderson <beeankha@gmail.com>
2021-06-14 19:05:42 +00:00
softwarefactory-project-zuul[bot]
a6c09daf1e
Merge pull request #10414 from sean-m-sullivan/devel
Add Job data to return on wait failures

SUMMARY
This adds the returned results to the returned data when jobs fail when waited on. This brings it inline with information returned on success.
ISSUE TYPE

Feature Pull Request

COMPONENT NAME

awx collection

AWX VERSION
19.2.0

ADDITIONAL INFORMATION
before:
{
  "changed": false,
  "elapsed": 3.806,
  "finished": "2021-06-10T15:24:52.861344Z",
  "id": 153,
  "msg": "The Workflow Node - fail, failed",
  "started": "2021-06-10T15:24:49.055652Z",
  "status": "failed"
}
after:
{
  "changed": false,
  "elapsed": 3.806,
  "finished": "2021-06-10T15:24:52.861344Z",
  "id": 153,
  "job_data": {
    "allow_simultaneous": false,
    "artifacts": {
      "test": "fail"
    },
    "canceled_on": null,
    "controller_node": "",
    "created": "2021-06-10T15:24:48.504122Z",
    "custom_virtualenv": "/var/lib/awx/venv/ansible",
    "description": "",
    "diff_mode": false,
    "elapsed": 3.806,
    "event_processing_finished": true,
    "execution_node": "localhost",
    "extra_vars": "{\"fail\": \"workflow\"}",
    "failed": true,
    "finished": "2021-06-10T15:24:52.861344Z",
    "force_handlers": false,
    "forks": 0,
    "host_status_counts": {
      "failures": 1
    },
    "id": 153,
    "instance_group": 1,
    "inventory": 1,
    "job_args": "[\"bwrap\", \"--die-with-parent\", \"--unshare-pid\", \"--dev-bind\", \"/\", \"/\", \"--proc\", \"/proc\", \"--bind\", \"/tmp/bwrap_153_uqo3h55g/ansible_runner_pi_uai8yldi/tmp5wid0rwm\", \"/etc/ssh\", \"--bind\", \"/tmp/bwrap_153_uqo3h55g/ansible_runner_pi_uai8yldi/tmp5wmz8ule\", \"/etc/tower\", \"--bind\", \"/tmp/bwrap_153_uqo3h55g/ansible_runner_pi_uai8yldi/tmp4akvmhfo\", \"/home\", \"--bind\", \"/tmp/bwrap_153_uqo3h55g/ansible_runner_pi_uai8yldi/tmplpgjkbaw\", \"/tmp\", \"--bind\", \"/tmp/bwrap_153_uqo3h55g/ansible_runner_pi_uai8yldi/tmpgrdxeea3\", \"/var/lib/awx\", \"--bind\", \"/tmp/bwrap_153_uqo3h55g/ansible_runner_pi_uai8yldi/tmp2hidif23\", \"/var/lib/awx/job_status\", \"--bind\", \"/tmp/bwrap_153_uqo3h55g/ansible_runner_pi_uai8yldi/tmps2sv03e3\", \"/var/lib/awx/projects\", \"--bind\", \"/tmp/bwrap_153_uqo3h55g/ansible_runner_pi_uai8yldi/tmpoqb_xxh7\", \"/var/log\", \"--bind\", \"/tmp/bwrap_153_uqo3h55g/ansible_runner_pi_uai8yldi/tmpyjok4bi3\", \"/var/tmp\", \"--ro-bind\", \"/var/lib/awx/venv/ansible\", \"/var/lib/awx/venv/ansible\", \"--ro-bind\", \"/var/lib/awx/venv/awx\", \"/var/lib/awx/venv/awx\", \"--bind\", \"/tmp/bwrap_153_uqo3h55g/awx_153_rvlvv4nm\", \"/tmp/bwrap_153_uqo3h55g/awx_153_rvlvv4nm\", \"--chdir\", \"/tmp/bwrap_153_uqo3h55g/awx_153_rvlvv4nm/project\", \"ssh-agent\", \"sh\", \"-c\", \"ssh-add /tmp/bwrap_153_uqo3h55g/awx_153_rvlvv4nm/artifacts/153/ssh_key_data && rm -f /tmp/bwrap_153_uqo3h55g/awx_153_rvlvv4nm/artifacts/153/ssh_key_data && ansible-playbook -u excalibrax --ask-pass -i /tmp/bwrap_153_uqo3h55g/awx_153_rvlvv4nm/tmp93bq8ck1 -e @/tmp/bwrap_153_uqo3h55g/awx_153_rvlvv4nm/env/extravars fail.yml\"]",
    "job_cwd": "/tmp/bwrap_153_uqo3h55g/awx_153_rvlvv4nm/project",
    "job_env": {
      "ANSIBLE_CALLBACK_PLUGINS": "/var/lib/awx/venv/awx/lib64/python3.6/site-packages/ansible_runner/callbacks",
      "ANSIBLE_COLLECTIONS_PATHS": "/tmp/bwrap_153_uqo3h55g/awx_153_rvlvv4nm/requirements_collections:~/.ansible/collections:/usr/share/ansible/collections",
      "ANSIBLE_FORCE_COLOR": "True",
      "ANSIBLE_HOST_KEY_CHECKING": "False",
      "ANSIBLE_INVENTORY_UNPARSED_FAILED": "True",
      "ANSIBLE_PARAMIKO_RECORD_HOST_KEYS": "False",
      "ANSIBLE_RETRY_FILES_ENABLED": "False",
      "ANSIBLE_ROLES_PATH": "/tmp/bwrap_153_uqo3h55g/awx_153_rvlvv4nm/requirements_roles:~/.ansible/roles:/usr/share/ansible/roles:/etc/ansible/roles",
      "ANSIBLE_SSH_CONTROL_PATH_DIR": "/tmp/bwrap_153_uqo3h55g/awx_153_rvlvv4nm/cp",
      "ANSIBLE_STDOUT_CALLBACK": "awx_display",
      "ANSIBLE_VENV_PATH": "/var/lib/awx/venv/ansible",
      "AWX_HOST": "https://10.42.42.212",
      "AWX_ISOLATED_DATA_DIR": "/tmp/bwrap_153_uqo3h55g/awx_153_rvlvv4nm/artifacts/153",
      "AWX_PRIVATE_DATA_DIR": "/tmp/bwrap_153_uqo3h55g/awx_153_rvlvv4nm",
      "DJANGO_LIVE_TEST_SERVER_ADDRESS": "localhost:9013-9199",
      "DJANGO_SETTINGS_MODULE": "awx.settings.production",
      "HOME": "/var/lib/awx",
      "INVENTORY_ID": "1",
      "INVOCATION_ID": "6dfbb88bc6484622a4f44ffbc1196b44",
      "JOB_ID": "153",
      "JOURNAL_STREAM": "9:24634",
      "LANG": "en_US.UTF-8",
      "MAX_EVENT_RES": "700000",
      "PATH": "/var/lib/awx/venv/ansible/bin:/var/lib/awx/venv/awx/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin",
      "PROJECT_REVISION": "debeb7bd98d23a5d69103f024280ac5f8927d58a",
      "PROOT_TMP_DIR": "/tmp",
      "PS1": "(awx) ",
      "PWD": "/var/lib/awx",
      "PYTHONPATH": "/var/lib/awx/venv/ansible/lib/python3.6/site-packages:",
      "RUNNER_OMIT_EVENTS": "False",
      "RUNNER_ONLY_FAILED_EVENTS": "False",
      "SHLVL": "0",
      "SUPERVISOR_ENABLED": "1",
      "SUPERVISOR_GROUP_NAME": "tower-processes",
      "SUPERVISOR_PROCESS_NAME": "awx-dispatcher",
      "SUPERVISOR_SERVER_URL": "unix:///var/run/supervisor/supervisor.sock",
      "TZ": "UTC",
      "USER": "awx",
      "VIRTUAL_ENV": "/var/lib/awx/venv/ansible"
    },
    "job_explanation": "",
    "job_slice_count": 1,
    "job_slice_number": 0,
    "job_tags": "",
    "job_template": 14,
    "job_type": "run",
    "launch_type": "workflow",
    "limit": "",
    "modified": "2021-06-10T15:24:48.953892Z",
    "name": "fail",
    "organization": 1,
    "passwords_needed_to_start": [
      
    ],
    "playbook": "fail.yml",
    "playbook_counts": {
      "play_count": 1,
      "task_count": 3
    },
    "project": 13,
    "related": {
      "activity_stream": "/api/v2/jobs/153/activity_stream/",
      "cancel": "/api/v2/jobs/153/cancel/",
      "create_schedule": "/api/v2/jobs/153/create_schedule/",
      "created_by": "/api/v2/users/1/",
      "credentials": "/api/v2/jobs/153/credentials/",
      "inventory": "/api/v2/inventories/1/",
      "job_events": "/api/v2/jobs/153/job_events/",
      "job_host_summaries": "/api/v2/jobs/153/job_host_summaries/",
      "job_template": "/api/v2/job_templates/14/",
      "labels": "/api/v2/jobs/153/labels/",
      "notifications": "/api/v2/jobs/153/notifications/",
      "organization": "/api/v2/organizations/1/",
      "project": "/api/v2/projects/13/",
      "relaunch": "/api/v2/jobs/153/relaunch/",
      "source_workflow_job": "/api/v2/workflow_jobs/152/",
      "stdout": "/api/v2/jobs/153/stdout/",
      "unified_job_template": "/api/v2/job_templates/14/"
    },
    "result_traceback": "",
    "scm_branch": "",
    "scm_revision": "debeb7bd98d23a5d69103f024280ac5f8927d58a",
    "skip_tags": "",
    "start_at_task": "",
    "started": "2021-06-10T15:24:49.055652Z",
    "status": "failed",
    "summary_fields": {
      "created_by": {
        "first_name": "",
        "id": 1,
        "last_name": "",
        "username": "admin"
      },
      "credentials": [
        {
          "cloud": false,
          "description": "",
          "id": 1,
          "kind": "ssh",
          "name": "Demo Credential"
        }
      ],
      "instance_group": {
        "id": 1,
        "is_containerized": false,
        "name": "tower"
      },
      "inventory": {
        "description": "",
        "has_active_failures": true,
        "has_inventory_sources": false,
        "hosts_with_active_failures": 1,
        "id": 1,
        "inventory_sources_with_failures": 0,
        "kind": "",
        "name": "Demo Inventory",
        "organization_id": 1,
        "total_groups": 0,
        "total_hosts": 1,
        "total_inventory_sources": 0
      },
      "job_template": {
        "description": "",
        "id": 14,
        "name": "fail"
      },
      "labels": {
        "count": 0,
        "results": [
          
        ]
      },
      "organization": {
        "description": "",
        "id": 1,
        "name": "Default"
      },
      "project": {
        "description": "",
        "id": 13,
        "name": "fail",
        "scm_type": "git",
        "status": "successful"
      },
      "source_workflow_job": {
        "description": "",
        "elapsed": 4.89,
        "failed": true,
        "id": 152,
        "name": "fail_workflow",
        "status": "failed"
      },
      "unified_job_template": {
        "description": "",
        "id": 14,
        "name": "fail",
        "unified_job_type": "job"
      },
      "user_capabilities": {
        "delete": true,
        "start": true
      }
    },
    "timeout": 0,
    "type": "job",
    "unified_job_template": 14,
    "url": "/api/v2/jobs/153/",
    "use_fact_cache": false,
    "verbosity": 0,
    "webhook_credential": null,
    "webhook_guid": "",
    "webhook_service": ""
  },
  "msg": "The Workflow Node - fail, failed",
  "started": "2021-06-10T15:24:49.055652Z",
  "status": "failed"
}

Reviewed-by: Bianca Henderson <beeankha@gmail.com>
2021-06-14 18:58:38 +00:00
Alan Rominger
92c6ddf13c
Prefer installer defaults over user-defined global EEs
Add a basic level of testing around get_default_execution_environment
2021-06-14 14:13:39 -04:00
Jake McDermott
c6ac2f56dc
Update CHANGELOG.md 2021-06-14 14:09:53 -04:00
Sarabraj Singh
7a130a0616
flipped MODE switch for postgres check 2021-06-14 13:55:11 -04:00
Shane McDonald
188f0417d2
Fix typo 2021-06-14 13:38:41 -04:00
Shane McDonald
d38401fd18
Bump version to 19.2.1 2021-06-14 12:32:20 -04:00
Shane McDonald
dadf8940cc
Remove outdated info from changelog 2021-06-14 12:32:10 -04:00
softwarefactory-project-zuul[bot]
6a36f802c2
Merge pull request #10434 from wenottingham/runner-update
Update runner to 2.0b1

SUMMARY
Newly released.

Reviewed-by: Elijah DeLee <kdelee@redhat.com>
2021-06-12 04:26:17 +00:00
Adam Migus
5509686f5b Remove unused imports to fix build. 2021-06-11 23:49:45 -04:00
Adam Migus
1ee241199e Refactor to simplify
- Remove eval and the expression metadata attribute
- Remove locale conditional on the tld field
2021-06-11 23:49:45 -04:00
Adam Migus
67d828cf80 Backout accidential changes to settings/defaults 2021-06-11 23:49:45 -04:00