vpp_device: updates for 1n-tx2 testbeds
[csit.git] / resources / tools / testbed-setup / ansible / roles / common / tasks / main.yaml
1 ---
2 # file: roles/common/tasks/main.yaml
3
4 - name: Add permanent proxy settings
5   lineinfile:
6     path: "/etc/environment"
7     state: "present"
8     line: "{{ item.key }}={{ item.value }}"
9   with_dict: "{{ proxy_env }}"
10   when: proxy_env is defined
11   tags:
12     - set-proxy
13
14 - name: Install Distribution - Release - Machine Prerequisites
15   package:
16     name: "{{ packages | flatten(levels=1) }}"
17     state: latest
18     update_cache: true
19   tags:
20     - install-dependencies
21
22 - name: Install CSIT PIP requirements
23   pip:
24     name:
25       - "ecdsa==0.13.3"
26       - "paramiko==2.6.0"
27       - "pycrypto==2.6.1"
28       - "pypcap==1.2.3"
29       - "PyYAML==5.1.1"
30       - "requests==2.22.0"
31       - "robotframework==3.1.2"
32       - "scapy==2.4.3"
33       - "scp==0.13.2"
34       - "ansible==2.7.8"
35       - "dill==0.2.8.2"
36       - "numpy==1.17.3"
37       - "hdrhistogram==0.6.1"
38       - "plotly==4.1.1"
39       - "PTable==0.9.2"
40       - "Sphinx==2.2.1"
41       - "sphinx-rtd-theme==0.4.0"
42       - "sphinxcontrib-programoutput==0.15"
43       - "sphinxcontrib-robotdoc==0.11.0"
44       - "alabaster==0.7.12"
45       - "Babel==2.7.0"
46       - "bcrypt==3.1.7"
47       - "certifi==2019.9.11"
48       - "cffi==1.13.2"
49       - "chardet==3.0.4"
50       - "cryptography==2.8"
51       - "docutils==0.15.2"
52       - "future==0.18.2"
53       - "idna==2.8"
54       - "imagesize==1.1.0"
55       - "Jinja2==2.10.3"
56       - "MarkupSafe==1.1.1"
57       - "packaging==19.2"
58       - "pbr==5.4.3"
59       - "pycparser==2.19"
60       - "Pygments==2.4.2"
61       - "PyNaCl==1.3.0"
62       - "pyparsing==2.4.4"
63       - "python-dateutil==2.8.1"
64       - "pytz==2019.3"
65       - "retrying==1.3.3"
66       - "six==1.13.0"
67       - "snowballstemmer==2.0.0"
68       - "sphinxcontrib-applehelp==1.0.1"
69       - "sphinxcontrib-devhelp==1.0.1"
70       - "sphinxcontrib-htmlhelp==1.0.2"
71       - "sphinxcontrib-jsmath==1.0.1"
72       - "sphinxcontrib-qthelp==1.0.2"
73       - "sphinxcontrib-serializinghtml==1.1.3"
74       - "urllib3==1.25.6"
75   tags:
76     - install-pip
77
78 - name: Install CSIT PIP requirements - Pandas and SciPy workaround
79   pip:
80     name:
81       - "pandas==0.25.3"
82       - "scipy==1.1.0"
83   tags:
84     - install-pip
85
86 - name: Install Meson (repository version is too old)
87   pip:
88     name:
89       - "meson==0.47.1"
90   tags:
91     - install-meson
92
93 - name: Set sudoers admin
94   lineinfile:
95     path: "/etc/sudoers"
96     state: "present"
97     regexp: "^%admin ALL="
98     line: "%admin ALL=(ALL) ALL"
99     validate: "/usr/sbin/visudo -cf %s"
100   tags:
101     - set-sudoers
102
103 - name: Set sudoers sudo
104   lineinfile:
105     path: "/etc/sudoers"
106     state: "present"
107     regexp: "^%sudo"
108     line: "%sudo ALL=(ALL:ALL) NOPASSWD: ALL"
109     validate: "/usr/sbin/visudo -cf %s"
110   tags:
111     - set-sudoers
112
113 - meta: flush_handlers