Chore: Remove old ansible module
[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 3.6 and packages
23       apt:
24         name:
25           - python3.6
26           - python3.6-dev
27           - python3.6-tk
28           - libssl-dev
29           - libmysqlclient-dev
30           - gcc
31           - python3-venv
32       become: true
33       when: ansible_distribution == 'Ubuntu'
34
35     - name: Install Python 3.7
36       apt:
37         name:
38           - python3.7
39           - python3.7-dev
40           - python3.7-tk
41       become: true
42       when: ansible_distribution == 'Ubuntu'
43
44     - name: Install Python 3.8
45       apt:
46         name:
47           - python3.8
48           - python3.8-dev
49           - python3.8-tk
50       become: true
51       when: ansible_distribution == 'Ubuntu'
52
53     - name: Install Python 3.9
54       apt:
55         name:
56           - python3.9
57           - python3.9-dev
58           - python3.9-tk
59           - python3.9-distutils
60       become: true
61       when: ansible_distribution == 'Ubuntu'
62
63     - name: Install libssl1.0-dev dep
64       apt:
65         name: libssl1.0-dev
66         update_cache: yes
67         state: fixed
68       become: true
69       when: ansible_distribution == 'Ubuntu' and ansible_distribution_version == '18.04'
70
71     - name: Install nodejs-dev dep for npm
72       apt:
73         name: nodejs-dev
74         update_cache: yes
75         state: fixed
76       become: true
77       when: ansible_distribution == 'Ubuntu' and ansible_distribution_version == '18.04'
78
79     - name: Install libnode-dev dep for npm
80       apt:
81         name: libnode-dev
82         update_cache: yes
83         state: fixed
84       become: true
85       when: ansible_distribution == 'Ubuntu' and ansible_distribution_version == '20.04'
86
87     - name: Install supporting packages (Ubuntu 18.04)
88       apt:
89         name:
90           - unzip
91           - xz-utils
92           - libxml-xpath-perl
93           - wget
94           - make
95           - sshuttle
96           - netcat
97           - libssl-dev
98           - libffi-dev
99           - xmlstarlet
100           - xvfb
101           - crudini
102           - maven
103           - python-ncclient
104         update_cache: yes
105         state: fixed
106       become: true
107       when: ansible_distribution == 'Ubuntu' and ansible_distribution_version == '18.04'
108
109     - name: Install supporting packages (Ubuntu 20.04)
110       apt:
111         name:
112           - unzip
113           - xz-utils
114           - libxml-xpath-perl
115           - wget
116           - make
117           - sshuttle
118           - netcat
119           - libssl-dev
120           - libffi-dev
121           - xmlstarlet
122           - xvfb
123           - crudini
124           - maven
125           - python3-ncclient
126         update_cache: yes
127         state: fixed
128       become: true
129       when: ansible_distribution == 'Ubuntu' and ansible_distribution_version == '20.04'
130
131     - name: Install npm and addon packages
132       apt:
133         name:
134           - nodejs
135           - npm
136           - node-gyp
137         update_cache: yes
138         state: fixed
139       become: true
140       when: ansible_distribution == 'Ubuntu'
141
142