1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556 |
- ---
- - hosts: lx-builder
- gather_facts: no
- become: true
- become_method: su
- roles:
- - debian-ansible-target
-
- - hosts: lx-builder
- vars_files: [ vars.yml ]
- become: true
- become_method: su
- pre_tasks:
- - name: create .ssh folder
- file:
- path: /root/.ssh
- mode: 0700
- state: directory
- - name: copy ssh-id
- copy:
- src: "{{ lookup('env','HOME') }}/.ssh/id_rsa.pub"
- dest: /root/.ssh/authorized_keys
- mode: 0600
- tasks:
- - name: install packages
- apt:
- name:
- - debootstrap
- - git
- - curl
- - name: git checkout lx-brand image builder
- git:
- repo: https://github.com/joyent/debian-lx-brand-image-builder.git
- dest: /root/debian-lx-brand-image-builder/
- - name: create install folder
- file:
- dest: /root/lx
- state: directory
- - name: build lx
- tags: rebuild_lx
- command: "./install -r {{ image_release }} -d /root/lx -m {{ image_archive_mirror }} -i {{ image_name_short }} -p {{ image_name_full }} -D {{ image_description }}"
- args:
- chdir: /root/debian-lx-brand-image-builder/
- - name: copy lx folder to /tmp
- command: "cp -a /root/debian-lx-brand-image-builder /tmp/"
- - name: make lx folter in /tmp readable for everybody
- file:
- dest: /tmp/debian-lx-brand-image-builder
- mode: "o+r"
- recurse: true
|