cosmetic changes
authorChristian Pointner <equinox@realraum.at>
Fri, 4 May 2018 19:14:48 +0000 (21:14 +0200)
committerChristian Pointner <equinox@realraum.at>
Fri, 4 May 2018 19:14:48 +0000 (21:14 +0200)
ansible/.gitignore
ansible/roles/openwrt-image/defaults/main.yml
ansible/roles/openwrt-image/tasks/00-fetch.yml
ansible/roles/openwrt-image/tasks/02-prepare.yml
ansible/roles/openwrt-image/tasks/main.yml
ansible/tuer.yml

index 3c4fe7e..808abb8 100644 (file)
@@ -1,7 +1,5 @@
 /log
 /gpg/vault-keyring.gpg~
-/files/openwrt
-/files/.cache
 *.pyc
 *.retry
 .*.sw?
index 6c94890..e0724a8 100644 (file)
@@ -1,5 +1,6 @@
+---
 openwrt_release: 17.01.4
-download_dir: .cache/openwrt
+openwrt_download_dir: .cache/openwrt
 openwrt_tarball_basename: lede-imagebuilder-{{ openwrt_release }}-{{ openwrt_arch }}{% if openwrt_target != 'generic' %}-{{ openwrt_target }}{% endif %}.Linux-x86_64
 openwrt_tarball_name: "{{ openwrt_tarball_basename }}.tar.xz"
 openwrt_target: generic
index b3da57f..a69e65b 100644 (file)
@@ -1,8 +1,9 @@
+---
 - name: Create download directory
   file:
-    dest: "{{ download_dir }}"
+    dest: "{{ openwrt_download_dir }}"
     state: directory
-  
+
 - block:
     - name: Generate OpenWrt download URLs
       set_fact:
     - name: Download sha256sums
       get_url:
         url: "{{ openwrt_url }}/sha256sums"
-        dest: "{{ download_dir }}/{{ openwrt_tarball_basename }}.sha256"
+        dest: "{{ openwrt_download_dir }}/{{ openwrt_tarball_basename }}.sha256"
 
     - name: Download sha256sums.asc
       get_url:
         url: "{{ openwrt_url }}/sha256sums.asc"
-        dest: "{{ download_dir }}/{{ openwrt_tarball_basename }}.sha256.asc"
+        dest: "{{ openwrt_download_dir }}/{{ openwrt_tarball_basename }}.sha256.asc"
 
     - name: Check OpenPGP signature
-      command: gpg --verify "{{ download_dir }}/{{ openwrt_tarball_basename }}.sha256.asc"
+      command: gpg --verify "{{ openwrt_download_dir }}/{{ openwrt_tarball_basename }}.sha256.asc"
       changed_when: False
 
     - name: Extract SHA256 hash of the imagebuilder archive
-      command: grep '{{ openwrt_tarball_name }}' "{{ download_dir }}/{{ openwrt_tarball_basename }}.sha256"
+      command: grep '{{ openwrt_tarball_name }}' "{{ openwrt_download_dir }}/{{ openwrt_tarball_basename }}.sha256"
       register: sha256
       changed_when: False
 
     - name: Download imagebuilder
       get_url:
         url: "{{ openwrt_url }}/{{ openwrt_tarball_name }}" #lede-imagebuilder-{{ openwrt_release }}-{{ openwrt_arch }}.Linux-x86_64.tar.xz"
-        dest: "{{ download_dir }}/{{ openwrt_tarball_name }}"
+        dest: "{{ openwrt_download_dir }}/{{ openwrt_tarball_name }}"
         checksum: sha256:{{ sha256.stdout.split(' ') | first }}
 
     # /!\ This needs to be the last task in 00-fetch.yml
 #    - set_fact:
 #        openwrt_imgbuilder_tarball: >
-#          {{ download_dir }}/{{ openwrt_tarball_name }}
-        
+#          {{ openwrt_download_dir }}/{{ openwrt_tarball_name }}
+
   rescue:
     - name: Delete downloaded artifacts
       file:
         path: "{{ item }}"
         state: absent
       with_items:
-        - "{{ download_dir }}/{{ openwrt_tarball_basename }}.sha256"
-        - "{{ download_dir }}/{{ openwrt_tarball_basename }}.sha256.asc"
-        - "{{ download_dir }}/{{ openwrt_tarball_name }}"
+        - "{{ openwrt_download_dir }}/{{ openwrt_tarball_basename }}.sha256"
+        - "{{ openwrt_download_dir }}/{{ openwrt_tarball_basename }}.sha256.asc"
+        - "{{ openwrt_download_dir }}/{{ openwrt_tarball_name }}"
     - fail:
         msg: Something borked
index f136f89..d182a5b 100644 (file)
@@ -1,3 +1,4 @@
+---
 - include: 00-fetch.yml
   when: openwrt_imgbuilder_tarball is not defined
 
 - block:
 #    - unarchive:
 #        copy: False
-#        src:  "{{ download_dir }}/{{ openwrt_tarball_name }}"
+#        src:  "{{ openwrt_download_dir }}/{{ openwrt_tarball_name }}"
 #        dest: "{{ openwrt_imgbuilder_dir }}"
 
     - name: Decompress the OpenWrt image builder
       command: >-
-        tar -xf  "{{ download_dir }}/{{ openwrt_tarball_name }}"
+        tar -xf  "{{ openwrt_download_dir }}/{{ openwrt_tarball_name }}"
             -C   "{{ openwrt_imgbuilder_dir     }}"
 
 #    - include: 02-prepare.yml
index a55e085..c73b047 100644 (file)
@@ -1,3 +1,4 @@
+---
 - hosts: torwaechter
   connection: local
   pre_tasks: