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 - name: Wait for Opensearch to be up
wait_for: wait_for:
host: 0.0.0.0 host: 127.0.0.1
port: 9200 port: 9200
delay: 10 delay: 10
timeout: 300 timeout: 300
- name: Wait for Opensearch to be up - name: Wait for Opensearch to be up
uri: uri:
url: "https://0.0.0.0:9200" url: "https://127.0.0.1:9200"
user: "admin" user: "admin"
password: "admin" password: "admin"
force_basic_auth: true force_basic_auth: true
@@ -65,6 +65,10 @@
retries: 30 retries: 30
delay: 10 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 ### ### Logscraper ###
- name: Setup logscraper service - name: Setup logscraper service
include_role: include_role:
@@ -93,7 +97,7 @@
block: block:
- name: Get indices - name: Get indices
uri: uri:
url: "https://0.0.0.0:9200/_cat/indices" url: "https://127.0.0.1:9200/_cat/indices"
user: "admin" user: "admin"
password: "admin" password: "admin"
force_basic_auth: true force_basic_auth: true
@@ -108,7 +112,7 @@
- name: Check if build_branch exists in index content - name: Check if build_branch exists in index content
uri: uri:
url: "https://0.0.0.0:9200/logstash-logscraper" url: "https://127.0.0.1:9200/logstash-logscraper"
user: "admin" user: "admin"
password: "admin" password: "admin"
force_basic_auth: true force_basic_auth: true
@@ -139,7 +143,7 @@
- name: Get indices to fail the test - name: Get indices to fail the test
uri: uri:
url: "https://0.0.0.0:9200/_cat/indices" url: "https://127.0.0.1:9200/_cat/indices"
user: "admin" user: "admin"
password: "admin" password: "admin"
force_basic_auth: true force_basic_auth: true

View File

@@ -65,14 +65,14 @@
- name: Wait for Opensearch to be up - name: Wait for Opensearch to be up
wait_for: wait_for:
host: 0.0.0.0 host: 127.0.0.1
port: 9200 port: 9200
delay: 10 delay: 10
timeout: 300 timeout: 300
- name: Wait for Opensearch to be up - name: Wait for Opensearch to be up
uri: uri:
url: "https://0.0.0.0:9200" url: "https://127.0.0.1:9200"
user: "admin" user: "admin"
password: "admin" password: "admin"
force_basic_auth: true force_basic_auth: true
@@ -84,6 +84,10 @@
retries: 30 retries: 30
delay: 10 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 ### ### LOGSTASH ###
- name: Create require directories for Logstash - name: Create require directories for Logstash
file: file:
@@ -98,7 +102,7 @@
content: | content: |
# opensearch analyze is working on 9600 # opensearch analyze is working on 9600
http.port: 9601 http.port: 9601
http.host: 0.0.0.0 http.host: 127.0.0.1
dest: /etc/logstash/logstash.yml dest: /etc/logstash/logstash.yml
mode: '0644' mode: '0644'
owner: '1000' owner: '1000'
@@ -122,7 +126,7 @@
- name: Wait for Logstash to be up - name: Wait for Logstash to be up
wait_for: wait_for:
host: 0.0.0.0 host: 127.0.0.1
port: 9999 port: 9999
delay: 10 delay: 10
timeout: 300 timeout: 300
@@ -163,7 +167,7 @@
block: block:
- name: Get indices - name: Get indices
uri: uri:
url: "https://0.0.0.0:9200/_cat/indices" url: "https://127.0.0.1:9200/_cat/indices"
user: "admin" user: "admin"
password: "admin" password: "admin"
force_basic_auth: true force_basic_auth: true
@@ -199,7 +203,7 @@
- name: Get indices to fail the test - name: Get indices to fail the test
uri: uri:
url: "https://0.0.0.0:9200/_cat/indices" url: "https://127.0.0.1:9200/_cat/indices"
user: "admin" user: "admin"
password: "admin" password: "admin"
force_basic_auth: true force_basic_auth: true

View File

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