Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 13 additions & 8 deletions recipes/newrelic/apm/php/redhat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -351,20 +351,25 @@ install:

vars:
AGENT_VERSION: "9.17.1.301"

install_rpm:
cmds:
- |
echo -e "{{.ARROW}}Adding the New Relic PHP Agent repository{{.GRAY}}"
# The repo install command returns a non-zero return code if it is already installed
# Only attempt an install if it is needed
if rpm -q newrelic-repo-5-3.noarch > /dev/null; then
echo -e "The New Relic repository is already installed."
# Skip this task if the host machine is Amazon Linux 2023
if grep -q "Amazon Linux release 2023" /etc/system-release; then
echo -e "Skipping repository installation on Amazon Linux 2023. The RPM method is not supported on this version."
else
echo -e "Adding the New Relic PHP Agent repository."
sudo rpm -Uvh http://yum.newrelic.com/pub/newrelic/el5/x86_64/newrelic-repo-5-3.noarch.rpm
# The repo install command returns a non-zero return code if it is already installed
# Only attempt an install if it is needed
if rpm -q newrelic-repo-5-3.noarch > /dev/null; then
echo -e "The New Relic repository is already installed."
else
echo -e "Adding the New Relic PHP Agent repository."
sudo rpm -Uvh http://yum.newrelic.com/pub/newrelic/el5/x86_64/newrelic-repo-5-3.noarch.rpm
fi
sudo yum install -y newrelic-php5
fi
sudo yum install -y newrelic-php5

configure:
cmds:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,11 @@
- "../templates/*"
become: true

- name: Install dependencies from requirements.txt
ansible.builtin.pip:
requirements: /home/ec2-user/requirements.txt
umask: "0022"
- name: Ensure pip is installed
ansible.builtin.command: python3 -m ensurepip --upgrade
become: true

- name: Install dependencies from requirements.txt
ansible.builtin.command: python3 -m pip install --user -r /home/ec2-user/requirements.txt
become: false

2 changes: 1 addition & 1 deletion test/manual/definitions/apm/python/python-al2.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"provider": "aws",
"type": "ec2",
"size": "t3.small",
"ami_name": "amzn2-ami-hvm-2.0.????????.?-x86_64-gp2",
"ami_name": "al2023-ami-2023.?.????????.?-kernel-?.?-x86_64",
"user_name": "ec2-user"
}
],
Expand Down