Mercurial > hg > Ansible > fedora_kernel_build
changeset 9:42be4c53efc5
modified main.yml
author | matac42 <matac@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Mon, 21 Dec 2020 20:04:27 +0900 |
parents | b0ed6906392e |
children | 3d1d5f6304c9 |
files | main.yml |
diffstat | 1 files changed, 44 insertions(+), 31 deletions(-) [+] |
line wrap: on
line diff
--- a/main.yml Sun Dec 17 22:29:08 2017 +0900 +++ b/main.yml Mon Dec 21 20:04:27 2020 +0900 @@ -11,23 +11,24 @@ # ssh localhost -p 2222 -l root 'cd /usr/src/kernels ; tar czf - fedora' | dd of=fedora26-kernel.tgz - hosts: all - remote_user: xxxxx + remote_user: ie-user become: yes become_method: sudo tasks: - name: install kernel dev packages - dnf: name={{ item }} state=present - with_items: - - fedpkg - - fedora-packager - - rpmdevtools - - ncurses-devel - - pesign - - libselinux-python + dnf: + state: present + name: + - fedpkg + - fedora-packager + - rpmdevtools + - ncurses-devel + - pesign + - libselinux-python3 - name: fedpkg clone - command: fedpkg clone -a kernel + command: fedpkg clone -a --depth 1 kernel args: chdir: /usr/src/ creates: /usr/src/kernel @@ -69,37 +70,49 @@ dest: /usr/src/kernels/fedora/.config - name: make olddefconfig - shell: "{{ item }}" - with_items: - - make olddefconfig - args: + become: yes + make: + target: olddefconfig chdir: /usr/src/kernels/fedora + params: + NUM_THREADS: 8 - name: make kernel - shell: "{{ item }}" - with_items: - - make -j8 - args: + become: yes + make: chdir: /usr/src/kernels/fedora + params: + NUM_THREADS: 8 - name: make bzImage - shell: "{{ item }}" - with_items: - - make bzImage - args: + become: yes + make: + target: bzImage chdir: /usr/src/kernels/fedora + params: + NUM_THREADS: 8 - name: make modules - shell: "{{ item }}" - with_items: - - make -j8 modules - - make -j8 modules_install - args: + become: yes + make: + target: modules chdir: /usr/src/kernels/fedora + params: + NUM_THREADS: 8 + + - name: make modules_install + become: yes + make: + target: modules_install + chdir: /usr/src/kernels/fedora + params: + NUM_THREADS: 8 + - name: install kernel - shell: "{{ item }}" - with_items: - - make install - args: + become: yes + make: + target: install chdir: /usr/src/kernels/fedora + params: + NUM_THREADS: 8