newrelic / ansible-install

Building installation support for our customers are using ansible to manage their infrastructure and services at scale
Apache License 2.0
8 stars 6 forks source link

Assertion fails when using 'apache' as target #78

Closed crispy-computing-robot closed 3 months ago

crispy-computing-robot commented 4 months ago

Description

Trying to add the target 'apache' results in an 'assertion failed' status with Ansible. Downloaded the latest new relic install from galaxy today, not sure where to find the version I have.

Steps to Reproduce

- name: Install New Relic infrastructure and logs
   hosts: all
   roles:
   - role: newrelic.newrelic_install
   vars:
     targets:
       - infrastructure
       - logs
       - apache
   environment:
     NEW_RELIC_API_KEY: "{{ lookup('env', 'NEWRELIC_API_KEY') }}"
     NEW_RELIC_ACCOUNT_ID: "{{ lookup('env', 'NEWRELIC_ACCOUNT_NUMBER') }}"
     NEW_RELIC_REGION: US

Expected Behavior

It should enable apm for apache.

Relevant Logs / Console output

failed: [controller.do.iot4.net] (item=apache) => {"ansible_loop_var": "item", "assertion": "target_name_map[item] is defined", "changed": false, "evaluated_to": false, "item": "apache", "msg": "Assertion failed"}

Your Environment

ansible [core 2.15.9]
  config file = /home/vchokshi/ccm/apps/ubernetes/ansible/ansible.cfg
  configured module search path = ['/home/vchokshi/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /home/vchokshi/.venvs/dev/lib/python3.9/site-packages/ansible
  ansible collection location = /home/vchokshi/.ansible/collections:/usr/share/ansible/collections
  executable location = /home/vchokshi/.venvs/dev/bin/ansible
  python version = 3.9.2 (default, Feb 28 2021, 17:03:44) [GCC 10.2.1 20210110] (/home/vchokshi/.venvs/dev/bin/python3)
  jinja version = 3.1.3
  libyaml = True

Additional context

This works when 'apache' is removed as one the third target.

crispy-computing-robot commented 3 months ago

Sorry. this was an error opening. The latest version 0.7.1 works fine.

crispy-computing-robot commented 3 months ago

Not a bug.