Skip to content

Commit

Permalink
Cosmetic changes
Browse files Browse the repository at this point in the history
  • Loading branch information
sevein committed May 7, 2018
1 parent 59bffe4 commit ea92c36
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions tasks/ss-osdeps.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
---
# osdeps filenames named "distribution"-"major_version".json
# example: CentOS-7.yml (case sensitive)
- set_fact:
- set_fact:
osdeps_file: "{{ ansible_distribution }}-{{ ansible_distribution_major_version }}.json"
tmpdirname: "/tmp/amsrc-{{ ansible_date_time.date }}-{{ ansible_date_time.epoch }}"

# become: false is required in tasks delegated to localhost
# become: false is required in tasks delegated to localhost
# (to avoid "sudo: a password is required" error)
- name: "create temp directory in local machine to store osdeps files"
file:
file:
path: "{{ tmpdirname }}/osdeps"
state: "directory"
become: false
Expand All @@ -27,13 +27,13 @@
fetch:
src: "{{ archivematica_src_dir }}/archivematica-storage-service/osdeps/{{ osdeps_file }}"
dest: "{{ tmpdirname }}/osdeps/archivematica-storage-service/{{ osdeps_file }}"
flat: "yes"
become: false # ansible recommends to run fetch without become whenever possible
flat: "yes"
become: false # ansible recommends to run fetch without become whenever possible
when: osdeps

# create a namespace for osdeps file variables
- name: "include variables from retrieved dependencies files in namespace storage_service"
include_vars:
include_vars:
file: "{{ tmpdirname }}/osdeps/archivematica-storage-service/{{ osdeps_file }}"
name: "storage_service"
when: osdeps
Expand All @@ -47,9 +47,9 @@
name: "{{ item.name }}"
state: "{{ item.state }}"
with_items: "{{ storage_service.osdeps_packages }}"
when:
- osdeps
- storage_service is defined
when:
- osdeps
- storage_service is defined
- storage_service.osdeps_packages is defined
- storage_service.osdeps_packages

Expand All @@ -58,9 +58,9 @@
name: "{{ item.name }}"
state: "{{ item.state }}"
with_items: "{{ storage_service.osdeps_packages_2 }}"
when:
- osdeps
- storage_service is defined
when:
- osdeps
- storage_service is defined
- storage_service.osdeps_packages_2 is defined
- storage_service.osdeps_packages_2

Expand All @@ -69,9 +69,9 @@
name: "{{ item.name }}"
state: "{{ item.state }}"
with_items: "{{ storage_service.osdeps_packages_3 }}"
when:
- osdeps
- storage_service is defined
when:
- osdeps
- storage_service is defined
- storage_service.osdeps_packages_3 is defined
- storage_service.osdeps_packages_3

Expand Down

0 comments on commit ea92c36

Please sign in to comment.