bash line cont
Build and Publish Docker Image / Build and Push Docker Image (push) Successful in 2m51s
Details
Build and Publish Docker Image / Build and Push Docker Image (push) Successful in 2m51s
Details
This commit is contained in:
parent
922d3c3d91
commit
c0d52933d3
|
|
@ -43,8 +43,8 @@
|
||||||
set -x
|
set -x
|
||||||
export
|
export
|
||||||
whoami
|
whoami
|
||||||
gcloud compute addresses describe {{ static_ip_name }}
|
gcloud compute addresses describe {{ static_ip_name }} \
|
||||||
--region={{ gcp_region }}
|
--region={{ gcp_region }} \
|
||||||
--project={{ gcp_project }}
|
--project={{ gcp_project }}
|
||||||
register: ip_check
|
register: ip_check
|
||||||
failed_when: false
|
failed_when: false
|
||||||
|
|
@ -54,9 +54,9 @@
|
||||||
ansible.builtin.shell:
|
ansible.builtin.shell:
|
||||||
executable: /bin/bash
|
executable: /bin/bash
|
||||||
cmd: |
|
cmd: |
|
||||||
gcloud compute addresses create {{ static_ip_name }}
|
gcloud compute addresses create {{ static_ip_name }} \
|
||||||
--region={{ gcp_region }}
|
--region={{ gcp_region }} \
|
||||||
--project={{ gcp_project }}
|
--project={{ gcp_project }} \
|
||||||
--description="Static IP for Uptime Kuma"
|
--description="Static IP for Uptime Kuma"
|
||||||
when: ip_check.rc != 0
|
when: ip_check.rc != 0
|
||||||
|
|
||||||
|
|
@ -67,7 +67,7 @@
|
||||||
ansible.builtin.shell:
|
ansible.builtin.shell:
|
||||||
executable: /bin/bash
|
executable: /bin/bash
|
||||||
cmd: |
|
cmd: |
|
||||||
gcloud compute firewall-rules describe {{ firewall_rule_name }}
|
gcloud compute firewall-rules describe {{ firewall_rule_name }} \
|
||||||
--project={{ gcp_project }}
|
--project={{ gcp_project }}
|
||||||
register: fw_check
|
register: fw_check
|
||||||
failed_when: false
|
failed_when: false
|
||||||
|
|
@ -77,11 +77,11 @@
|
||||||
ansible.builtin.shell:
|
ansible.builtin.shell:
|
||||||
executable: /bin/bash
|
executable: /bin/bash
|
||||||
cmd: |
|
cmd: |
|
||||||
gcloud compute firewall-rules create {{ firewall_rule_name }}
|
gcloud compute firewall-rules create {{ firewall_rule_name }} \
|
||||||
--project={{ gcp_project }}
|
--project={{ gcp_project }} \
|
||||||
--allow=tcp:3001
|
--allow=tcp:3001 \
|
||||||
--target-tags=uptime-kuma
|
--target-tags=uptime-kuma \
|
||||||
--source-ranges=0.0.0.0/0
|
--source-ranges=0.0.0.0/0 \
|
||||||
--description="Allow traffic to Uptime Kuma UI & API"
|
--description="Allow traffic to Uptime Kuma UI & API"
|
||||||
when: fw_check.rc != 0
|
when: fw_check.rc != 0
|
||||||
|
|
||||||
|
|
@ -92,8 +92,8 @@
|
||||||
ansible.builtin.shell:
|
ansible.builtin.shell:
|
||||||
executable: /bin/bash
|
executable: /bin/bash
|
||||||
cmd: |
|
cmd: |
|
||||||
gcloud compute instances describe {{ instance_name }}
|
gcloud compute instances describe {{ instance_name }} \
|
||||||
--zone={{ gcp_zone }}
|
--zone={{ gcp_zone }} \
|
||||||
--project={{ gcp_project }}
|
--project={{ gcp_project }}
|
||||||
register: instance_check
|
register: instance_check
|
||||||
failed_when: false
|
failed_when: false
|
||||||
|
|
@ -103,14 +103,14 @@
|
||||||
ansible.builtin.shell:
|
ansible.builtin.shell:
|
||||||
executable: /bin/bash
|
executable: /bin/bash
|
||||||
cmd: |
|
cmd: |
|
||||||
gcloud compute instances create-with-container {{ instance_name }}
|
gcloud compute instances create-with-container {{ instance_name }} \
|
||||||
--project={{ gcp_project }}
|
--project={{ gcp_project }} \
|
||||||
--zone={{ gcp_zone }}
|
--zone={{ gcp_zone }} \
|
||||||
--machine-type={{ machine_type }}
|
--machine-type={{ machine_type }} \
|
||||||
--tags=uptime-kuma
|
--tags=uptime-kuma \
|
||||||
--address={{ static_ip_name }}
|
--address={{ static_ip_name }} \
|
||||||
--boot-disk-size=20GB
|
--boot-disk-size=20GB \
|
||||||
--container-image=louislam/uptime-kuma:1
|
--container-image=louislam/uptime-kuma:1 \
|
||||||
--container-mount-host-path=host-path=/var/uptime-kuma,mount-path=/app/data,mode=rw
|
--container-mount-host-path=host-path=/var/uptime-kuma,mount-path=/app/data,mode=rw
|
||||||
when: instance_check.rc != 0
|
when: instance_check.rc != 0
|
||||||
|
|
||||||
|
|
@ -120,9 +120,9 @@
|
||||||
- name: Fetch instance public IP address
|
- name: Fetch instance public IP address
|
||||||
ansible.builtin.shell:
|
ansible.builtin.shell:
|
||||||
cmd: |
|
cmd: |
|
||||||
gcloud compute instances describe {{ instance_name }}
|
gcloud compute instances describe {{ instance_name }} \
|
||||||
--zone={{ gcp_zone }}
|
--zone={{ gcp_zone }} \
|
||||||
--project={{ gcp_project }}
|
--project={{ gcp_project }} \
|
||||||
--format="value(networkInterfaces[0].accessConfigs[0].natIP)"
|
--format="value(networkInterfaces[0].accessConfigs[0].natIP)"
|
||||||
executable: /bin/bash
|
executable: /bin/bash
|
||||||
register: vm_ip
|
register: vm_ip
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue