2 # file: roles/common/tasks/main.yaml
4 - name: Ensure the system exists in Cobbler
6 host: '{{ cobbler_hostname }}'
10 ipaddress: '{{ ansible_default_ipv4.address }}'
11 macaddress: '{{ ansible_default_ipv4.macaddress }}'
12 name: '{{ hostname }}'
13 password: '{{ cobbler_password }}'
15 hostname: '{{ hostname }}'
16 gateway: '{{ ansible_default_ipv4.gateway }}'
17 profile: '{{ cobbler_profile }}'
18 name_servers: '{{ name_servers }}'
19 name_servers_search: '{{ name_servers_search }}'
20 kickstart: '/var/lib/cobbler/kickstarts/{{ cobbler_profile }}.seed'
21 kernel_options: '"interface={{ ansible_default_ipv4.interface }}"'
23 username: '{{ cobbler_username }}'
26 when: provision_enabled
27 delegate_to: localhost
30 - name: Commit Cobbler changes
32 host: '{{ cobbler_hostname }}'
34 password: '{{ cobbler_password }}'
35 username: '{{ cobbler_username }}'
39 when: provision_enabled
40 delegate_to: localhost
41 register: __included_in_cobbler
47 - meta: flush_handlers
49 - name: Copy netplan network config file
51 src: 'files/netplan_config'
52 dest: '/etc/netplan/01-netcfg.yaml'
56 tags: copy-interface-file
58 - name: Add permanent proxy settings
60 path: '/etc/environment'
62 line: '{{ item.key }}={{ item.value }}'
63 with_dict: '{{ proxy_env }}'
64 when: proxy_env is defined
66 - name: Install distribution - release - machine prerequisites
67 include_tasks: '{{ ansible_distribution|lower }}_{{ ansible_distribution_release }}.yaml'
68 tags: [ install-csit-dependencies, copy-apt-sources ]
70 - name: Install CSIT PIP requirements
79 - 'robotframework==3.1.2'
85 - 'hdrhistogram==0.6.1'
90 - 'sphinx-rtd-theme==0.4.0'
91 - 'sphinxcontrib-programoutput==0.15'
92 - 'sphinxcontrib-robotdoc==0.11.0'
96 - 'certifi==2019.9.11'
105 - 'MarkupSafe==1.1.1'
112 - 'python-dateutil==2.8.1'
116 - 'snowballstemmer==2.0.0'
117 - 'sphinxcontrib-applehelp==1.0.1'
118 - 'sphinxcontrib-devhelp==1.0.1'
119 - 'sphinxcontrib-htmlhelp==1.0.2'
120 - 'sphinxcontrib-jsmath==1.0.1'
121 - 'sphinxcontrib-qthelp==1.0.2'
122 - 'sphinxcontrib-serializinghtml==1.1.3'
126 - name: Install CSIT PIP requirements - SciPy workaround
132 - name: Set sudoers admin
136 regexp: '^%admin ALL='
137 line: '%admin ALL=(ALL) ALL'
138 validate: '/usr/sbin/visudo -cf %s'
141 - name: Set sudoers sudo
146 line: '%sudo ALL=(ALL:ALL) NOPASSWD: ALL'
147 validate: '/usr/sbin/visudo -cf %s'
150 - name: Copy grub file
152 src: 'files/grub_{{ ansible_machine }}'
153 dest: '/etc/default/grub'
162 - name: Mellanox Install - Driver
163 import_tasks: mellanox.yaml
164 tags: mellanox-install
166 - meta: flush_handlers