hostname.yml 710 Bytes
Newer Older
julian.gethmann's avatar
julian.gethmann committed
1
2
3
4
5
---
- name: set hostname
  hostname: "name=las{{ ip_suffix }}.las.kit.edu"
  become: yes

6
7
8
9
- name: install needed network manager libs
  dnf:
    name: '{{ item }}'
    state: installed
julian.gethmann's avatar
julian.gethmann committed
10
  become: yes
11
12
13
14
15
16
  with_items:
    - NetworkManager-glib
    - libnm-qt-devel.x86_64
    - nm-connection-editor.x86_64
    - libsemanage-python
    - policycoreutils-python
17
  when: (ansible_distribution == "Fedora" or ansible_distribution == "CentOS")
18

julian.gethmann's avatar
julian.gethmann committed
19
20
      # does not work at the moment
      # - name: set DNS Server
julian.gethmann's avatar
julian.gethmann committed
21
      #   nmcli:
julian.gethmann's avatar
julian.gethmann committed
22
23
24
25
26
27
28
      #     conn_name: enp0s31f6
      #     dns4:
      #       - 129.13.64.5
      #       - 141.3.175.65
      #         #  - 8.8.8.8
      #     state: present
      #     type: ethernet