Commit 9b8baae1 authored by julian.gethmann's avatar julian.gethmann
Browse files

Move old network to new VLAN

* Move all hosts
* Change hostnames
* Change IPs in configurations
* Improve IPA setup
* Update roles:
  * opera
  * lasarchiv
  * common/printer
  * ipa_hosts
parent 5003a4a1
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
- hosts: all - hosts: all
remote_user: root remote_user: root
vars: vars:
ipa_host: "las{{ ip_suffix }}.las.kit.edu" ipa_host: "{{ computer_name }}.las.kit.edu"
ipa_host_ip: "129.13.108.{{ ip_suffix }}" ipa_host_ip: "129.13.108.{{ ip_suffix }}"
ipa_domain: las.kit.edu ipa_domain: las.kit.edu
vars_prompt: vars_prompt:
......
This diff is collapsed.
--- ---
nfs_server: 129.13.108.126 nfs_server: 129.13.238.126
...@@ -2,5 +2,5 @@ ansible_user: root ...@@ -2,5 +2,5 @@ ansible_user: root
user_account: richter user_account: richter
ip_suffix: 118 ip_suffix: 118
loc: 620 loc: 620
os: Fedora 28 os: Fedora 29
computer_name: Amnesix computer_name: amnesix
ansible_user: root ansible_user: root
user_account: gethmann user_account: gethmann
ip_suffix: 113 ip_suffix: 73
loc: 618 loc: 618
os: Fedora 29 os: Fedora 29
computer_name: Asterix computer_name: asterix
extra_software: extra_software:
- subversion # for ANKA software - subversion # for ANKA software
......
ansible_user: root ansible_user: root
user_account: widmann user_account: widmann
ip_suffix: 112
loc: 618 loc: 618
os: Fedora 28 os: Fedora 28
computer_name: Gutemine computer_name: gutemine
extra_software: extra_software:
- subversion # ANKA software - subversion # ANKA software
......
...@@ -3,4 +3,4 @@ user_account: damminsek ...@@ -3,4 +3,4 @@ user_account: damminsek
ip_suffix: 117 ip_suffix: 117
loc: 620 loc: 620
os: Fedora 27 os: Fedora 27
computer_name: Idefix computer_name: idefix
ansible_user: root
ansible_ssh_user: root
ansible_remote_user: gethmann
remote_user: gethmann
ip_suffix: 100
loc: 612
os: CentOS 7.4
computer_name: kantine
...@@ -3,4 +3,4 @@ user_account: bernhard ...@@ -3,4 +3,4 @@ user_account: bernhard
ip_suffix: 127 ip_suffix: 127
loc: 622 loc: 622
os: Fedora 27 os: Fedora 27
computer_name: Majestix computer_name: majestix
...@@ -2,8 +2,8 @@ ansible_user: root ...@@ -2,8 +2,8 @@ ansible_user: root
user_account: gethmann user_account: gethmann
ip_suffix: 126 ip_suffix: 126
loc: 618 loc: 618
os: Fedora 27 os: Fedora 29
computer_name: Obelix computer_name: obelix
extra_software: extra_software:
- borgbackup - borgbackup
...@@ -3,7 +3,7 @@ user_account: ning ...@@ -3,7 +3,7 @@ user_account: ning
ip_suffix: 115 ip_suffix: 115
loc: 619 loc: 619
os: Fedora 29 os: Fedora 29
computer_name: Costa Y Bravo computer_name: pepe
extra_software: extra_software:
- python-qt5 - python-qt5
......
...@@ -3,5 +3,5 @@ ansible_user: root ...@@ -3,5 +3,5 @@ ansible_user: root
user_account: rossmanith user_account: rossmanith
ip_suffix: 116 ip_suffix: 116
loc: 619 loc: 619
os: Fedora 27 os: Fedora 29
computer_name: Spürnix computer_name: spuernix
...@@ -3,4 +3,4 @@ user_account: tong ...@@ -3,4 +3,4 @@ user_account: tong
ip_suffix: 120 ip_suffix: 120
loc: 621 loc: 621
os: Fedora 28 os: Fedora 28
computer_name: Teefax computer_name: teefax
# stable # stable
[clients] [clients]
las112.las.kit.edu gutemine.las.kit.edu
las113.las.kit.edu asterix.las.kit.edu
las115.las.kit.edu pepe.las.kit.edu
las116.las.kit.edu spuernix.las.kit.edu
las117.las.kit.edu idefix.las.kit.edu
las118.las.kit.edu amnesix.las.kit.edu
las120.las.kit.edu teefax.las.kit.edu
# las122.las.kit.edu obelix.las.kit.edu
las126.las.kit.edu lysander.las.kit.edu
las-gethmann.las.kit.edu
[desktop] [desktop]
las112.las.kit.edu gutemine.las.kit.edu
las113.las.kit.edu asterix.las.kit.edu
las115.las.kit.edu pepe.las.kit.edu
las116.las.kit.edu spuernix.las.kit.edu
las117.las.kit.edu idefix.las.kit.edu
las118.las.kit.edu amnesix.las.kit.edu
las120.las.kit.edu teefax.las.kit.edu
# las122.las.kit.edu lysander.las.kit.edu
las-gethmann.las.kit.edu
[graphics] [graphics]
las113.las.kit.edu asterix.las.kit.edu
las-gethmann.las.kit.edu lysander.las.kit.edu
las118.las.kit.edu amnesix.las.kit.edu
[lasarchiv] [lasarchiv]
las113.las.kit.edu asterix.las.kit.edu
las115.las.kit.edu pepe.las.kit.edu
las117.las.kit.edu idefix.las.kit.edu
las118.las.kit.edu amnesix.las.kit.edu
las120.las.kit.edu teefax.las.kit.edu
las122.las.kit.edu obelix.las.kit.edu
las126.las.kit.edu majestix.las.kit.edu
las127.las.kit.edu lysander.las.kit.edu
las-gethmann.las.kit.edu
[python] [python]
las112.las.kit.edu gutemine.las.kit.edu
las113.las.kit.edu asterix.las.kit.edu
las115.las.kit.edu pepe.las.kit.edu
las117.las.kit.edu idefix.las.kit.edu
las118.las.kit.edu amnesix.las.kit.edu
las120.las.kit.edu teefax.las.kit.edu
las122.las.kit.edu lysander.las.kit.edu
las-gethmann.las.kit.edu
[kdev] # KDevelope [kdev] # KDevelope
[jabref] [jabref]
[zotero] [zotero]
las113.las.kit.edu asterix.las.kit.edu
las117.las.kit.edu idefix.las.kit.edu
las-gethmann.las.kit.edu lysander.las.kit.edu
[pynaff] [pynaff]
las-gethmann.las.kit.edu lysander.las.kit.edu
las113.las.kit.edu asterix.las.kit.edu
las126.las.kit.edu obelix.las.kit.edu
[pycharm] [pycharm]
las-gethmann.las.kit.edu lysander.las.kit.edu
las113.las.kit.edu asterix.las.kit.edu
las115.las.kit.edu pepe.las.kit.edu
las117.las.kit.edu idefix.las.kit.edu
[chrome] [chrome]
las-gethmann.las.kit.edu lysander.las.kit.edu
[latex] [latex]
las112.las.kit.edu gutemine.las.kit.edu
las-gethmann.las.kit.edu lysander.las.kit.edu
las113.las.kit.edu asterix.las.kit.edu
las115.las.kit.edu pepe.las.kit.edu
las117.las.kit.edu idefix.las.kit.edu
las118.las.kit.edu amnesix.las.kit.edu
las120.las.kit.edu teefax.las.kit.edu
[opera] [opera]
las113.las.kit.edu asterix.las.kit.edu
las115.las.kit.edu pepe.las.kit.edu
las117.las.kit.edu idefix.las.kit.edu
las126.las.kit.edu obelix.las.kit.edu
las127.las.kit.edu majestix.las.kit.edu
[mad8] [mad8]
# depercated for Fedora >=26 # depercated for Fedora >=26
[nfs-server] [nfs-server]
las126.las.kit.edu obelix.las.kit.edu
# developement # developement
[dhcpd]
las101.las.kit.edu
las126.las.kit.edu
[lab] [lab]
# las93.las.kit.edu # las93.las.kit.edu
[rpmbuild] [rpmbuild]
las113.las.kit.edu asterix.las.kit.edu
las-gethmann.las.kit.edu lysander.las.kit.edu
[elegant] [elegant]
las113.las.kit.edu asterix.las.kit.edu
las117.las.kit.edu idefix.las.kit.edu
las126.las.kit.edu obelix.las.kit.edu
las-gethmann.las.kit.edu lysander.las.kit.edu
[epics] [epics]
las112.las.kit.edu gutemine.las.kit.edu
las113.las.kit.edu asterix.las.kit.edu
las115.las.kit.edu pepe.las.kit.edu
las117.las.kit.edu idefix.las.kit.edu
las-gethmann.las.kit.edu lysander.las.kit.edu
[ripgrep] [ripgrep]
las101.las.kit.edu las101.las.kit.edu
las113.las.kit.edu asterix.las.kit.edu
las-gethmann.las.kit.edu lysander.las.kit.edu
[inovesa] [inovesa]
las113.las.kit.edu asterix.las.kit.edu
[ipynb] # Jupyter notebook [ipynb] # Jupyter notebook
las117.las.kit.edu idefix.las.kit.edu
las120.las.kit.edu teefax.las.kit.edu
las122.las.kit.edu lysander.las.kit.edu
las-gethmann.las.kit.edu
# semi stable # semi stable
[tgu] [tgu]
las115.las.kit.edu pepe.las.kit.edu
[local] [local]
127.0.0.1 ansible_connection=local 127.0.0.1 ansible_connection=local
[admin_pcs] [admin_pcs]
las101.las.kit.edu las101.las.kit.edu
las113.las.kit.edu asterix.las.kit.edu
las-gethmann.las.kit.edu lysander.las.kit.edu
[server] [server]
las101.las.kit.edu las101.las.kit.edu
...@@ -41,7 +41,7 @@ ErrorPolicy stop-printer ...@@ -41,7 +41,7 @@ ErrorPolicy stop-printer
UUID urn:uuid:c20b481d-848e-30e6-5eab-8ba9fb397809 UUID urn:uuid:c20b481d-848e-30e6-5eab-8ba9fb397809
Info Oki MC851(PS) Info Oki MC851(PS)
Location Library Location Library
DeviceURI socket://129.13.108.106/ DeviceURI socket://oki.las.kit.edu/
State Idle State Idle
StateTime 1414591314 StateTime 1414591314
Type 8433756 Type 8433756
......
...@@ -23,8 +23,15 @@ ...@@ -23,8 +23,15 @@
# state: present # state: present
# type: ethernet # type: ethernet
- name: set hostname
become: yes
hostname:
name: "{{ computer_name }}.las.kit.edu"
when: "{{ ansible_facts.ansible_default_ipv4.network }} is '129.13.238.64'"
- name: set hostname - name: set hostname
become: yes become: yes
hostname: hostname:
name: "las{{ ip_suffix }}.las.kit.edu" name: "las{{ ip_suffix }}.las.kit.edu"
when: "{{ ansible_facts.ansible_default_ipv4.network }} is '129.13.108.64'"
...@@ -2,21 +2,18 @@ ...@@ -2,21 +2,18 @@
# THIS ROLE IS NOT IDEMPOTENT, but just for installation! # THIS ROLE IS NOT IDEMPOTENT, but just for installation!
- name: install host - name: install host
become: yes become: yes
dnf: package:
name: "{{ item }}" name: ["freeipa-client", "sssd"]
state: installed state: installed
with_items:
- "freeipa-client"
- "sssd"
- name: add ipa hosts to etc # - name: add ipa hosts to etc
become: yes # become: yes
lineinfile: # lineinfile:
line: "{{ ipa_host_ip }} {{ ipa_host }}" # line: "{{ ipa_host_ip }} {{ ipa_host }}"
path: /etc/hosts # path: /etc/hosts
state: present # state: present
backup: yes # backup: yes
insertbefore: BOF # insertbefore: BOF
# TODO # TODO
# - name: copy server cert # - name: copy server cert
...@@ -28,7 +25,7 @@ ...@@ -28,7 +25,7 @@
- name: set hostname - name: set hostname
become: yes become: yes
hostname: hostname:
name: "las{{ ip_suffix }}.las.kit.edu" name: "{{ computer_name }}.las.kit.edu"
# This is not idempotent! # This is not idempotent!
- name: add host - name: add host
...@@ -58,5 +55,5 @@ ...@@ -58,5 +55,5 @@
- name: activate host - name: activate host
become: yes become: yes
command: "ipa-client-install --hostname={{ ansible_fqdn }} --domain={{ ipa_domain }} --server={{ ipaserver1 }} --server={{ ipaserver2 }} --server={{ ipaserver3 }} --fixed-primary --mkhomedir -N --no-sshd --no-ssh -U --password={{ random_pass.stdout }}" command: "ipa-client-install --hostname={{ ansible_fqdn }} --mkhomedir -N -U --password={{ random_pass.stdout }}"
when: random_pass.changed when: random_pass.changed
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
opts: "soft,timeo=14,intr,nosuid" opts: "soft,timeo=14,intr,nosuid"
state: "{{ item }}" state: "{{ item }}"
become: yes become: yes
when: ansible_default_ipv4.address | ipaddr('129.13.108.64/26') when: (ansible_default_ipv4.address | ipaddr('129.13.108.64/26')) or (ansible_default_ipv4.address | ipaddr('129.13.238.64/26'))
with_items: with_items:
- mounted - mounted
- present - present
export LMX_LICENSE_PATH=@129.13.108.100 export LMX_LICENSE_PATH=@opera.las.kit.edu
export VECTORFIELD_LICENSE_PATH=@129.13.108.100 export VECTORFIELD_LICENSE_PATH=@opera.las.kit.edu
export VFDIR=/usr/local/share/Opera_18R2/code/ export VFDIR=/usr/local/share/Opera_18R2/code/
# This causes git to not work properly anymore (e.g. git pull --rebase) # This causes git to not work properly anymore (e.g. git pull --rebase)
# export PATH=/usr/local/share/Opera_17R1/bin:"${PATH}" # export PATH=/usr/local/share/Opera_17R1/bin:"${PATH}"
......
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