932c01fcdc6bba6fe13a55da74b1e2fce051dd69
[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     - apt_repository:
10         repo: ppa:deadsnakes/ppa
11         state: present
12       become: true
13       when: ansible_distribution == 'Ubuntu'
14
15     - name: Update and upgrade apt packages
16       apt:
17         upgrade: 'yes'
18         update_cache: yes
19       become: true
20       when: ansible_distribution == 'Ubuntu'
21
22     - name: Install python-tox and deps
23       pip:
24         name:
25           - tox
26           - tox-pyenv
27           - virtualenv
28           - more-itertools~=5.0.0
29           - zipp==1.0.0
30         state: present
31       become: true
32
33     - name: Install Python 3.6 and packages
34       apt:
35         name:
36           - python3.6
37           - python3.6-dev
38           - python3.6-tk
39           - libssl-dev
40           - libmysqlclient-dev
41           - gcc
42           - python3-venv
43       become: true
44       when: ansible_distribution == 'Ubuntu'
45
46     - name: Install Python 3.7
47       apt:
48         name:
49           - python3.7
50           - python3.7-dev
51           - python3.7-tk
52       become: true
53       when: ansible_distribution == 'Ubuntu'
54
55     - name: Install Python 3.8
56       apt:
57         name:
58           - python3.8
59           - python3.8-dev
60           - python3.8-tk
61       become: true
62       when: ansible_distribution == 'Ubuntu'
63
64     - name: Install Python 3.9
65       apt:
66         name:
67           - python3.9
68           - python3.9-dev
69           - python3.9-tk
70       become: true
71       when: ansible_distribution == 'Ubuntu'
72
73     - name: Install libssl1.0-dev dep
74       apt:
75         name: libssl1.0-dev
76         update_cache: yes
77         state: fixed
78       become: true
79       when: ansible_distribution == 'Ubuntu' and ansible_distribution_version == '18.04'
80
81     - name: Install nodejs-dev dep for npm
82       apt:
83         name: nodejs-dev
84         update_cache: yes
85         state: fixed
86       become: true
87       when: ansible_distribution == 'Ubuntu'
88
89     - name: Install base packages
90       apt:
91         name:
92           - unzip
93           - xz-utils
94           - libxml-xpath-perl
95           - wget
96           - make
97           - sshuttle
98           - netcat
99           - libssl-dev
100           - libffi-dev
101           - xmlstarlet
102           - xvfb
103           - crudini
104           - maven
105           - python-ncclient
106           - xmlstarlet
107           - xvfb
108           - crudini
109           - maven
110           - python-ncclient
111         update_cache: yes
112       become: true
113       when: ansible_distribution == 'Ubuntu'
114
115     - name: Install npm and addon packages
116       apt:
117         name:
118           - nodejs
119           - npm
120           - node-gyp
121         update_cache: yes
122         state: fixed
123       become: true
124       when: ansible_distribution == 'Ubuntu'
125
126