awx | AWX provides a web-based user interface | Automation library

 by   ansible Python Version: 22.3.0 License: Non-SPDX

kandi X-RAY | awx Summary

kandi X-RAY | awx Summary

awx is a Python library typically used in Automation, Ansible applications. awx has no bugs, it has no vulnerabilities and it has medium support. However awx build file is not available and it has a Non-SPDX License. You can install using 'pip install awx' or download it from GitHub, PyPI.

AWX provides a web-based user interface, REST API, and task engine built on top of Ansible. It is one of the upstream projects for Red Hat Ansible Automation Platform. To install AWX, please view the Install guide. To learn more about using AWX, and Tower, view the Tower docs site.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              awx has a medium active ecosystem.
              It has 12337 star(s) with 3132 fork(s). There are 373 watchers for this library.
              OutlinedDot
              It had no major release in the last 12 months.
              There are 1372 open issues and 6309 have been closed. On average issues are closed in 149 days. There are 113 open pull requests and 0 closed requests.
              It has a neutral sentiment in the developer community.
              The latest version of awx is 22.3.0

            kandi-Quality Quality

              awx has 0 bugs and 0 code smells.

            kandi-Security Security

              awx has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              awx code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              awx has a Non-SPDX License.
              Non-SPDX licenses can be open source with a non SPDX compliant license, or non open source licenses, and you need to review them closely before use.

            kandi-Reuse Reuse

              awx releases are available to install and integrate.
              Deployable package is available in PyPI.
              awx has no build file. You will be need to create the build yourself to build the component from source.

            Top functions reviewed by kandi - BETA

            kandi has reviewed awx and discovered the below as its top functions. This is intended to give you an instant insight into awx implemented functionality, and help decide if they suit your requirements.
            • Make the admin data .
            • Register authentication methods .
            • Rebuild the ancestry list for a role .
            • Update the model with the given pk
            • Collect metrics .
            • Gather analytics .
            • Get field info .
            • Validate survey spec data .
            • Performs an update operation .
            • Validate a PEM encoded PEM file .
            Get all kandi verified functions for this library.

            awx Key Features

            No Key Features are available at this moment for awx.

            awx Examples and Code Snippets

            job_template_survey_spec.md
            Pythondot img1Lines of Code : 97dot img1License : Non-SPDX (NOASSERTION)
            copy iconCopy
            {
                "name": "Simple Survey",
                "description": "Description of the simple survey",
                "spec": [
                    {
                	"type": "text",
                	"question_name": "example question",
                	"question_description": "What is your favorite color?",
                	"variable":  
            More Information
            Pythondot img2Lines of Code : 74dot img2License : Non-SPDX (NOASSERTION)
            copy iconCopy
            {
                "id": 1,
                "type": "o_auth2_application",
                "url": "/api/v2/applications/1/",
                "related": {
                    "user": "/api/v2/users/1/",
                    "tokens": "/api/v2/applications/1/tokens/",
                    "activity_stream": "/api/v2/applications/1/activi  
            Usage manual
            Pythondot img3Lines of Code : 62dot img3License : Non-SPDX (NOASSERTION)
            copy iconCopy
            GET /api/v2/settings/github-team/
            HTTP 200 OK
            Allow: GET, PUT, PATCH, DELETE, HEAD, OPTIONS
            Content-Type: application/json
            Vary: Accept
            X-API-Node: tower
            X-API-Query-Count: 6
            X-API-Query-Time: 0.004s
            X-API-Time: 0.026s
            
            {
                "SOCIAL_AUTH_GITHUB_TEAM  

            Community Discussions

            QUESTION

            How to refer to AWX credentials in my ansible playbook
            Asked 2022-Mar-23 at 10:36

            I'm new to ansible . I'm trying to use an existing playbook but deploy it to a different Azure account with seperate credentials but I'm running into some issues. I created a new credential via the AWX portal with my client_id, tenant_id, subscription_id and secret but I cant figure out how to get my playbook to pull this credential instead of the one its currently using.

            My playbook authentication role authenticates like so

            ...

            ANSWER

            Answered 2022-Mar-23 at 08:30

            Assuming your unencrypted "vault file" in your "secrets folder" looks like this:

            Source https://stackoverflow.com/questions/71570873

            QUESTION

            Ansible Variable Error Deploying Template File
            Asked 2022-Mar-06 at 20:32

            I'm trying to deploy a JSON file as a template and configure the variables for it in a group_var. Here is how I have my ansible structured:

            ...

            ANSWER

            Answered 2022-Mar-06 at 20:32

            So I figured out my own issue. One of the reasons this wasn't working is because the file name I had for the host yaml was different from what I defined in the host file. For example:

            Source https://stackoverflow.com/questions/71365787

            QUESTION

            How can I install galaxy collections in awx?
            Asked 2022-Mar-02 at 13:58

            I use a plugin such as nginx in ansible playbook.

            https://galaxy.ansible.com/nginxinc/nginx_core

            On server I can use cli to install the roles and collections as

            ...

            ANSWER

            Answered 2022-Mar-02 at 13:58

            In addition to @Zeitounator comment, you could also manually install your collection into a dedicated path (i.e into collections folder from awx directory)

            If you use a requirements.yml file :

            Source https://stackoverflow.com/questions/71321536

            QUESTION

            Ansible SSH user change during playbook execution causes freeze
            Asked 2022-Mar-02 at 08:54

            I have a playbook that is launched from AWX with machine credentials, ie. with ssh_user_A. In this playbook, i need to perform a couple of tasks with another SSH user, ie. ssh_user_B.

            In terms of credentials, I have:

            • machine credentials for ssh_user_A that are OK, I can do whatever I need
            • a public/private keys couple for ssh_user_B:
              • the public key is present on the remote host in the ~ssh_user_B/.ssh/authorized_keys file
              • if I test this public/private key with a temp machine credentials (not possible in final target) and a dummy playbook or an ad-hoc module call, it works I can do whatever I need

            I change the SSH user in the playbook with these instructions:

            ...

            ANSWER

            Answered 2022-Mar-02 at 08:54

            I've made a lot of tests and found the problem: by default, to connect to the target hosts, Ansible uses the smart connection plugin. In my case, the smart plugin leads to the use of the native OpenSSH.

            Forcing manually the use of the paramiko connection plugin solves the problem, everything is OK (paramiko is a Python implementation of OpenSSH). Just need to add the instruction connection: paramiko at the needed level:

            Source https://stackoverflow.com/questions/71296805

            QUESTION

            custom job status for awx/ansible tower workflows
            Asked 2022-Feb-04 at 14:41

            AWX/Ansible Tower has it's own REST API service. From the below url structure i can get information about an in progress or finished workflow job:

            ...

            ANSWER

            Answered 2022-Feb-04 at 14:41

            According the Ansible Tower API Reference Guide Workflow Jobs, by Retriving a Workflow Job the status: (choice) can have following values

            Source https://stackoverflow.com/questions/70985758

            QUESTION

            Unable to gather JSON id from an Ansible playbook
            Asked 2022-Jan-28 at 16:40

            I'm facing a problem when trying to get the id of one group in Ansible tower using a playbook and inside the playbook I am using the tower-cli command.

            The problem is that when I get the output of this tower-cli command:

            ...

            ANSWER

            Answered 2022-Jan-28 at 16:35

            This is because group_id.stdout is a string representing a JSON, not a JSON.
            You will have to pass it through the from_json filter.

            Also, you don't need a JMESPath expression and a json_query for such a simple requirement, you can use map for this.

            So, your task should end up being

            Source https://stackoverflow.com/questions/70896929

            QUESTION

            How to change var type to integer?
            Asked 2022-Jan-20 at 14:41

            I am reading from a CSV file, register a variable and loop through the variable's list. It's as easy as below example:

            ...

            ANSWER

            Answered 2022-Jan-20 at 13:07

            The items on the list are strings. For example

            Source https://stackoverflow.com/questions/70785828

            QUESTION

            How to check the OS version of host which in dynamically added to inventory
            Asked 2022-Jan-05 at 11:01

            I'm trying to get server name as user input and if the server OS is RHEL7 it will proceed for further tasks. I'm trying with hostvars but it is not helping, kindly help me to find the OS version with when condition:

            ...

            ANSWER

            Answered 2022-Jan-05 at 11:01

            You need to gather_facts on the newly added host before you consume the variable. As an example, this will do it with automatic facts gathering.

            Source https://stackoverflow.com/questions/70589072

            QUESTION

            Optional Variable Override in Ansible Playbook
            Asked 2021-Dec-23 at 14:39

            I'm using AWX as a task runner to run a variety of Ansible modules. Some of the Ansible modules are third-party modules whose parameters I can't control without forking the module, which is undesirable for a variety of reasons.

            AWX supplies ansible_user as one variable that is used by some of the modules I'm using, and I'm trying to allow a user to some hosts by setting another variable, user_override.

            I first thought to simply add the line ansible_user: "{{ user_override | default(ansible_user) }}" to the task's parameters, which would work... but the modules in question don't accept credentials via parameters. My next thought was to add a vars: entry to the playbook and supply the override there via the same markup as above. This unfortunately results in the error recursive loop detected in template string, which has been the bane of my existence while working through this problem.

            I've also tried using the if/else syntax and intermediate variables, but neither appear to solve this problem.

            How can I achieve this override functionality without forking AWX or the module in question?

            Mods: This is distinct from the pile of questions asking about simple variable defaulting because the existing questions aren't in the context of AWX or can be solved by simply using default() or default(lookup()).

            ...

            ANSWER

            Answered 2021-Dec-23 at 14:39

            At this point, I'm pretty sure that the thing I (the asker) was trying to do is intended to be done by just sometimes setting a value, but some challenging-to-anonymize constraints in our software make that somewhere between challenging and not an option.

            A sideways solution to the particular problem of overriding the user is that AWX sets the username in remote_user as well as ansible_user, which is then used by networkcli. So you can use the line `remote_user: "{{ override_user | default(ansible_user) }}". This doesn't help generally, but does answer the question.

            Source https://stackoverflow.com/questions/70442435

            QUESTION

            AWX all jobs stop processing and hang indefinitely -- why
            Asked 2021-Dec-21 at 14:42
            Problem

            We've had a working Ansible AWX instance running on v5.0.0 for over a year, and suddenly all jobs stop working -- no output is rendered. They will start "running" but hang indefinitely without printing out any logging.

            The AWX instance is running in a docker compose container setup as defined here: https://github.com/ansible/awx/blob/5.0.0/INSTALL.md#docker-compose

            Observations

            Standard troubleshooting such as restarting of containers, host OS, etc. hasn't helped. No configuration changes in either environment.

            Upon debugging an actual playbook command, we observe that the command to run a playbook from the UI is like the below:

            ssh-agent sh -c ssh-add /tmp/awx_11021_0fmwm5uz/artifacts/11021/ssh_key_data && rm -f /tmp/awx_11021_0fmwm5uz/artifacts/11021/ssh_key_data && ansible-playbook -vvvvv -u ubuntu --become --ask-vault-pass -i /tmp/awx_11021_0fmwm5uz/tmppo7rcdqn -e @/tmp/awx_11021_0fmwm5uz/env/extravars playbook.yml

            That's broken down into three commands in sequence:

            1. ssh-agent sh -c ssh-add /tmp/awx_11021_0fmwm5uz/artifacts/11021/ssh_key_data
            2. rm -f /tmp/awx_11021_0fmwm5uz/artifacts/11021/ssh_key_data
            3. ansible-playbook -vvvvv -u ubuntu --become --ask-vault-pass -i /tmp/awx_11021_0fmwm5uz/tmppo7rcdqn -e @/tmp/awx_11021_0fmwm5uz/env/extravars playbook.yml

            You can see in part 3, the -vvvvv is the debugging argument -- however, the hang is happening on command #1. Which has nothing to do with ansible or AWX specifically, but it's not going to get us much debugging info.

            I tried doing an strace to see what is going on, but for reasons given below, it is pretty difficult to follow what it is actually hanging on. I can provide this output if it might help.

            Analysis

            So one natural question with command #1 -- what is 'ssh_key_data'?

            Well it's what we set up to be the Machine credential in AWX (an SSH key) -- it hasn't changed in a while and it works just fine when used in a direct SSH command. It's also apparently being set up by AWX as a file pipe:

            prw------- 1 root root 0 Dec 10 08:29 ssh_key_data

            Which starts to explain why it could be potentially hanging (if nothing is being read in from the other side of the pipe).

            Running a normal ansible-playbook from command line (and supplying the SSH key in a more normal way) works just fine, so we can still deploy, but only via CLI right now -- it's just AWX that is broken.

            Conclusions

            So the question then becomes "why now"? And "how to debug"? I have checked the health of awx_postgres, and verified that indeed the Machine credential is present in an expected format (in the main_credential table). I have also verified that can use ssh-agent on the awx_task container without the use of that pipe keyfile. So it really seems to be this piped file that is the problem -- but I haven't been able to glean from any logs where the other side of the pipe (sender) is supposed to be or why they aren't sending the data.

            ...

            ANSWER

            Answered 2021-Dec-13 at 04:21

            Had the same issue starting this Friday in the same timeframe as you. Turned out that Crowdstrike (falcon sensor) Agent was the culprit. I'm guessing they pushed a definition update that is breaking or blocking fifo pipes. When we stopped the CS agent, AWX started working correctly again, with no issues. See if you are running a similar security product.

            Source https://stackoverflow.com/questions/70320452

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install awx

            You can install using 'pip install awx' or download it from GitHub, PyPI.
            You can use awx like any standard Python library. You will need to make sure that you have a development environment consisting of a Python distribution including header files, a compiler, pip, and git installed. Make sure that your pip, setuptools, and wheel are up to date. When using pip it is generally recommended to install packages in a virtual environment to avoid changes to the system.

            Support

            Refer to the Contributing guide to get started developing, testing, and building AWX.All code submissions are made through pull requests against the devel branch.All contributors must use git commit --signoff for any commit to be merged and agree that usage of --signoff constitutes agreement with the terms of DCO 1.1Take care to make sure no merge commits are in the submission, and use git rebase vs. git merge for this reason.If submitting a large code change, it's a good idea to join the #ansible-awx channel on web.libera.chat and talk about what you would like to do or add first. This not only helps everyone know what's going on, but it also helps save time and effort if the community decides some changes are needed.
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/ansible/awx.git

          • CLI

            gh repo clone ansible/awx

          • sshUrl

            git@github.com:ansible/awx.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link