Skip to content

Commit e6ab669

Browse files
authored
Merge pull request #616 from splunk/develop
Release/8.1.3
2 parents 870d343 + 7a8c9ba commit e6ab669

File tree

14 files changed

+67
-35
lines changed

14 files changed

+67
-35
lines changed

.circleci/config.yml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,14 @@
11
version: 2.1
22

3-
jobs:
4-
splunk-ansible-test:
3+
executors:
4+
circleci_xlarge:
55
machine:
66
image: ubuntu-1604:202007-01
7+
resource_class: xlarge
8+
9+
jobs:
10+
splunk-ansible-test:
11+
executor: circleci_xlarge
712
steps:
813
- checkout
914
- run:
@@ -24,8 +29,7 @@ jobs:
2429
- store_test_results:
2530
path: tests/results
2631
py3k-splunk-ansible-test:
27-
machine:
28-
image: ubuntu-1604:202007-01
32+
executor: circleci_xlarge
2933
steps:
3034
- checkout
3135
- run:

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ SHELL := /bin/bash
44

55
test-setup:
66
@echo 'Install test requirements'
7-
pip install pip==20.3.3
7+
pip install pip==20.3.4
88
pip install -r $(shell pwd)/tests/requirements.txt --upgrade
99

1010
py3k-test-setup:

docs/ADVANCED.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -124,9 +124,9 @@ Splunk-Ansible ships with an inventory script in `inventory/environ.py`. The scr
124124
| SPLUNK_DEFAULTS_HTTP_MAX_TIMEOUT | When fetching a remote `default.yml`, specify the timeout of the request | no | no | no |
125125
| SPLUNK_DEFAULTS_HTTP_MAX_RETRIES | When fetching a remote `default.yml`, the number of retries to make. For unlimited retries, use `-1` | no | no | no |
126126
| SPLUNK_DEFAULTS_HTTP_MAX_DELAY | When fetching a remote `default.yml`, specify the delay between each retry | no | no | no |
127-
| SPLUNK_ANSIBLE_PRE_TASKS | Pass in a comma-separated list of local paths or remote URLs to Ansible playbooks that will be executed before `site.yml` | no | no | no |
128-
| SPLUNK_ANSIBLE_POST_TASKS | Pass in a comma-separated list of local paths or remote URLs to Ansible playbooks that will be executed after `site.yml` | no | no | no |
129-
| SPLUNK_ANSIBLE_ENV | Pass in a comma-separated list of "key=value" pairs that will be mapped to environment variables used during `site.yml` execution | no | no | no |
127+
| SPLUNK_ANSIBLE_PRE_TASKS | Pass in a comma-separated list of local paths or remote URLs to Ansible playbooks that will be executed before `site.yml`. Must include the protocol, i.e. it must match the regex `^(http\|https\|file)://.*` | no | no | no |
128+
| SPLUNK_ANSIBLE_POST_TASKS | Pass in a comma-separated list of local paths or remote URLs to Ansible playbooks that will be executed after `site.yml`. Must include the protocol, i.e. it must match the regex `^(http\|https\|file)://.*` | no | no | no |
129+
| SPLUNK_ANSIBLE_ENV | Pass in a comma-separated list of "key=value" pairs that will be mapped to environment variables used during `site.yml` execution. These variables are also available in ansible pre/post playbooks and can be referenced as `hostvars['localhost'].ansible_environment['key']` | no | no | no |
130130
| SPLUNK_CONNECTION_TIMEOUT | Configures splunkdConnectionTimeout in `web.conf` with passed integer value (in seconds) | no | no | no |
131131
| SPLUNK_ES_SSL_ENABLEMENT | Set the ssl-enablement flag in ES. Valid values are 'auto', 'strict', and 'ignore'. Defaults to auto when present. | no | no | no |
132132

docs/CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
## Navigation
44

