Commit 3f2cad54 authored by julian.gethmann's avatar julian.gethmann

Setup gutemine as lab computer

parent e65905fc
......@@ -58,3 +58,5 @@ ipaserver2: "{{ vault_ipaserver2 }}"
ipaserver3: "{{ vault_ipaserver3 }}"
ipa_users: "{{ vault_ipa_users }}"
undine_password: "{{ vault_undine_password }}"
This diff is collapsed.
ansible_user: root
user_account: widmann
loc: 618
os: Fedora 28
user_account: blomley
loc: -119
os: Fedora 30
computer_name: gutemine
extra_software:
......
......@@ -110,7 +110,8 @@ obelix.las.kit.edu
# developement
[lab]
las93.las.kit.edu
# las93.las.kit.edu
gutemine.las.kit.edu ansible_python_interpreter=/usr/bin/python3
[rpmbuild]
asterix.las.kit.edu
......
---
- name: Load OS dependent variables
include_vars: '{{ item }}'
with_first_found:
- files:
- 'vars/{{ ansible_os_family }}.yml'
errors: ignore
tags: dhcpd
- name: dhcpd installed (Debian)
become: true
apt:
name: "{{ pkg_name }}"
state: present
notify:
- start dhcpd
- enable dhcpd
when: ansible_os_family == "Debian"
- name: dhcpd installed (RedHat)
become: true
dnf:
name: "{{ pkg_name }}"
state: present
notify:
- start dhcpd
- enable dhcpd
when: ansible_distribution == "Fedora"
- name: copy mac addresses and config
become: true
copy:
src: "{{ item }}"
dest: "/etc/dhcp/{{ item }}"
backup: yes
owner: dhcpd
group: dhcpd
mode: 0644
decrypt: yes
# https://superuser.com/questions/1286948/ansible-template-validation-fails-on-isc-dhcp-server
# validate: "{{ bin_path }} -t -cf %s"
notify: restart dhcpd
with_items:
- "host-list-maglab"
- dhcpd.conf
---
- name: Load OS dependent variables
include_vars: '{{ item }}'
with_first_found:
- files:
- 'vars/{{ ansible_os_family }}.yml'
skip: true
tags: dhcpd
- name: dhcpd installed
become: true
apt:
name: "{{ pkg_name }}"
state: present
notify:
- start dhcpd
- enable dhcpd
- name: copy mac addresses and config
become: true
copy:
src: "{{ item }}"
dest: "/etc/dhcp/{{ item }}"
backup: yes
owner: dhcpd
group: dhcpd
mode: 0644
decrypt: yes
# https://superuser.com/questions/1286948/ansible-template-validation-fails-on-isc-dhcp-server
# validate: "{{ bin_path }} -t -cf %s"
notify: restart dhcpd
with_items:
- "host-list-maglab"
- dhcpd.conf
- import_tasks: user.yml
- import_tasks: dhcpd.yml
---
- name: undine added
become: yes
user:
name: undine
home: /home/undine
password: "{{ undine_password }}"
uid: 1100
group: users
create_home: False
---
service_name: dhcpd
pkg_name: dhcpd
pkg_name: dhcp
bin_path: /sbin/dhcpd
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment