Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 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: 2 additions & 0 deletions modules/powervs-vpc-landing-zone/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ Creates VPC Landing Zone | Performs VPC VSI OS Config | Creates PowerVS Infrastr
|------|---------|
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.9 |
| <a name="requirement_ibm"></a> [ibm](#requirement\_ibm) | >=1.65.0 |
| <a name="requirement_time"></a> [time](#requirement\_time) | >= 0.9.1 |

### Modules

Expand Down Expand Up @@ -136,6 +137,7 @@ Creates VPC Landing Zone | Performs VPC VSI OS Config | Creates PowerVS Infrastr
| [ibm_resource_instance.ibm_dns_instance](https://registry.terraform.io/providers/IBM-Cloud/ibm/latest/docs/resources/resource_instance) | resource |
| [ibm_resource_instance.monitoring_instance](https://registry.terraform.io/providers/IBM-Cloud/ibm/latest/docs/resources/resource_instance) | resource |
| [ibm_resource_instance.secrets_manager](https://registry.terraform.io/providers/IBM-Cloud/ibm/latest/docs/resources/resource_instance) | resource |
| [time_sleep.wait_for_2min](https://registry.terraform.io/providers/hashicorp/time/latest/docs/resources/sleep) | resource |

### Inputs

Expand Down
5 changes: 4 additions & 1 deletion modules/powervs-vpc-landing-zone/monitoring.tf
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ locals {
monitoring_host_ip = local.monitoring_vsi_ip
}
}
resource "time_sleep" "wait_for_2min" {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not required. Ansible task is handling that. Please confirm is ansible task is working properly

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed

create_duration = "120s"
}

#####################################################
# Configure monitoring VSI
Expand All @@ -31,7 +34,7 @@ locals {
module "configure_monitoring_host" {

source = "./submodules/ansible"
depends_on = [module.configure_network_services]
depends_on = [module.configure_network_services, time_sleep.wait_for_2min]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not required

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed

count = var.enable_monitoring ? 1 : 0

bastion_host_ip = local.access_host_or_ip
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,11 @@
register: update_result
when: "'SLES' in ansible_distribution"

- name: Reboot system with delay
shell: "(sleep 2 && reboot) &"
async: 1
poll: 0
- name: Reboot system (SLES)
ansible.builtin.reboot:
msg: "Reboot initiated by Ansible"
connect_timeout: 5 # SSH connect timeout
reboot_timeout: 600 # wait up to 10 min for the node to come back
pre_reboot_delay: 2 # wait 2s before sending reboot
post_reboot_delay: 30 # wait 30s after system comes back before marking success
when: update_result is defined and update_result.changed
4 changes: 4 additions & 0 deletions modules/powervs-vpc-landing-zone/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,9 @@ terraform {
version = ">=1.65.0"
configuration_aliases = [ibm.ibm-is, ibm.ibm-pi, ibm.ibm-sm]
}
time = {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not required

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed

source = "hashicorp/time"
version = ">= 0.9.1"
}
}
}