hostname.yml 714 Bytes
Newer Older
julian.gethmann's avatar
julian.gethmann committed
1
---
2
- name: install needed network manager libs
julian.gethmann's avatar
julian.gethmann committed
3
  become: yes
4 5
  dnf:
    name: '{{ item }}'
julian.gethmann's avatar
julian.gethmann committed
6
    state: present
7 8 9 10 11 12
  with_items:
    - NetworkManager-glib
    - libnm-qt-devel.x86_64
    - nm-connection-editor.x86_64
    - libsemanage-python
    - policycoreutils-python
13
  when: (ansible_distribution == "Fedora" or ansible_distribution == "CentOS")
14

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

- name: set hostname
julian.gethmann's avatar
julian.gethmann committed
27
  become: yes
28 29 30
  hostname:
    name: "las{{ ip_suffix }}.las.kit.edu"