Skip to content

Commit

Permalink
Change archiso role
Browse files Browse the repository at this point in the history
  • Loading branch information
Koaxiel committed Dec 30, 2016
1 parent 2f39e4b commit 63a83fc
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
1 change: 1 addition & 0 deletions roles/archiso/defaults/main.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
---
# defaults file for archiso
archiso_dir: "/tmp"
16 changes: 7 additions & 9 deletions roles/archiso/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
---
# tasks file for archiso
- name: Install archiso
pacman:
name: archiso
Expand All @@ -11,17 +10,16 @@
path: "{{ item }}"
state: directory
with_items:
- /tmp/archlive/out
- /tmp/archlive/airootfs/etc/systemd/system/[email protected]
- "{{ archiso_dir }}/archlive/airootfs/etc/systemd/system/[email protected]"

- name: Copy releng profile
synchronize:
src: "/usr/share/archiso/configs/releng/"
dest: "/tmp/archlive"
dest: "{{ archiso_dir }}/archlive"

- name: Add ansible package
lineinfile:
dest: "/tmp/archlive/packages.both"
dest: "{{ archiso_dir }}/archlive/packages.both"
insertbefore: BOF
state: present
line: "ansible"
Expand All @@ -32,17 +30,17 @@
[Service]
ExecStop=
ExecStop=/usr/bin/dhcpcd -k %I
dest: "/tmp/archlive/airootfs/etc/systemd/system/[email protected]/override.conf"
dest: "{{ archiso_dir }}/archlive/airootfs/etc/systemd/system/[email protected]/override.conf"

- name: Enable sshd
lineinfile:
dest: "/tmp/archlive/airootfs/root/customize_airootfs.sh"
dest: "{{ archiso_dir }}/archlive/airootfs/root/customize_airootfs.sh"
line: "systemctl enable sshd.socket"

- name: Set root password
lineinfile:
dest: "/tmp/archlive/airootfs/root/customize_airootfs.sh"
dest: "{{ archiso_dir }}/archlive/airootfs/root/customize_airootfs.sh"
line: "echo 'root:toto' | chpasswd"

- name: Build iso
command: "sh /tmp/archlive/build.sh -o /tmp/archlive/out -w /tmp/archlive/work -D /tmp/archlive/arch"
command: "bash {{ archiso_dir }}/archlive/build.sh -w {{ archiso_dir }}/archlive/work"

0 comments on commit 63a83fc

Please sign in to comment.