Change 0.0.0.0 address to 127.0.0.1; sync security plugin once again

On some host on Zuul CI gates, tests does not pass because of
wrong configured security plugin.

Change-Id: I475e12318f25f2b4c390e6a6103a36daab2444e4
This commit is contained in:
Daniel Pawlik
2022-05-27 10:11:15 +02:00
parent 7cbd38adc8
commit bf70996cd6
3 changed files with 22 additions and 14 deletions

View File

@@ -46,14 +46,14 @@
- name: Wait for Opensearch to be up
wait_for:
host: 0.0.0.0
host: 127.0.0.1
port: 9200
delay: 10
timeout: 300
- name: Wait for Opensearch to be up
uri:
url: "https://0.0.0.0:9200"
url: "https://127.0.0.1:9200"
user: "admin"
password: "admin"
force_basic_auth: true
@@ -65,6 +65,10 @@
retries: 30
delay: 10
- name: Reconfigure once again security plugin
shell: |
podman exec -it opensearch bash -c "JAVA_HOME=/usr/share/opensearch/jdk /usr/share/opensearch/securityadmin_demo.sh"
### Logscraper ###
- name: Setup logscraper service
include_role:
@@ -93,7 +97,7 @@
block:
- name: Get indices
uri:
url: "https://0.0.0.0:9200/_cat/indices"
url: "https://127.0.0.1:9200/_cat/indices"
user: "admin"
password: "admin"
force_basic_auth: true
@@ -108,7 +112,7 @@
- name: Check if build_branch exists in index content
uri:
url: "https://0.0.0.0:9200/logstash-logscraper"
url: "https://127.0.0.1:9200/logstash-logscraper"
user: "admin"
password: "admin"
force_basic_auth: true
@@ -139,7 +143,7 @@
- name: Get indices to fail the test
uri:
url: "https://0.0.0.0:9200/_cat/indices"
url: "https://127.0.0.1:9200/_cat/indices"
user: "admin"
password: "admin"
force_basic_auth: true

View File

@@ -65,14 +65,14 @@
- name: Wait for Opensearch to be up
wait_for:
host: 0.0.0.0
host: 127.0.0.1
port: 9200
delay: 10
timeout: 300
- name: Wait for Opensearch to be up
uri:
url: "https://0.0.0.0:9200"
url: "https://127.0.0.1:9200"
user: "admin"
password: "admin"
force_basic_auth: true
@@ -84,6 +84,10 @@
retries: 30
delay: 10
- name: Reconfigure once again security plugin
shell: |
podman exec -it opensearch bash -c "JAVA_HOME=/usr/share/opensearch/jdk /usr/share/opensearch/securityadmin_demo.sh"
### LOGSTASH ###
- name: Create require directories for Logstash
file:
@@ -98,7 +102,7 @@
content: |
# opensearch analyze is working on 9600
http.port: 9601
http.host: 0.0.0.0
http.host: 127.0.0.1
dest: /etc/logstash/logstash.yml
mode: '0644'
owner: '1000'
@@ -122,7 +126,7 @@
- name: Wait for Logstash to be up
wait_for:
host: 0.0.0.0
host: 127.0.0.1
port: 9999
delay: 10
timeout: 300
@@ -163,7 +167,7 @@
block:
- name: Get indices
uri:
url: "https://0.0.0.0:9200/_cat/indices"
url: "https://127.0.0.1:9200/_cat/indices"
user: "admin"
password: "admin"
force_basic_auth: true
@@ -199,7 +203,7 @@
- name: Get indices to fail the test
uri:
url: "https://0.0.0.0:9200/_cat/indices"
url: "https://127.0.0.1:9200/_cat/indices"
user: "admin"
password: "admin"
force_basic_auth: true

View File

@@ -1,6 +1,6 @@
input {
tcp {
host => "0.0.0.0"
host => "127.0.0.1"
port => "{{ output_port }}"
codec => json_lines {}
type => "zuul"
@@ -22,9 +22,9 @@ filter {
}
output {
elasticsearch {
hosts => ['https://0.0.0.0:9200']
hosts => ["https://127.0.0.1:9200"]
index => "logstash-logscraper-%{+YYYY.MM.dd}"
user => 'admin'
user => "admin"
password => "admin"
ssl => true
ssl_certificate_verification => false