diff --git a/examples/inventory-rolling-update/README.md b/examples/inventory-rolling-update/README.md index 25b7d9a..a07afec 100644 --- a/examples/inventory-rolling-update/README.md +++ b/examples/inventory-rolling-update/README.md @@ -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. diff --git a/examples/inventory-rolling-update/configure-webserver.yml b/examples/inventory-rolling-update/configure-webserver.yml index dc485d7..97da77d 100644 --- a/examples/inventory-rolling-update/configure-webserver.yml +++ b/examples/inventory-rolling-update/configure-webserver.yml @@ -21,6 +21,15 @@ 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 @@ -28,10 +37,15 @@ 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: diff --git a/tests/sanity/ignore-2.19.txt b/tests/sanity/ignore-2.19.txt new file mode 100644 index 0000000..c37f47d --- /dev/null +++ b/tests/sanity/ignore-2.19.txt @@ -0,0 +1 @@ +plugins/inventory/upcloud.py validate-modules:missing-gplv3-license