-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
61 additions
and
95 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
archlinux*.iso | ||
archlive |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
[localhost] | ||
localhost ansible_python_interpreter=/usr/bin/python2 ansible_connection=local | ||
localhost ansible_connection=local |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,79 +20,57 @@ | |
dest: "{{ archiso_dir }}/archlive" | ||
become: yes | ||
|
||
- name: Change airootfs size | ||
lineinfile: | ||
backrefs: yes | ||
path: "{{ item }}" | ||
regexp: '^(options(?!.*\bcow_spacesize=1G\b).*)$' | ||
line: '\1 cow_spacesize=1G' | ||
become: yes | ||
with_items: | ||
- "{{ archiso_dir }}/archlive/efiboot/loader/entries/archiso-x86_64-cd.conf" | ||
- "{{ archiso_dir }}/archlive/efiboot/loader/entries/archiso-x86_64-usb.conf" | ||
|
||
- name: Add ansible & git package | ||
lineinfile: | ||
dest: "{{ archiso_dir }}/archlive/packages.x86_64" | ||
path: "{{ archiso_dir }}/archlive/packages.x86_64" | ||
insertbefore: BOF | ||
state: present | ||
line: "{{ item }}" | ||
become: yes | ||
with_items: | ||
loop: | ||
- ansible | ||
- git | ||
|
||
- name: Git clone koaxiel | ||
git: | ||
depth: 1 | ||
repo: "https://github.com/Koaxiel/koaxiel.git" | ||
dest: "{{ archiso_dir }}/archlive/airootfs/root/koaxiel/" | ||
|
||
- name: Override [email protected] | ||
copy: | ||
content: | | ||
[Service] | ||
ExecStop= | ||
ExecStop=/usr/bin/dhcpcd -k %I | ||
dest: "{{ archiso_dir }}/archlive/airootfs/etc/systemd/system/[email protected]/override.conf" | ||
become: yes | ||
|
||
- name: Change mirrorlist | ||
lineinfile: | ||
dest: "{{ archiso_dir }}/archlive/airootfs/root/customize_airootfs.sh" | ||
line: "curl -o /etc/pacman.d/mirrorlist 'https://www.archlinux.org/mirrorlist/?country=FR&protocol=http&protocol=https&ip_version=4&ip_version=6&use_mirror_status=on'" | ||
insertbefore: 'sed -i "s/#Server/Server/g" /etc/pacman.d/mirrorlist' | ||
become: yes | ||
|
||
- name: Enable sshd | ||
lineinfile: | ||
dest: "{{ archiso_dir }}/archlive/airootfs/root/customize_airootfs.sh" | ||
line: "systemctl enable sshd.service" | ||
become: yes | ||
|
||
- name: Set root password | ||
- name: Permit ssh with empty password | ||
lineinfile: | ||
dest: "{{ archiso_dir }}/archlive/airootfs/root/customize_airootfs.sh" | ||
line: "echo 'root:toto' | chpasswd" | ||
path: "{{ archiso_dir }}/archlive/airootfs/etc/ssh/sshd_config" | ||
insertafter: '#PermitEmptyPasswords no' | ||
line: PermitEmptyPasswords yes | ||
become: yes | ||
|
||
- name: Set locale.conf | ||
- name: Install locale config | ||
copy: | ||
src: files/locale.conf | ||
dest: "{{ archiso_dir }}/archlive/airootfs/etc/locale.conf" | ||
src: 'files/{{ item }}' | ||
dest: '{{ archiso_dir }}/archlive/airootfs/etc/{{ item }}' | ||
become: yes | ||
loop: | ||
- locale.conf | ||
- vconsole.conf | ||
|
||
- name: Set vconsole | ||
copy: | ||
src: files/vconsole.conf | ||
dest: "{{ archiso_dir }}/archlive/airootfs/etc/vconsole.conf" | ||
become: yes | ||
- name: Add mirrolist | ||
get_url: | ||
url: 'https://www.archlinux.org/mirrorlist/?country=FR&protocol=http&protocol=https&ip_version=4&ip_version=6&use_mirror_status=on' | ||
dest: '{{ archiso_dir }}/archlive/airootfs/etc/pacman.d/mirrorlist' | ||
|
||
- name: Add wpa_supplicant-wired.conf in root | ||
- name: Add wpa_supplicant-wired.conf in root folder | ||
copy: | ||
src: files/wpa_supplicant-wired.conf | ||
dest: "{{ archiso_dir }}/archlive/airootfs/root/wpa_supplicant-wired.conf" | ||
become: yes | ||
|
||
- name: Build iso | ||
command: "bash {{ archiso_dir }}/archlive/build.sh -v -w {{ archiso_dir }}/archlive/work -o {{ archiso_dir }}" | ||
command: "mkarchiso -v -w {{ archiso_dir }}/archlive/work -o {{ archiso_dir }} {{ archiso_dir }}/archlive" | ||
become: yes | ||
|
||
- name: Copy image to libvirt storage | ||
copy: | ||
src: '{{ item }}' | ||
dest: '/var/lib/libvirt/images/archlinux.iso' | ||
with_fileglob: '*.iso' | ||
become: yes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters