a9280815fe2410c99b7bd966a286471a7ba9c90c
[ci-management.git] / packer / provision / local-builder.yaml
1 ---
2 - import_playbook: ../common-packer/provision/baseline.yaml
3
4 - hosts: all
5   become_user: root
6   become_method: sudo
7
8   tasks:
9     - name: Update and upgrade apt packages
10       apt:
11         upgrade: yes
12         update_cache: yes
13       become: true
14       when: ansible_distribution == 'Ubuntu'
15
16     - name: Install python-tox
17       pip:
18         name: tox
19         state: present
20       become: true
21
22     - apt_repository:
23         repo: ppa:jonathonf/python-3.6
24         state: present
25       become: true
26       when: ansible_distribution == 'Ubuntu'
27
28     - name: Install Python 3.6 and packages
29       apt:
30         name:
31           - python3.6
32           - python3.6-dev
33           - python3.6-tk
34           - libssl-dev
35           - libmysqlclient-dev
36           - gcc
37       become: true
38       when: ansible_distribution == 'Ubuntu'
39
40     - name: Install base packages
41       apt:
42         name:
43           - unzip
44           - xz-utils
45           - libxml-xpath-perl
46           - wget
47           - make
48           - npm
49           - sshuttle
50           - netcat
51           - libssl-dev
52           - libffi-dev
53       become: true
54       when: ansible_distribution == 'Ubuntu'
55
56     - name: Install autorelease support packages
57       apt:
58         name:
59           - xmlstarlet
60           - xvfb
61           - crudini
62           - maven
63           - python-ncclient
64       become: true
65       when: ansible_distribution == 'Ubuntu'