comparison main.yml @ 2:e8555f703e69

use python3
author anatofuz
date Sun, 26 May 2019 10:08:59 +0900
parents d8ead3008bd2
children 0b8c5ca67cfd
comparison
equal deleted inserted replaced
1:d8ead3008bd2 2:e8555f703e69
10 become: yes 10 become: yes
11 become_method: sudo 11 become_method: sudo
12 vars: 12 vars:
13 qemu_version: 4.0.0 13 qemu_version: 4.0.0
14 csum: 13a93dfe75b86734326f8d5b475fde82ec692d5b5a338b4262aeeb6b0fa4e469 14 csum: 13a93dfe75b86734326f8d5b475fde82ec692d5b5a338b4262aeeb6b0fa4e469
15 ansible_python_interpreter: /usr/bin/python3
15 16
16 pre_tasks: 17 pre_tasks:
17 - name: Get ansible_user home directory 18 - name: Get ansible_user home directory
18 shell: 'getent passwd "{{ansible_ssh_user}}" | cut -d: -f6' 19 shell: 'getent passwd "{{ansible_ssh_user}}" | cut -d: -f6'
19 register: ansible_home_result 20 register: ansible_home_result
22 set_fact: ansible_home='{{ansible_home_result.stdout}}' 23 set_fact: ansible_home='{{ansible_home_result.stdout}}'
23 24
24 tasks: 25 tasks:
25 - name: install qemu dev packages 26 - name: install qemu dev packages
26 dnf: 27 dnf:
27 name: ['wget', 'gcc', 'gdb', 'make', 'pixman-devel'] 28 name: ['wget', 'gcc', 'gdb', 'make', 'pixman-devel', 'python']
28 state: present 29 state: present
29 30
30 - name: create_download_src_direcoty 31 - name: create_download_src_directory
31 file: path={{ ansible_home }}/src 32 file: path={{ ansible_home }}/src
33 state=directory
34
35 - name: create_build_directory
36 file: path={{ ansible_home }}/build
32 state=directory 37 state=directory
33 38
34 - name: download qemu source code 39 - name: download qemu source code
35 get_url: url=https://download.qemu.org/qemu-{{ qemu_version }}.tar.xz 40 get_url: url=https://download.qemu.org/qemu-{{ qemu_version }}.tar.xz
36 dest=~/src/qemu-{{ qemu_version }}.tar.xz sha256sum={{ csum }} 41 dest=~/src/qemu-{{ qemu_version }}.tar.xz sha256sum={{ csum }}
37 register: download_qemu_code 42 register: download_qemu_code
38 43
39 - name: unarchive a qemu sorce 44 - name: unarchive a qemu sorce
40 shell: "{{ item }}" 45 shell: "{{ item }}"
41 with_items: 46 with_items:
42 - tar -xvf qemu-{{ qemu_version }}.tar.xv 47 - tar -xvf qemu-{{ qemu_version }}.tar.xz
43 args: 48 args:
44 chdir: "{{ ansible_home }}/src/" 49 chdir: "{{ ansible_home }}/src/"
45 50
46 - name: create_build_directory 51 - name: execute configure
47 file: path= "{{ ansible_home }}/build" 52 shell: './configure --target-list=i386-softmmu,x86_64-softmmu,arm-softmmu,arm-linux-user --enable-kvm --enable-debug --prefix={{ ansible_home }}/build'
48 state=directory 53 args:
54 chdir: "{{ ansible_home }}/src/qemu-{{ qemu_version }}"
49 55
50 # 56 #
51 #- name: install kernel 57 #- name: install kernel
52 # shell: "{{ item }}" 58 # shell: "{{ item }}"
53 # with_items: 59 # with_items: