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
82 - 'python-dateutil==2.4.2'
85 - 'robotframework==2.9.2'
94 - name: Install CSIT PIP requirements - SciPy workaround
100 - name: Set sudoers admin
104 regexp: '^%admin ALL='
105 line: '%admin ALL=(ALL) ALL'
106 validate: '/usr/sbin/visudo -cf %s'
109 - name: Set sudoers sudo
114 line: '%sudo ALL=(ALL:ALL) NOPASSWD: ALL'
115 validate: '/usr/sbin/visudo -cf %s'
118 - name: Copy grub file
120 src: 'files/grub_{{ ansible_machine }}'
121 dest: '/etc/default/grub'
130 - name: Mellanox Install - Driver
131 import_tasks: mellanox.yaml
132 tags: mellanox-install
134 - meta: flush_handlers