Commit 7d1a22c0 authored by julian.gethmann's avatar julian.gethmann

Fix a lot of incompatibilities with not tested hosts

* Add missing host_vars files
* Fix syntax errors
* Fix Problems with Ubuntu/lab computer
parent 68a23805
...@@ -4,4 +4,4 @@ ...@@ -4,4 +4,4 @@
become: yes become: yes
when: ansible_distribution == 'Fedora' when: ansible_distribution == 'Fedora'
with_items: with_items:
- desktop_software - "{{desktop_software}}"
...@@ -36,11 +36,11 @@ python_software: ...@@ -36,11 +36,11 @@ python_software:
desktop_software: desktop_software:
- thunderbird - thunderbird
# - king/Clipboard
# - dagolden/Capture-Tiny
- firefox - firefox
- libreoffice - libreoffice
- bwSyncAndShare - bwSyncAndShare
- perl-Clipboard
- perl-Capture-Tiny
ipaserver: las101.las.kit.edu ipaserver: las101.las.kit.edu
ipaserver2: las126.las.kit.edu ipaserver2: las126.las.kit.edu
......
ansible_connection: local
ansible_user: gethmann ansible_user: gethmann
user_account: gethmann user_account: gethmann
ip_suffix: 113 ip_suffix: 113
......
ansible_connection: local
ansible_user: gethmann
user_account: widmann
ip_suffix: 116
loc: 618
os: Fedora 24
ansible_connection: local
ansible_user: gethmann
user_account: blomley
ip_suffix: 118
loc: 620
os: Fedora 25
ansible_user: gethmann
user_account: bernhard
ip_suffix: 93
loc: -10.
os: ubuntu
# stable # stable
[las-archiv1] [las-archiv1]
las113.las.kit.edu las113.las.kit.edu
las111.las.kit.edu # las111.las.kit.edu
las93.las.kit.edu las93.las.kit.edu
las-gethmann.las.kit.edu las-gethmann.las.kit.edu
[opera] [opera]
las113.las.kit.edu las113.las.kit.edu
las114.las.kit.edu # las114.las.kit.edu
las-bernhard.anka.kit.edu las-bernhard.anka.kit.edu
las111.las.kit.edu # las111.las.kit.edu
las118.las.kit.edu las118.las.kit.edu
las117.las.kit.edu las117.las.kit.edu
las126.las.kit.edu las126.las.kit.edu
...@@ -18,7 +18,7 @@ las-gethmann.las.kit.edu ...@@ -18,7 +18,7 @@ las-gethmann.las.kit.edu
[elegant] [elegant]
las113.las.kit.edu las113.las.kit.edu
las117.las.kit.edu las117.las.kit.edu
las111.las.kit.edu # las111.las.kit.edu
las126.las.kit.edu las126.las.kit.edu
las-gethmann.las.kit.edu las-gethmann.las.kit.edu
...@@ -30,9 +30,9 @@ las113.las.kit.edu ...@@ -30,9 +30,9 @@ las113.las.kit.edu
las-gethmann.las.kit.edu las-gethmann.las.kit.edu
[clients] [clients]
las111.las.kit.edu # las111.las.kit.edu
127.0.0.1 # 127.0.0.1
las114.las.kit.edu # las114.las.kit.edu
las116.las.kit.edu las116.las.kit.edu
las118.las.kit.edu las118.las.kit.edu
las113.las.kit.edu las113.las.kit.edu
...@@ -40,9 +40,9 @@ las93.las.kit.edu ...@@ -40,9 +40,9 @@ las93.las.kit.edu
las-gethmann.las.kit.edu las-gethmann.las.kit.edu
[desktop] [desktop]
las111.las.kit.edu # las111.las.kit.edu
las113.las.kit.edu las113.las.kit.edu
las114.las.kit.edu # las114.las.kit.edu
las116.las.kit.edu las116.las.kit.edu
las118.las.kit.edu las118.las.kit.edu
las-gethmann.las.kit.edu las-gethmann.las.kit.edu
...@@ -52,23 +52,13 @@ las-gethmann.las.kit.edu ...@@ -52,23 +52,13 @@ las-gethmann.las.kit.edu
# semi stable # semi stable
[scipy] [scipy]
las114.las.kit.edu # las114.las.kit.edu
las113.las.kit.edu las113.las.kit.edu
las111.las.kit.edu # las111.las.kit.edu
las126.las.kit.edu las126.las.kit.edu
# testing
[alle]
las101.las.kit.edu
las111.las.kit.edu
las113.las.kit.edu
las114.las.kit.edu
las118.las.kit.edu
las126.las.kit.edu
las-bernhard.anka.kit.edu
[local] [local]
127.0.0.1 ansible_connection=local # 127.0.0.1 ansible_connection=local
[admin-pcs] [admin-pcs]
las113.las.kit.edu las113.las.kit.edu
......
--- ---
# not tested yet
- name: install etckeeper - name: install etckeeper
become: yes become: yes
dnf: name=etckeeper state=installed package: name=etckeeper state=installed
- name: Initialise etckeeper - name: Initialise etckeeper
tags: etckeeper tags: etckeeper
...@@ -12,3 +11,23 @@ ...@@ -12,3 +11,23 @@
- name: dnf as package manager - name: dnf as package manager
lineinfile: dest=/etc/etckeeper/etckeeper.conf line="HIGHLEVEL_PACKAGE_MANAGER=dnf" regexp="HIGHLEVEL_PACKAGE_MANAGER=.*" backup=yes lineinfile: dest=/etc/etckeeper/etckeeper.conf line="HIGHLEVEL_PACKAGE_MANAGER=dnf" regexp="HIGHLEVEL_PACKAGE_MANAGER=.*" backup=yes
become: yes become: yes
when: (ansible_distribution == "Fedora" and ansible_distribution_major_version >= "18")
- name: yum as package manager
lineinfile: dest=/etc/etckeeper/etckeeper.conf line="HIGHLEVEL_PACKAGE_MANAGER=yum" regexp="HIGHLEVEL_PACKAGE_MANAGER=.*" backup=yes
become: yes
when: (ansible_distribution == "CentOS" and ansible_distribution_major_version <= "7")
- name: apt as package manager
lineinfile: dest=/etc/etckeeper/etckeeper.conf line="HIGHLEVEL_PACKAGE_MANAGER=apt" regexp="HIGHLEVEL_PACKAGE_MANAGER=.*" backup=yes
become: yes
when: ansible_os_family == "Debian"
- name: use git
lineinfile: dest=/etc/etckeeper/etckeeper.conf line='VCS="git"' regexp='.*VCS="git"' backup=yes
become: yes
- name: do not use bzr
lineinfile: dest=/etc/etckeeper/etckeeper.conf line='# VCS="bzr"' regexp='.*VCS="bzr"' backup=yes
become: yes
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
- nm-connection-editor.x86_64 - nm-connection-editor.x86_64
- libsemanage-python - libsemanage-python
- policycoreutils-python - policycoreutils-python
when: (ansible_distribution == "Fedora" or ansible_distribution == "CentOS")
# does not work at the moment # does not work at the moment
# - name: set DNS Server # - name: set DNS Server
......
--- ---
- name: install ntpdate - name: install ntpdate
dnf: state=latest name=ntpdate package: state=latest name=ntpdate
become: yes become: yes
- name: set time server - name: set time server
......
--- ---
- name: Installed sshd - name: Installed sshd
dnf: state=installed name=openssh-server package: state=installed name=openssh-server
become: yes become: yes
- name: Disable empty password login - name: Disable empty password login
......
--- ---
- name: Ensure sudo is installed - name: Ensure sudo is installed
dnf: pkg=sudo state=installed package: pkg=sudo state=installed
become: yes become: yes
- name: Copy sudoers file including validation - name: Copy sudoers file including validation
......
--- ---
- name: Updating the system - name: Updating the system
become: yes become: yes
dnf: name=* state=latest package: name=* state=latest
...@@ -9,6 +9,7 @@ ...@@ -9,6 +9,7 @@
keepalive: yes keepalive: yes
keepcache: 0 keepcache: 0
become: yes become: yes
when: (ansible_distribution == "Fedora" or ansible_distribution == "CentOS")
# GPG-Key holen TODO # GPG-Key holen TODO
- name: Add Adobe Reader - name: Add Adobe Reader
...@@ -20,4 +21,5 @@ ...@@ -20,4 +21,5 @@
gpgcheck: yes gpgcheck: yes
gpgkey: file:///etc/pki/rpm-gpg/RPM-GPG-KEY-adobe-linux gpgkey: file:///etc/pki/rpm-gpg/RPM-GPG-KEY-adobe-linux
become: yes become: yes
when: (ansible_distribution == "Fedora" or ansible_distribution == "CentOS")
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