summaryrefslogtreecommitdiffstats
path: root/packer/provision/local-builder.yaml
blob: ef904075e56271555f5825bd5f557d7ff85a8bdf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
---
- import_playbook: ../common-packer/provision/baseline.yaml

- hosts: all
  become_user: root
  become_method: sudo

  pre_tasks:
    - include_role: name=lfit.system-update

  tasks:
    - name: 'Enable hugepages'
      sysctl:
        name: vm.nr_hugepages
        value: '128'
        reload: no
      when: ansible_distribution == 'Ubuntu'
      become: true

    - name: 'Install PackageCloud'
      command: 'gem install package_cloud'
      when: ansible_distribution == 'Ubuntu'
      become: true

    - apt_repository:
        repo: ppa:deadsnakes/ppa
        state: present
      become: true
      when: ansible_distribution == 'Ubuntu'

    - name: Update and upgrade apt packages
      apt:
        upgrade: 'yes'
        update_cache: yes
      become: true
      when: ansible_distribution == 'Ubuntu'

    - name: Install python-tox and deps
      pip:
        name:
          - tox
          - tox-pyenv
          - python-virtualenv
        state: present
      become: true
      when: ansible_distribution == 'Ubuntu'

    - name: 'Apt Install TLDK Packages'
      apt:
        name:
          - libaprutil1-dev
          - libc-dev-bin
          - libc6-dev
          - libcap-dev
          - libcrypt-dev
          - libexpat1-dev
          - libldap2-dev
          - libsctp-dev
          - libsctp1
          - libserf-1-1
          - libsvn1
          - linux-libc-dev
          - python3-pyelftools
          - python3-scapy
          - libnuma-dev
        state: present
      when: ansible_distribution == 'Ubuntu'
      become: true

    - name: Pip Install TLDK Packages
      pip:
        name:
          - meson==0.59.0
          - ninja
        state: present
      when: ansible_distribution == 'Ubuntu'
      become: true

  roles:
    - lfit.mono-install

  post_tasks:
    - name: System Reseal
      script: ../common-packer/provision/system-reseal.sh
      become: true