Skip to content

Commit

Permalink
still working on generated_password
Browse files Browse the repository at this point in the history
  • Loading branch information
newgoliath committed Sep 20, 2023
1 parent 9e87579 commit 73099b8
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 10 deletions.
14 changes: 9 additions & 5 deletions ansible/cloud_providers/azure_infrastructure_deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,18 @@
AZURE_CLIENT_ID: "{{azure_service_principal}}"
AZURE_TENANT: "{{azure_tenant}}"
AZURE_SECRET: "{{azure_password}}"
# AZURE_SUBSCRIPTION_ID: "{{azure_subscription_id}}"
#AZURE_SUBSCRIPTION_ID: "{{azure_subscription_id}}"
AZURE_CONFIG_DIR: "{{ output_dir }}/.azure-{{project_tag}}"
tasks:

- name: Check mandatory variables are defined
assert:
that:
- generated_password is defined
# shouldn't this be in defaults/main.yml?
- name: Generate Azure bastion password
when: generated_password is not defined
ansible.builtin.set_fact:
generated_password: >-
{{- lookup('ansible.builtin.password', '/dev/null length=1 chars=letters') -}}
{{- lookup('ansible.builtin.password', '/dev/null length=10') -}}
{{- lookup('ansible.builtin.password', '/dev/null length=1 chars=digits') -}}
- name: Create fact _subscription_id = azure_subscription_id if not subs based
when: env_type != "open-environment-azure-subscription"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,6 @@ azure_user_domain: azure.opentlc.com
# deploy a bastion - not required for a basic open-env
azure_deploy_bastion: false

generated_password: >-
{{- lookup('ansible.builtin.password', '/dev/null length=1 chars=letters') -}}
{{- lookup('ansible.builtin.password', '/dev/null length=10') -}}
{{- lookup('ansible.builtin.password', '/dev/null length=1 chars=digits') -}}
# prepare the environment for ARO install, but do not actually install ARO
aro_install_prep_only: false

Expand Down

0 comments on commit 73099b8

Please sign in to comment.