Skip to content

Commit 2e3d744

Browse files
authored
Merge pull request #76 from Appdynamics/develop
Sync develop to master for 21.6 release
2 parents 6d61511 + c1d204a commit 2e3d744

12 files changed

+38
-41
lines changed

.ansible-lint

+5-5
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@ parseable: true
66
quiet: true
77
rulesdir:
88
- ./rule/directory/
9+
#warn_list:
10+
# - X
911
skip_list:
10-
- '201'
11-
- '204'
12-
- '208'
13-
- '303'
14-
- '305'
1512
- unnamed-task
13+
- var-naming
14+
- risky-file-permissions
15+
- command-instead-of-shell
1616
use_default_rules: true
1717
verbosity: 1

CHANGELOG.md

+7-4
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11

2+
# Changelog
23

3-
## Unreleased
4+
## 21.6
45

5-
### Bugfix
6+
### Fixed
67

7-
- Logger role: Fix for working in ansible 2.9.*
8+
- Logger role: Fixed role in ansible 2.9.* (https://github.com/Appdynamics/appdynamics-ansible/issues/71)
9+
- Dotnet role: Fixed automatic restart of IIS
810

911
## 21.4
1012

@@ -26,4 +28,5 @@
2628
- DotNet agent logger
2729

2830
### Removed
29-
### Changed
31+
### Updated
32+
### Fixed

roles/common/tasks/verify_lxml.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,16 @@
66
name: lxml
77
check_mode: yes
88
ignore_errors: yes
9-
register: lxmlStatus
9+
register: lxml_status
1010
delegate_to: localhost
1111
changed_when: false
1212

13-
- debug: var=lxmlStatus
13+
- debug: var=lxml_status
1414

1515
- name: check lxml
1616
set_fact:
1717
lxml_found: True
18-
when: lxmlStatus.stdout | regex_search('lxml==.*')
18+
when: lxml_status.stdout | regex_search('lxml==.*')
1919

2020
- name: Assert that lxml is installed on control node
2121
assert:

roles/db/tasks/install_db_agent_linux.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
- name: Kill running DB processes
5050
command: "kill {{ item }}"
5151
with_items: "{{ running_processes.stdout_lines }}"
52-
ignore_errors: yes # Skip 'kill: No such process' errors
52+
ignore_errors: yes # Skip 'kill: No such process' errors # noqa ignore-errors
5353
when: previous_db_agent.stat.exists
5454
changed_when: false
5555

roles/dotnet/handlers/restart_iis.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,5 @@
99
- { service: was, state: restarted }
1010
- { service: w3svc, state: started }
1111
listen: Restart app listener
12-
ignore_errors: yes
12+
ignore_errors: yes # noqa ignore-errors
1313
when: monitor_all_IIS_apps | bool and restart_app | bool and iis_service.exists

roles/dotnet/tasks/dotnet-agent.yml

+3-4
Original file line numberDiff line numberDiff line change
@@ -32,15 +32,15 @@
3232
log_path: "{{ dotnet_agent_dest_folder_win }}/UninstallLogs.txt"
3333
state: absent
3434
when: is_agent_installed.stdout | length != 0
35-
changed_when: false
35+
tags: molecule-idempotence-notest
3636

3737
- name: Remove the conf file # Since it does not update during installation
3838
win_file:
3939
path: "C:\\ProgramData\\AppDynamics\\DotNetAgent\\Config\\config.xml"
4040
state: absent
4141
force: true
4242
when: is_agent_installed.stdout | length != 0
43-
changed_when: false
43+
tags: molecule-idempotence-notest
4444

4545
- block:
4646
- name: Install .NET agent service
@@ -53,7 +53,6 @@
5353
notify:
5454
- Verify .NET agent restart
5555
- Restart app listener
56-
changed_when: false
5756
rescue:
5857
- name: Get log Winston.txt
5958
win_shell: 'Get-Content {{ DOTNETAGENTFOLDER }}\Logs\Winston.txt -Tail 30'
@@ -81,4 +80,4 @@
8180
win_file:
8281
path: "{{ dotnet_agent_dest_folder_win }}\\{{ dotnet_agent_dest_file }}"
8382
state: absent
84-
changed_when: false
83+
tags: molecule-idempotence-notest

roles/dotnetcore/tasks/dotnet-core-agent-linux.yml

-1
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,6 @@
7878
- agent_dir_permission.group is defined
7979
- agent_dir_permission.user | length != 0
8080
- agent_dir_permission.group | length != 0
81-
ignore_errors: yes
8281
changed_when: false
8382

8483
- name: Copy the environment variables shell script file to /etc/profile.d Directory

roles/java/tasks/java-agent-linux.yml

-2
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,6 @@
9898
recurse: yes
9999
owner: "{{ agent_dir_permission.user }}"
100100
group: "{{ agent_dir_permission.group }}"
101-
ignore_errors: yes
102101
changed_when: false
103102

104103
- name: "Make java agent log and conf dirs writable to {{ agent_dir_permission.user }} user and {{ agent_dir_permission.group }} group"
@@ -113,7 +112,6 @@
113112
- "{{ java_agent_ver_folder }}/logs"
114113
- "{{ java_agent_ver_folder }}/conf"
115114
- "{{ java_agent_dest_folder_linux }}/conf"
116-
ignore_errors: yes
117115
changed_when: false
118116

119117
- name: Clean up - remove {{ java_agent_dest_file }}

roles/logger/tasks/db_logger_linux.yaml

+6-6
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
tempfile:
3636
state: directory
3737
suffix: build
38-
register: tempDir
38+
register: temp_dir
3939
changed_when: false
4040

4141
# Rather than modifying the XML files in-situ on the remote server, re copy
@@ -45,15 +45,15 @@
4545
- name: Copy the log4j file down to update it localy
4646
fetch:
4747
src: '{{ db_agent_dest_folder_linux }}/conf/logging/log4j.xml'
48-
dest: '{{ tempDir.path }}/'
48+
dest: '{{ temp_dir.path }}/'
4949
mode: 0755
5050
flat: yes
5151
changed_when: false
5252

5353
- name: Check which xpath entries are found
5454
xml:
5555
# path: '{{ db_agent_dest_folder_linux }}/conf/logging/log4j.xml'
56-
path: '{{ tempDir.path }}/log4j.xml'
56+
path: '{{ temp_dir.path }}/log4j.xml'
5757
xpath: //logger[@name='{{ item }}']/level
5858
count: yes
5959
register: hits
@@ -63,7 +63,7 @@
6363
- name: Set the log DB level for all relevant loggers
6464
xml:
6565
# path: '{{ db_agent_dest_folder_linux }}/conf/logging/log4j.xml'
66-
path: '{{ tempDir.path }}/log4j.xml'
66+
path: '{{ temp_dir.path }}/log4j.xml'
6767
xpath: "{{ item.actions.xpath }}" # //logger[@name='{{ item }}']/level
6868
attribute: value
6969
value: "{{ agent_log_level }}"
@@ -78,13 +78,13 @@
7878
- name: Copy the local file back to the host
7979
become: true
8080
copy:
81-
src: '{{ tempDir.path }}/log4j.xml'
81+
src: '{{ temp_dir.path }}/log4j.xml'
8282
dest: '{{ db_agent_dest_folder_linux }}/conf/logging/log4j.xml'
8383
changed_when: false
8484

8585
- name: Delete the temp directory
8686
file:
87-
path: "{{ tempDir.path }}"
87+
path: "{{ temp_dir.path }}"
8888
state: absent
8989
delegate_to: localhost
9090
changed_when: false

roles/logger/tasks/java_logger_linux.yaml

+6-6
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
tempfile:
3434
state: directory
3535
suffix: build
36-
register: tempDir
36+
register: temp_dir
3737
changed_when: false
3838

3939
# Rather than modifying the XML files in-situ on the remote server, we copy
@@ -43,15 +43,15 @@
4343
- name: Copy the log4j file down to update it localy ( which we do as not to require the lxml python library on the target )
4444
fetch:
4545
src: '{{ java_agent_ver_folder }}/conf/logging/log4j2.xml'
46-
dest: '{{ tempDir.path }}/'
46+
dest: '{{ temp_dir.path }}/'
4747
mode: 0755
4848
flat: yes
4949
changed_when: false
5050

5151
- name: Check which xpath entries are found in the log4j2 file
5252
xml:
5353
# path: '{{ java_agent_ver_folder }}/conf/logging/log4j2.xml'
54-
path: '{{ tempDir.path }}/log4j2.xml'
54+
path: '{{ temp_dir.path }}/log4j2.xml'
5555
xpath: //AsyncLogger[@name='{{ item }}']
5656
count: yes
5757
register: hits
@@ -61,7 +61,7 @@
6161
- name: Set the log level for the java agent
6262
xml:
6363
# path: '{{ java_agent_ver_folder }}/conf/logging/log4j2.xml'
64-
path: '{{ tempDir.path }}/log4j2.xml'
64+
path: '{{ temp_dir.path }}/log4j2.xml'
6565
xpath: "{{ item.actions.xpath }}" # //AsyncLogger[@name='{{ item }}']
6666
attribute: level
6767
value: "{{ agent_log_level }}"
@@ -76,13 +76,13 @@
7676
- name: Copy the local file back to the host
7777
become: true
7878
copy:
79-
src: '{{ tempDir.path }}/log4j2.xml'
79+
src: '{{ temp_dir.path }}/log4j2.xml'
8080
dest: '{{ java_agent_ver_folder }}/conf/logging/'
8181
changed_when: false
8282

8383
- name: Delete the temp directory
8484
file:
85-
path: "{{ tempDir.path }}"
85+
path: "{{ temp_dir.path }}"
8686
state: absent
8787
delegate_to: localhost
8888
changed_when: false

roles/logger/tasks/machine_logger_linux.yaml

+6-6
Original file line numberDiff line numberDiff line change
@@ -19,21 +19,21 @@
1919
tempfile:
2020
state: directory
2121
suffix: build
22-
register: tempDir
22+
register: temp_dir
2323
changed_when: false
2424

2525
- name: Copy the log4j file down to update it localy
2626
fetch:
2727
src: '{{ machine_agent_dest_folder_linux }}/conf/logging/log4j.xml'
28-
dest: '{{ tempDir.path }}/'
28+
dest: '{{ temp_dir.path }}/'
2929
mode: 0755
3030
flat: yes
3131
changed_when: false
3232

3333
- name: Check which xpath entries are found in the log4j file
3434
xml:
3535
# path: '{{ machine_agent_dest_folder_linux }}/conf/logging/log4j.xml'
36-
path: '{{ tempDir.path }}/log4j.xml'
36+
path: '{{ temp_dir.path }}/log4j.xml'
3737
xpath: //Logger[@name='{{ item }}']
3838
count: yes
3939
register: hits
@@ -43,7 +43,7 @@
4343
- name: Set the log level for the machine agent
4444
xml:
4545
# path: '{{ machine_agent_dest_folder_linux }}/conf/logging/log4j.xml'
46-
path: '{{ tempDir.path }}/log4j.xml'
46+
path: '{{ temp_dir.path }}/log4j.xml'
4747
xpath: "{{ item.actions.xpath }}" # //Logger[@name='{{ item }}']
4848
attribute: level
4949
value: "{{ agent_log_level }}"
@@ -58,13 +58,13 @@
5858
- name: Copy the local file back to the host
5959
become: true
6060
copy:
61-
src: '{{ tempDir.path }}/log4j.xml'
61+
src: '{{ temp_dir.path }}/log4j.xml'
6262
dest: '{{ machine_agent_dest_folder_linux }}/conf/logging/log4j.xml'
6363
changed_when: false
6464

6565
- name: Delete the temp directory
6666
file:
67-
path: "{{ tempDir.path }}"
67+
path: "{{ temp_dir.path }}"
6868
state: absent
6969
delegate_to: localhost
7070
changed_when: false

roles/machine/vars/main.yml

-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +0,0 @@
1-
# vars are propagated to dependencies (but defaults not)
2-
create_appdynamics_user: yes

0 commit comments

Comments
 (0)