Skip to content

Commit 14986d9

Browse files
committed
Cleanup of Terraform tasks
Signed-off-by: Jim Enright <[email protected]>
1 parent 128dac7 commit 14986d9

9 files changed

+0
-93
lines changed

roles/infrastructure/tasks/initialize_aws_terraform.yml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,3 @@
6262
src: 'template/{{ infra__type }}/infra_{{ infra__type }}_compute.tf.j2'
6363
dest: "{{ infra__terraform_template_dir }}/infra/infra_compute.tf"
6464
no_log: false
65-
66-
- name: Prompt to debug Terraform deployment
67-
ansible.builtin.pause:
68-
prompt: "Terraform infra files created in {{ infra__terraform_template_dir }}/infra"
69-
when: debug_terraform | default(false) | bool

roles/infrastructure/tasks/initialize_teardown_aws_terraform.yml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,3 @@
3535
src: 'template/{{ infra__type }}/terraform_variables.tf.j2'
3636
dest: "{{ infra__terraform_template_dir }}/infra/variables.tf"
3737
no_log: false
38-
39-
- name: Prompt to debug Terraform deployment
40-
ansible.builtin.pause:
41-
prompt: "Terraform infra files for Teardown created in {{ infra__terraform_template_dir }}/infra"
42-
when: debug_terraform | default(false) | bool

roles/infrastructure/tasks/setup_terraform.yml

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -23,18 +23,12 @@
2323
ansible.builtin.copy:
2424
src: "{{ infra__terraform_template_dir }}/infra/"
2525
dest: "{{ infra__terraform_workspace_dir }}/infra"
26-
# when: not workdir.stat.exists # NOTE: When uncommented won't override workspace dir if any changes to .tf are made.
2726

2827
- name: Copy Terraform infra code to the artefact directory
2928
ansible.builtin.copy:
3029
src: "{{ infra__terraform_template_dir }}/infra/"
3130
dest: "{{ infra__terraform_artefact_dir }}/infra"
3231

33-
- name: Prompt to debug Terraform deployment
34-
ansible.builtin.pause:
35-
prompt: "Ready to do Terraform apply on infra files in {{ infra__terraform_workspace_dir }}/infra"
36-
when: debug_terraform | default(false) | bool
37-
3832
- name: Applying Terraform
3933
community.general.terraform:
4034
project_path: "{{ infra__terraform_workspace_dir }}/infra"
@@ -45,11 +39,6 @@
4539
delay: 10
4640
until: tf_result is succeeded
4741

48-
- name: Prompt to debug Terraform deployment
49-
pause:
50-
prompt: "Terraform apply on infra files complete. Check AWS Console."
51-
when: debug_terraform | default(false) | bool
52-
5342
- name: Remove the Terraform template directory
5443
ansible.builtin.file:
5544
path: "{{ infra__terraform_template_dir }}/infra"

roles/infrastructure/tasks/teardown_terraform.yml

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,6 @@
2323
ansible.builtin.copy:
2424
src: "{{ infra__terraform_template_dir }}/infra/"
2525
dest: "{{ infra__terraform_workspace_dir }}/infra"
26-
# when: not workdir.stat.exists # TODO: This won't override if any changes to .tf are made. Good or Bad?
27-
28-
- name: Prompt to debug Terraform deployment
29-
ansible.builtin.pause:
30-
prompt: "Ready to do Terraform destroy on infra files in {{ infra__terraform_workspace_dir }}/infra"
31-
when: debug_terraform | default(false) | bool
3226

3327
- name: Destroy Terraform infra resources
3428
community.general.terraform:
@@ -40,11 +34,6 @@
4034
delay: 10
4135
until: tf_result is succeeded
4236

43-
- name: Prompt to debug Terraform deployment
44-
ansible.builtin.pause:
45-
prompt: "Terraform destroy on infra files complete. Check AWS Console."
46-
when: debug_terraform | default(false) | bool
47-
4837
- name: Remove the Terraform template directory
4938
ansible.builtin.file:
5039
path: "{{ infra__terraform_template_dir }}/infra"

roles/platform/tasks/initialize_aws_terraform.yml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,3 @@
7575
src: 'template/{{ plat__infra_type }}/plat_{{ plat__infra_type }}_authz_roles.tf.j2'
7676
dest: "{{ plat__terraform_template_dir }}/plat/plat_authz_roles.tf"
7777
no_log: false
78-
79-
- name: Prompt to debug Terraform deployment
80-
ansible.builtin.pause:
81-
prompt: "Terraform role & policy files created in {{ plat__terraform_template_dir }}/plat"
82-
when: debug_terraform | default(false) | bool

roles/platform/tasks/initialize_teardown_aws_terraform.yml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,3 @@
5656
ansible.builtin.file:
5757
path: "{{ __aws_policy_tmpdir.path }}"
5858
state: absent
59-
60-
- name: Prompt to debug Terraform deployment
61-
ansible.builtin.pause:
62-
prompt: "Terraform role & policy files for Teardown created in {{ plat__terraform_template_dir }}/plat"
63-
when: debug_terraform | default(false) | bool

