Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(example): render nginx port to config #19

Merged
merged 10 commits into from
Oct 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion examples/inventory-rolling-update/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ ansible-playbook configure-webserver.yml --extra-vars "animal=tiger"
To monitor how the rolling update proceeds, open another terminal window and curl the load-balancer URL. The URL is visible at the output of prevous `terraform apply` command and can be printed by running `terraform output`.

```sh
watch -n 0.75 curl -s $(terraform -chdir=resources output lb_url)
watch -n 0.75 curl -s $(terraform -chdir=resources output -raw lb_url)
```

Finally, to cleanup the created cloud resources, run `terraform destroy` in the [resources](./resources) directory.
Expand Down
18 changes: 16 additions & 2 deletions examples/inventory-rolling-update/configure-webserver.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,31 @@
state: absent
notify:
- Restart nginx
- name: Remove existing content from nginx
file:
path: /usr/share/nginx/html
state: absent
- name: Recreate empty directory for nginx content
file:
path: /usr/share/nginx/html
state: directory
mode: '0755'
- name: Download and unarchive static content ({{ animal }})
unarchive:
remote_src: yes
src: https://github.com/UpCloudLtd/hello-container/releases/download/{{ release.json.tag_name }}/hello-{{ animal }}.tar.gz
dest: /usr/share/nginx/html/
notify:
- Restart nginx
- name: Configure nginx
- name: Download nginx config
get_url:
url: https://github.com/UpCloudLtd/hello-container/releases/download/{{ release.json.tag_name }}/index.conf
dest: /etc/nginx/conf.d/
dest: /etc/nginx/conf.d/index.conf
- name: Replace ${NGINX_PORT} with actual port
replace:
path: /etc/nginx/conf.d/index.conf
regexp: '\$\{NGINX_PORT\}'
replace: '80'
notify:
- Restart nginx
handlers:
Expand Down
1 change: 1 addition & 0 deletions tests/sanity/ignore-2.19.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
plugins/inventory/upcloud.py validate-modules:missing-gplv3-license
Loading