-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor task names for descriptive OS levels.
- Loading branch information
1 parent
c3c4510
commit f0dfa7e
Showing
2 changed files
with
23 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,44 @@ | ||
--- | ||
# tasks file for packer | ||
# tasks file for packer | Debian/Ubuntu Family | ||
|
||
- name: "Downloading archive for {{ packer_app }} {{ packer_version }} temporarily to {{ packer_dl_loc }} on Debian based systems" | ||
- name: Debian/Ubuntu Family | Downloading archive for {{ packer_app }} {{ packer_version }} temporarily to {{ packer_dl_loc }} | ||
get_url: | ||
url: "{{ packer_dl_url }}/{{ packer_app }}/{{ packer_version }}/{{ packer_app }}_{{ packer_version }}_{{ packer_osarch }}.zip" | ||
dest: "{{ packer_dl_loc }}" | ||
|
||
# - name: Install python3-apt on Debian based systems, required for package_facts. | ||
# apt: | ||
# name: python3-apt | ||
# state: present | ||
# force_apt_get: yes | ||
# update_cache: yes | ||
# - name: Gather package facts to verify if unzip is installed on Debian based systems | ||
# - name: Gather package facts to verify if unzip is installed | ||
# package_facts: | ||
# manager: apt | ||
- name: Install unzip if it is currently not in installed state on Debian based systems. | ||
|
||
- name: Debian/Ubuntu Family | Install unzip if it is currently not in installed state | ||
apt: | ||
name: unzip | ||
state: present | ||
force_apt_get: yes | ||
update_cache: yes | ||
# when: packages['unzip'] is not defined | ||
- name: "Unarchive {{ packer_app }} on Debian based systems." | ||
|
||
- name: Debian/Ubuntu Family | Unarchive {{ packer_app }} | ||
unarchive: | ||
src: "{{ packer_dl_loc }}/{{ packer_app }}_{{ packer_version }}_{{ packer_osarch }}.zip" | ||
dest: "{{ packer_bin_path }}" | ||
remote_src: true | ||
# - name: Uninstalling unzip as it was originally not in installed state on Debian based systems. | ||
|
||
# - name: Uninstalling unzip as it was originally not in installed state | ||
# apt: | ||
# name: unzip | ||
# state: absent | ||
# force_apt_get: yes | ||
# update_cache: yes | ||
# when: packages['unzip'] is not defined | ||
- name: "Remove {{ packer_app }} archive file from Debian based systems." | ||
|
||
- name: Debian/Ubuntu Family | Remove {{ packer_app }} archive file | ||
file: | ||
path: "{{ packer_dl_loc }}/{{ packer_app }}_{{ packer_version }}_{{ packer_osarch }}.zip" | ||
state: absent |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,35 @@ | ||
--- | ||
# tasks file for packer | ||
# tasks file for packer | EL Family | ||
|
||
- name: "Downloading archive for {{ packer_app }} {{ packer_version }} temporarily to {{ packer_dl_loc }} on EL based systems" | ||
- name: EL Family | Downloading archive for {{ packer_app }} {{ packer_version }} temporarily to {{ packer_dl_loc }} | ||
get_url: | ||
url: "{{ packer_dl_url }}/{{ packer_app }}/{{ packer_version }}/{{ packer_app }}_{{ packer_version }}_{{ packer_osarch }}.zip" | ||
dest: "{{ packer_dl_loc }}" | ||
|
||
# - name: Gather package facts to verify if unzip is installed on EL based systems | ||
# package_facts: | ||
# manager: rpm | ||
- name: Install unzip if it is currently not in installed state on EL based systems. | ||
|
||
- name: EL Family | Install unzip if it is currently not in installed state | ||
yum: | ||
name: unzip | ||
state: present | ||
update_cache: yes | ||
# when: packages['unzip'] is not defined | ||
- name: "{{ packer_app }}_unarchive on EL based systems" | ||
|
||
- name: EL Family | {{ packer_app }}_unarchive | ||
unarchive: | ||
src: "{{ packer_dl_loc }}/{{ packer_app }}_{{ packer_version }}_{{ packer_osarch }}.zip" | ||
dest: "{{ packer_bin_path }}" | ||
remote_src: true | ||
# - name: Uninstalling unzip from Debian based systems as it was originally not in installed state on EL based systems. | ||
|
||
# - name: Uninstalling unzip from Debian based systems as it was originally not in installed state | ||
# yum: | ||
# name: unzip | ||
# state: absent | ||
# when: packages['unzip'] is not defined | ||
- name: "Remove {{ packer_app }} archive from EL based systems" | ||
|
||
- name: EL Family | Remove {{ packer_app }} archive | ||
file: | ||
path: "{{ packer_dl_loc }}/{{ packer_app }}_{{ packer_version }}_{{ packer_osarch }}.zip" | ||
state: absent |