Browse Source

current

master
parent
commit
f088d31cfe
4 changed files with 25 additions and 6 deletions
  1. +1
    -1
      defaults/main.yml
  2. +19
    -2
      tasks/main.yml
  3. +3
    -3
      templates/debootstrap_args.j2
  4. +2
    -0
      vars/main.yml

+ 1
- 1
defaults/main.yml View File

@@ -1,4 +1,4 @@
debian_mirror: http://httpredir.debian.org/debian
debootstrap_suite: jessie
debootstrap_mirror: http://debian.thengo.net/debian
debootstrap_arch: amd64
debootstrap_include: {}

+ 19
- 2
tasks/main.yml View File

@@ -1,7 +1,7 @@
---

- setup:
gather_timeout: 30
gather_subset: '!all'

- include: debian.yml
when: ansible_os_family == "Debian"
@@ -9,5 +9,22 @@
- include: gentoo.yml
when: ansible_os_family == "Gentoo"

#- name: debootstrap download
# command:
# debootstrap
# --download-only
# --make-tarball={{debootstrap_tarball}}
# {{debootstrap_args}}
# {{debootstrap_suite}}
# {{debootstrap_download_directory}}
# {{debian_mirror}}
# args:
# creates: "{{debootstrap_tarball}}"

- name: debootstrap
command: debootstrap {{debootstrap_args}}
command:
debootstrap
{{debootstrap_args}}
{{debootstrap_suite}}
{{root_target_directory}}
{{debian_mirror}}

+ 3
- 3
templates/debootstrap_args.j2 View File

@@ -1,7 +1,7 @@
--arch={{debootstrap_arch}}
{% if debootstrap_variant is defined %}
--variant={{debootstrap_variant}}
{% endif %}
{% if debootstrap_include|length >0 %}
--include={{debootstrap_include|join(',')}}
{% endif %}
{{debootstrap_suite}}
{{debootstrap_target}}
{{debootstrap_mirror}}

+ 2
- 0
vars/main.yml View File

@@ -1 +1,3 @@
debootstrap_args: "{{ lookup('template', 'debootstrap_args.j2') }}"
debootstrap_download_directory: /var/cache/debootstrap/{{debootstrap_suite}}-{{debootstrap_arch}}/
debootstrap_tarball: /var/cache/debootstrap/{{debootstrap_suite}}-{{debootstrap_arch}}-{{debootstrap_variant|default('default')}}-{{debootstrap_include|sort()|join('-')}}.tar

Loading…
Cancel
Save