Browse Source

remove unnecessary code

master
parent
commit
b153a2f5a7
1 changed files with 7 additions and 15 deletions
  1. +7
    -15
      tasks/main.yaml

+ 7
- 15
tasks/main.yaml View File

@@ -3,7 +3,7 @@
- name: required debian packages - name: required debian packages
apt: apt:
pkg: pkg:
# ansible
# required by ansible
- unzip - unzip


- name: get latest terraform release version - name: get latest terraform release version
@@ -11,11 +11,11 @@
url: https://checkpoint-api.hashicorp.com/v1/check/terraform url: https://checkpoint-api.hashicorp.com/v1/check/terraform
register: terraform_release_query register: terraform_release_query


- name: check if terraform version matches
command: terraform --version
failed_when: False
changed_when: False
register: terraform_version_command
# - name: check if terraform version matches
# command: terraform --version
# failed_when: False
# changed_when: False
# register: terraform_version_command


- name: get terraform release checksums - name: get terraform release checksums
uri: uri:
@@ -23,14 +23,6 @@
return_content: yes return_content: yes
register: terraform_release_checksums_uri register: terraform_release_checksums_uri


- debug:
msg:
terraform_current_version: "{{ terraform_current_version }}"
ansible_architecture: "{{ ansible_architecture }}"
terraform_download_checksum: "{{ terraform_download_checksum }}"
terraform_download_filename: "{{ terraform_download_filename }}"
terraform_download_checksum: "{{ terraform_download_checksum }}"

- name: download terraform release - name: download terraform release
get_url: get_url:
url: "{{ terraform_download_url }}" url: "{{ terraform_download_url }}"
@@ -38,7 +30,7 @@
checksum: "{{ terraform_download_checksum }}" checksum: "{{ terraform_download_checksum }}"
register: terraform_download register: terraform_download


- name: extract and install Terraform
- name: extract and install terraform
unarchive: unarchive:
src: "{{terraform_download_dest}}" src: "{{terraform_download_dest}}"
dest: /usr/local/bin dest: /usr/local/bin


Loading…
Cancel
Save