5+
* [8.1.3](#813)
56
* [8.1.2](#812)
67
* [8.1.1](#811)
78
* [8.1.0.1](#8101)
@@ -46,6 +47,14 @@
4647

4748
---
4849

50+
## 8.1.3
51+
52+
#### Changes
53+
* Bugfixes
54+
* Documentation and CI updates
55+
56+
---
57+
4958
## 8.1.2
5059

5160
#### Changes

docs/LICENSE.md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,32 @@
1-
Apache License
1+
## Apache License
22

3-
Version 2.0, January 2004
3+
**Version 2.0, January 2004**
44

5-
http://www.apache.org/licenses/
5+
**<http://www.apache.org/licenses/>**
66

77
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
88

9-
#### 1. Definitions.
9+
**1. Definitions.**
1010

11-
"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.
11+
* **"License"** shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.
1212

13-
"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.
13+
* **"Licensor"** shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.
1414

15-
"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
15+
* **"Legal Entity"** shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, **"control"** means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
1616

17-
"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License.
17+
* **"You"** (or **"Your"**) shall mean an individual or Legal Entity exercising permissions granted by this License.
1818

19-
"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.
19+
* **"Source"** form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.
2020

21-
"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.
21+
* **"Object"** form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.
2222

23-
"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below).
23+
* **"Work"** shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below).
2424

25-
"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.
25+
* **"Derivative Works"** shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.
2626

27-
"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution."
27+
* **"Contribution"** shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, **"submitted"** means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as **"Not a Contribution."**
2828

29-
"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.
29+
* **"Contributor"** shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.
3030

3131
**2. Grant of Copyright License.** Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.
3232

@@ -37,7 +37,7 @@ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
3737
* You must give any other recipients of the Work or Derivative Works a copy of this License; and
3838
* You must cause any modified files to carry prominent notices stating that You changed the files; and
3939
* You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and
40-
* If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License.
40+
* If the Work includes a **"NOTICE"** text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License.
4141

4242
You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.
4343

docs/_config.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
include: [ 'CONTRIBUTING.md', 'LICENSE.md' ]
12
relative_links:
23
enabled: true
34
collections: true

docs/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,5 +33,5 @@ See the [Ansible User Guide](https://docs.ansible.com/ansible/latest/user_guide/
3333
* [Advanced Usage](ADVANCED.md)
3434
* [Architecture](ARCHITECTURE.md)
3535
* [Contributing](CONTRIBUTING.md)
36-
* [License](LICENSE.md)
3736
* [Changelog](CHANGELOG.md)
37+
* [License](LICENSE.md)

inventory/environ.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ def getDefaultVars():
124124
getSplunkdSSL(defaultVars)
125125
getDistributedTopology(defaultVars)
126126
getLicenses(defaultVars)
127-
defaultVars["splunk"]["role"] = os.environ.get('SPLUNK_ROLE', 'splunk_standalone')
127+
defaultVars["splunk"]["role"] = os.environ.get('SPLUNK_ROLE', defaultVars["splunk"].get("role") or "splunk_standalone")
128128
# Determine DMC settings
129129
defaultVars["dmc_forwarder_monitoring"] = os.environ.get('DMC_FORWARDER_MONITORING', False)
130130
defaultVars["dmc_asset_interval"] = os.environ.get('DMC_ASSET_INTERVAL', '3,18,33,48 * * * *')
@@ -351,6 +351,8 @@ def getSplunkbaseToken(vars_scope):
351351
if resp.status_code != 200:
352352
raise Exception("Invalid Splunkbase credentials - will not download apps from Splunkbase")
353353
output = resp.content
354+
if isinstance(output, bytes):
355+
output = output.decode("utf-8", "ignore")
354356
splunkbase_token = re.search("<id>(.*)</id>", output, re.IGNORECASE)
355357
vars_scope["splunkbase_token"] = splunkbase_token.group(1) if splunkbase_token else None
356358

@@ -644,7 +646,10 @@ def mergeDefaultsFromURL(vars_scope, url, headers=None, verify=False):
644646
resp = requests.get(url.format(hostname=HOSTNAME, platform=PLATFORM),
645647
headers=headers, timeout=max_timeout, verify=verify)
646648
resp.raise_for_status()
647-
vars_scope = merge_dict(vars_scope, yaml.load(resp.content, Loader=yaml.Loader))
649+
output = resp.content
650+
if isinstance(output, bytes):
651+
output = output.decode("utf-8", "ignore")
652+
vars_scope = merge_dict(vars_scope, yaml.load(output, Loader=yaml.Loader))
648653
break
649654
except Exception as err:
650655
if unlimited_retries or current_retry < max_retries:

roles/splunk_common/tasks/check_for_required_restarts.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@
1111
use_proxy: no
1212
register: restart_required
1313
changed_when: restart_required.status == 200
14+
until: restart_required is succeeded
15+
retries: 5
16+
delay: "{{ retry_delay }}"
1417
no_log: "{{ hide_password }}"
1518
notify:
1619
- Restart the splunkd service

roles/splunk_common/tasks/enable_admin_auth.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@
2424
loop_control:
2525
label: "{{ item.opt }}"
2626
when: ansible_system is match("Linux")
27+
become: yes
28+
become_user: "{{ splunk.user }}"
2729
no_log: "{{ hide_password }}"
2830

2931
- name: "Generate user-seed.conf (Windows)"

0 commit comments

Comments
 (0)