Skip to content
This repository was archived by the owner on Sep 17, 2024. It is now read-only.

Commit

Permalink
chore: use Ansible's built-in replace instead of sed (#2048) (#2049)
Browse files Browse the repository at this point in the history
* chore: use Ansible's built-in replace instead of sed

* chore: whitespace variable

* chore: simplify regexp

(cherry picked from commit 6b930a0)

Co-authored-by: Manuel de la Peña <[email protected]>
  • Loading branch information
mergify[bot] and mdelapenya authored Jan 24, 2022
1 parent fb7677f commit 3ac9c4b
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions .ci/ansible/playbook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,14 @@
- setup-stack

- name: Configure stack files
shell: |
sed -i '' -e 's,http://elasticsearch,http://{{inventory_hostname}},g' /home/{{ansible_user}}/e2e-testing/cli/config/compose/profiles/fleet/default/kibana.config.yml
sed -i '' -e 's,http://fleet-server,http://{{inventory_hostname}},g' /home/{{ansible_user}}/e2e-testing/cli/config/compose/profiles/fleet/default/kibana.config.yml
sed -i '' -e 's,http://package-registry:8080,https://epr-staging.elastic.co,g' /home/{{ansible_user}}/e2e-testing/cli/config/compose/profiles/fleet/default/kibana.config.yml
ansible.builtin.replace:
path: "/home/{{ ansible_user }}/e2e-testing/cli/config/compose/profiles/fleet/default/kibana.config.yml"
regexp: '{{ item.old }}'
replace: '{{ item.new }}'
loop:
- { old: 'http://elasticsearch', new: 'http://{{ inventory_hostname }}' }
- { old: 'http://fleet-server', new: 'http://{{ inventory_hostname }}' }
- { old: 'http://package-registry:8080', new: 'https://epr-staging.elastic.co' }
tags:
- setup-stack

Expand Down

0 comments on commit 3ac9c4b

Please sign in to comment.