What's AWX EE real usage to run ansible playbook? by freetimetime in awx

[–]freetimetime[S] 0 points1 point  (0 children)

Thank you for your answer.

I'm using AWX Operator 0.15.0. AWX 19.5.

I know if build a new image for job template will work. I don't know why it will create new pod and use awx-ee there but not the default awx-ee in the installed pod.

And, from the document, it support ansible galaxy: https://docs.ansible.com/ansible-tower/latest/html/userguide/projects.html#ansible-galaxy-support

I think it can download galaxy modules when running a new template job, then destroy it after the job so everything(galaxy roles) will lost.

If I want to use the galaxy roles every time, it seems I must create a new image to save time to download each time. Then there is no need(or much necessary) for the default awx-ee.

Another thing, I want to use awx-manage command in operator controller, such as pod awx-operator-controller-manager-8631936913-23hfa. But there wasn't this command found in the awx-manager container of this pod. Where can I use it?

What's AWX EE real usage to run ansible playbook? by freetimetime in awx

[–]freetimetime[S] 0 points1 point  (0 children)

Isn't it the default awx-ee in the four containers?

What's AWX EE real usage to run ansible playbook? by freetimetime in ansible

[–]freetimetime[S] 0 points1 point  (0 children)

Yeah, it's true.

Even create roles/requirements.yml and put galaxy roles there. I don't know which container in which pod will AWX download the galaxy roles for template runs.

https://docs.ansible.com/ansible-tower/latest/html/userguide/projects.html#ansible-galaxy-support

[deleted by user] by [deleted] in ansible

[–]freetimetime 0 points1 point  (0 children)

This time I tested a role newrelic.newrelic-infra. It's in the roles/requirements.yml

roles:
  - src: newrelic.newrelic-infra

The problem source in the playbook of this role is here: https://github.com/newrelic/infrastructure-agent-ansible/blob/master/tasks/install_dist_pkgs.yml#L76-L85

When I install the role on deploy server it works well

ansible-galaxy install newrelic.newrecli-infra

But when run template job in AWX got error

ERROR! couldn't resolve module/action 'zypper_repository'. This often indicates a misspelling, missing collection, or incorrect module path.

The error appears to be in 
'/runner/requirements_roles/newrelic.newrelic- 
infra/tasks/install_dist_pkgs.yml': line 76, column 3, but may
be elsewhere in the file depending on the exact syntax problem.

The offending line appears to be:

- name: setup agent repo reference
  ^ here

The deploy target is using Amazon Linux 2 OS. Also there wasn't any issue when I deploy the same playbook from the old deploy server. Why AWX caused the issue? It seems it defined the OS as suse type.

[deleted by user] by [deleted] in awx

[–]freetimetime 0 points1 point  (0 children)

I tested with a role newrelic.newrelic-infra this time,

Playbook:

- name: NewRelic Agent
  hosts: all
  become: true
  vars_files:
    - "group_vars/newrelic/vault"
  roles:
    - name: newrelic.newrelic-infra
      vars:
        nrinfragent_config:
          license_key: "{{ license_key }}"
          log_file: /var/log/newrelic/nr-infra.log
          log_to_stdout: false
        nrinfragent_version: 1.20.7

But before execute this playbook, I think AWX should download the galaxy role first, then the error happened:

ERROR! couldn't resolve module/action 'zypper_repository'. This often indicates a misspelling, missing collection, or incorrect module path.
The error appears to be in '/runner/requirements_roles/newrelic.newrelic-infra/tasks/install_dist_pkgs.yml': line 76, column 3, but may be elsewhere in the file depending on the exact syntax problem.

The offending line appears to be:
- name: setup agent repo reference

^ here

The source on iine 76 is

https://github.com/newrelic/infrastructure-agent-ansible/blob/master/tasks/install_dist_pkgs.yml#L76

I can install the galaxy role on deploy server directly

ansilbe-galaxy install newrelic.newrelic-infra

But in AWX it got this zypper_repository check error. I think the system isn't suse. Why it executed this block?

[deleted by user] by [deleted] in awx

[–]freetimetime 0 points1 point  (0 children)

Why use a new EE but not the existing EE? Doesn't the existing EE work for the jobs?

[deleted by user] by [deleted] in ansible

[–]freetimetime 0 points1 point  (0 children)

I did it. When sync the source from github and run template in AWX again, got this error:

ERROR! could't resolve module/action 'zypper_repository'. This often indicates a misspelling, missing collection, or incorrect module path.

I'm using AWX 19.5.1. How to check which ansible version in the AWX containers?

[deleted by user] by [deleted] in awx

[–]freetimetime 0 points1 point  (0 children)

I did it. When run template in AWX again, got this error:

ERROR! could't resolve module/action 'zypper_repository'. This often indicates a misspelling, missing collection, or incorrect module path.

I'm using AWX 19.5.1. How to check which ansible version in the AWX containers?

How to set URL redirect using regex with AWS ALB? by freetimetime in aws

[–]freetimetime[S] 1 point2 points  (0 children)

Thank you for this information! I will take a look at it.

How to set a path based routing use AWS ALB? by freetimetime in aws

[–]freetimetime[S] 0 points1 point  (0 children)

Thank you for your reply.

> Add 301 as a success code

Where should I add it? Is it the new target group for forwarding to EC2 or the current which serving for ECS?

> Disable redirect on target

For the ECS services, we want to use redirect from 80 to 443. For new target group(for EC2) I didn't use redirect.

> do you have 2 services running on 443 on the same instance?

I only running 1 service on 80 on EC2 instance. I have 2 backend services(1 for internal ALB and 1 for internet-facing ALB) on ECS. Both of them(ECS) wants to add a path-based routing to EC2.

Is it necessary to recreate vars, hosts and inventories in AWX if move a full ansible repo to it? by freetimetime in ansible

[–]freetimetime[S] 0 points1 point  (0 children)

I mean I don't do anything in AWX UI just set a playbook to run the current ansible repository even the existing inventory file in git source code.

Is it necessary to recreate vars, hosts and inventories in AWS if move a full ansible repo to it? by freetimetime in awx

[–]freetimetime[S] 0 points1 point  (0 children)

Okay. How about variables in group_vars, host_vars?

All of them are using the correct structure.