Skip to content

Commit

Permalink
Merge pull request #2 from nl2go/feature/version
Browse files Browse the repository at this point in the history
Introduce version property and bumpversion
  • Loading branch information
dirkaholic authored Jan 13, 2020
2 parents 20ff2f7 + d6149d2 commit e0fd99d
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 11 deletions.
6 changes: 6 additions & 0 deletions .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[bumpversion]
commit = True
tag = True
current_version = 1.0.0

[bumpversion:file:playbooks/roles/debian9-hetzner/defaults/main.yml]
1 change: 1 addition & 0 deletions playbooks/roles/debian9-hetzner/defaults/main.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
---
hetzner_debian9_image_version: 1.0.0
intel_driver_module: e1000e
intel_driver_version: 3.6.0
intel_driver_download_location: https://downloadmirror.intel.com/15817/eng/{{ intel_driver_module }}-{{ intel_driver_version }}.tar.gz
14 changes: 3 additions & 11 deletions playbooks/roles/debian9-hetzner/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,26 +52,18 @@
- name: Update grub config
shell: update-grub

- name: Run command to get package timestamp
command: "date +%Y%m%d%H%M%S"
register: date_output

- name: Set package timestamp name
set_fact:
package_timestamp: "{{ date_output.stdout }}"

- name: Create directory for image
file:
path: /osimage
state: directory

- name: Create OS image package
shell: tar zcvf Debian-911-stretch-64-custom-{{ package_timestamp }}.tar.gz /bin /boot /etc /home /lib /lib64 /media /mnt /opt /root /run /sbin /srv /tmp /usr /var
shell: tar zcvf Debian-911-stretch-64-custom-{{ hetzner_debian9_image_version }}.tar.gz /bin /boot /etc /home /lib /lib64 /media /mnt /opt /root /run /sbin /srv /tmp /usr /var
args:
chdir: /osimage

- name: Move image file to /vagrant directory
copy:
src: /osimage/Debian-911-stretch-64-custom-{{ package_timestamp }}.tar.gz
dest: /vagrant/Debian-911-stretch-64-custom-{{ package_timestamp }}.tar.gz
src: /osimage/Debian-911-stretch-64-custom-{{ hetzner_debian9_image_version }}.tar.gz
dest: /vagrant/Debian-911-stretch-64-custom-{{ hetzner_debian9_image_version }}.tar.gz
remote_src: True

0 comments on commit e0fd99d

Please sign in to comment.