Mercurial > hg > Ansible > fedora_qemu_debug_build
annotate main.yml @ 2:e8555f703e69
use python3
author | anatofuz |
---|---|
date | Sun, 26 May 2019 10:08:59 +0900 |
parents | d8ead3008bd2 |
children | 0b8c5ca67cfd |
rev | line source |
---|---|
0
bb6fff966de1
init project (add main.yml)
anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
1 # build debugging qemu from source |
bb6fff966de1
init project (add main.yml)
anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
2 # anatofuz@cr.ie.u-ryukyu.ac.jp |
bb6fff966de1
init project (add main.yml)
anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
3 # |
bb6fff966de1
init project (add main.yml)
anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
4 # rsync -av -e 'ssh -p 2222' ~/.ssh/id_rsa.pub xxx@localhost:.ssh/authorized_keys |
bb6fff966de1
init project (add main.yml)
anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
5 # screen -L ansible-playbook -i hosts main.yml --ask-become-pass |
bb6fff966de1
init project (add main.yml)
anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
6 # ssh localhost -p 2222 -l root 'cd /usr/src/kernels ; tar czf - fedora' | dd of=fedora26-kernel.tgz |
bb6fff966de1
init project (add main.yml)
anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
7 |
bb6fff966de1
init project (add main.yml)
anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
8 - hosts: all |
1 | 9 remote_user: syster_clown |
0
bb6fff966de1
init project (add main.yml)
anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
10 become: yes |
bb6fff966de1
init project (add main.yml)
anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
11 become_method: sudo |
bb6fff966de1
init project (add main.yml)
anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
12 vars: |
bb6fff966de1
init project (add main.yml)
anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
13 qemu_version: 4.0.0 |
1 | 14 csum: 13a93dfe75b86734326f8d5b475fde82ec692d5b5a338b4262aeeb6b0fa4e469 |
2 | 15 ansible_python_interpreter: /usr/bin/python3 |
0
bb6fff966de1
init project (add main.yml)
anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
16 |
bb6fff966de1
init project (add main.yml)
anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
17 pre_tasks: |
bb6fff966de1
init project (add main.yml)
anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
18 - name: Get ansible_user home directory |
bb6fff966de1
init project (add main.yml)
anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
19 shell: 'getent passwd "{{ansible_ssh_user}}" | cut -d: -f6' |
bb6fff966de1
init project (add main.yml)
anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
20 register: ansible_home_result |
bb6fff966de1
init project (add main.yml)
anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
21 |
bb6fff966de1
init project (add main.yml)
anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
22 - name: Set the fact for the other scripts to use |
bb6fff966de1
init project (add main.yml)
anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
23 set_fact: ansible_home='{{ansible_home_result.stdout}}' |
bb6fff966de1
init project (add main.yml)
anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
24 |
bb6fff966de1
init project (add main.yml)
anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
25 tasks: |
bb6fff966de1
init project (add main.yml)
anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
26 - name: install qemu dev packages |
1 | 27 dnf: |
2 | 28 name: ['wget', 'gcc', 'gdb', 'make', 'pixman-devel', 'python'] |
1 | 29 state: present |
0
bb6fff966de1
init project (add main.yml)
anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
30 |
2 | 31 - name: create_download_src_directory |
0
bb6fff966de1
init project (add main.yml)
anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
32 file: path={{ ansible_home }}/src |
bb6fff966de1
init project (add main.yml)
anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
33 state=directory |
bb6fff966de1
init project (add main.yml)
anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
34 |
2 | 35 - name: create_build_directory |
36 file: path={{ ansible_home }}/build | |
37 state=directory | |
38 | |
0
bb6fff966de1
init project (add main.yml)
anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
39 - name: download qemu source code |
bb6fff966de1
init project (add main.yml)
anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
40 get_url: url=https://download.qemu.org/qemu-{{ qemu_version }}.tar.xz |
bb6fff966de1
init project (add main.yml)
anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
41 dest=~/src/qemu-{{ qemu_version }}.tar.xz sha256sum={{ csum }} |
bb6fff966de1
init project (add main.yml)
anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
42 register: download_qemu_code |
bb6fff966de1
init project (add main.yml)
anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
43 |
bb6fff966de1
init project (add main.yml)
anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
44 - name: unarchive a qemu sorce |
bb6fff966de1
init project (add main.yml)
anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
45 shell: "{{ item }}" |
bb6fff966de1
init project (add main.yml)
anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
46 with_items: |
2 | 47 - tar -xvf qemu-{{ qemu_version }}.tar.xz |
0
bb6fff966de1
init project (add main.yml)
anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
48 args: |
1 | 49 chdir: "{{ ansible_home }}/src/" |
0
bb6fff966de1
init project (add main.yml)
anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
50 |
2 | 51 - name: execute configure |
52 shell: './configure --target-list=i386-softmmu,x86_64-softmmu,arm-softmmu,arm-linux-user --enable-kvm --enable-debug --prefix={{ ansible_home }}/build' | |
53 args: | |
54 chdir: "{{ ansible_home }}/src/qemu-{{ qemu_version }}" | |
0
bb6fff966de1
init project (add main.yml)
anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
55 |
bb6fff966de1
init project (add main.yml)
anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
56 # |
bb6fff966de1
init project (add main.yml)
anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
57 #- name: install kernel |
bb6fff966de1
init project (add main.yml)
anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
58 # shell: "{{ item }}" |
bb6fff966de1
init project (add main.yml)
anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
59 # with_items: |
bb6fff966de1
init project (add main.yml)
anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
60 # - make install |
bb6fff966de1
init project (add main.yml)
anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
61 # args: |
bb6fff966de1
init project (add main.yml)
anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
62 # chdir: /usr/src/kernels/fedora |