roles/platform/tasks/setup_aws_env.yml

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -14,35 +14,6 @@
1414
# See the License for the specific language governing permissions and
1515
# limitations under the License.
1616

17-
- name: Debug variables with Terraform
18-
when: debug_terraform | default(false) | bool
19-
block:
20-
- name: Print variables used in cloudera.cloud.env
21-
ansible.builtin.debug:
22-
msg:
23-
- "name: {{ plat__env_name }}"
24-
- "state: started"
25-
- "credential: {{ plat__xacccount_credential_name }}"
26-
- "cloud: {{ plat__infra_type }}"
27-
- "region: {{ plat__region }}"
28-
- "default_sg: {{ plat__aws_security_group_default_id }}"
29-
- "knox_sg: {{ plat__aws_security_group_knox_id }}"
30-
- "log_location: {{ plat__aws_storage_location }}"
31-
- "log_identity: {{ plat__aws_log_instance_profile_arn }}"
32-
- "public_key_id: {{ plat__public_key_id }}"
33-
- "workload_analytics: {{ plat__workload_analytics }}"
34-
- "vpc_id: {{ plat__aws_vpc_id }}"
35-
- "subnet_ids: {{ plat__aws_subnet_ids }}"
36-
- "tags: {{ plat__tags }}"
37-
- "tunnel: {{ plat__tunnel }}"
38-
- "endpoint_access_scheme: {{ plat__endpoint_access_scheme | default(omit) }}"
39-
- "endpoint_access_subnets: {{ plat__aws_public_subnet_ids | default(omit) }}"
40-
- "freeipa instanceCountByGroup: {{ plat__env_freeipa }}"
41-
42-
- name: Prompt to debug Terraform deployment
43-
pause:
44-
prompt: "Ready to create CDP environment. Check variables to be used in cloudera.cloud.env."
45-
4617
- name: Set up CDP Environment Deployment on AWS
4718
cloudera.cloud.env:
4819
name: "{{ plat__env_name }}"

roles/platform/tasks/setup_aws_terraform_authz.yml

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -23,18 +23,12 @@
2323
ansible.builtin.copy:
2424
src: "{{ plat__terraform_template_dir }}/plat/"
2525
dest: "{{ plat__terraform_workspace_dir }}/plat"
26-
# when: not workdir.stat.exists # NOTE: When uncommented won't override workspace dir if any changes to .tf are made.
2726

2827
- name: Copy Terraform plat code to the artefact directory
2928
ansible.builtin.copy:
3029
src: "{{ plat__terraform_template_dir }}/plat/"
3130
dest: "{{ plat__terraform_artefact_dir }}/plat"
3231

33-
- name: Prompt to debug Terraform deployment
34-
ansible.builtin.pause:
35-
prompt: "Ready to do Terraform apply on role files in {{ plat__terraform_workspace_dir }}/plat"
36-
when: debug_terraform | default(false) | bool
37-
3832
- name: Applying Terraform
3933
community.general.terraform:
4034
project_path: "{{ plat__terraform_workspace_dir }}/plat"
@@ -45,11 +39,6 @@
4539
delay: 10
4640
until: tf_result is succeeded
4741

48-
- name: Prompt to debug Terraform deployment
49-
ansible.builtin.pause:
50-
prompt: "Terraform apply on role files complete. Check AWS Console."
51-
when: debug_terraform | default(false) | bool
52-
5342
- name: Remove the Terraform template directory
5443
ansible.builtin.file:
5544
path: "{{ plat__terraform_template_dir }}/plat/"

roles/platform/tasks/teardown_aws_terraform_authz.yml

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,6 @@
2929
ansible.builtin.copy:
3030
src: "{{ plat__terraform_template_dir }}/plat/"
3131
dest: "{{ plat__terraform_workspace_dir }}/plat"
32-
# when: not workdir.stat.exists # TODO: This won't override if any changes to .tf are made. Good or Bad?
33-
34-
- name: Prompt to debug Terraform deployment
35-
ansible.builtin.pause:
36-
prompt: "Ready to do Terraform destroy on role files in {{ plat__terraform_workspace_dir }}/plat"
37-
when: debug_terraform | default(false) | bool
3832

3933
- name: Destroy Terraform authz resources
4034
community.general.terraform:
@@ -46,11 +40,6 @@
4640
delay: 10
4741
until: tf_result is succeeded
4842

49-
- name: Prompt to debug Terraform deployment
50-
ansible.builtin.pause:
51-
prompt: "Terraform destroy on role files complete. Check AWS Console."
52-
when: debug_terraform | default(false) | bool
53-
5443
- name: Remove the Terraform template directory
5544
ansible.builtin.file:
5645
path: "{{ plat__terraform_template_dir }}/plat/"

0 commit comments

Comments
 (0)