Skip to content

Commit e8eb161

Browse files
arblltbavelierswang392
authored
remove pycache directory during upgrades (#673)
* remove pycache directory during upgrades This PR removes `/opt/datadog-agent/python-scripts/__pycache__` similarly to other installation methods. * feedback * trigger * Change ignore_errors to failed_when: false and changed_when: false for linter * empty commit to trigger ci --------- Co-authored-by: Timothée Bavelier <timothee.bavelier@datadoghq.com> Co-authored-by: Sarah Wang <sarah.wang2009@gmail.com>
1 parent 365791d commit e8eb161

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

tasks/main.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,14 @@
2929
- name: Configure Datadog Installer
3030
ansible.builtin.include_tasks: installer-config.yml
3131

32+
- name: Remove /opt/datadog-agent/python-scripts/__pycache__
33+
ansible.builtin.file:
34+
path: /opt/datadog-agent/python-scripts/__pycache__
35+
state: absent
36+
when: not agent_datadog_skip_install and ansible_facts.os_family != "Windows" and ansible_facts.os_family != "Darwin"
37+
failed_when: false
38+
changed_when: false
39+
3240
- name: Debian Install Tasks
3341
ansible.builtin.include_tasks: pkg-debian.yml
3442
when: ansible_facts.os_family == "Debian"

0 commit comments

Comments
 (0)