dummy-module: add become_user variable, fix windows

Signed-off-by: Jakub Sokołowski <jakub@status.im>
This commit is contained in:
Jakub Sokołowski 2022-03-03 21:02:59 +01:00
parent 89093c894a
commit ee14e22ce7
No known key found for this signature in database
GPG Key ID: 09AA5403E54D9931
3 changed files with 9 additions and 2 deletions

View File

@ -36,6 +36,7 @@ resource "ansible_host" "host" {
ansible_host = each.value
/* Optional extra Ansible variables necessary for Windows */
ansible_shell_type = (var.shell_type == null ? null : var.shell_type)
ansible_become_user = (var.become_user == null ? null : var.become_user)
ansible_become_method = (var.become_method == null ? null : var.become_method)
}
}

View File

@ -59,8 +59,13 @@ variable "shell_type" {
default = null
}
variable "become_method" {
description = "Whether Ansible should become a user."
variable "become_user" {
description = "What user Ansible should become."
type = string
default = null
}
variable "become_method" {
description = "Method used by Ansible to become a user."
type = string
default = null
}

View File

@ -100,6 +100,7 @@ module "nimbus_nodes_prater_windows" {
domain = var.domain
/* Windows */
become_user = "admin"
become_method = "runas"
shell_type = "powershell"