Commit 2863d594 authored by julian.gethmann's avatar julian.gethmann

Fix update issues

* installed is no longer supported
* some fixes in handlers
parent a82feb4d
- hosts: admin_pcs
tasks:
- name: install admin software
dnf: name={{ item }} state=installed
become: yes
dnf:
name: "{{ item }}"
state: present
with_items: "{{ admin_software }}"
......@@ -3,7 +3,7 @@
- name: install desktop software
dnf:
name: "{{ item }}"
state: installed
state: present
become: yes
when: ansible_distribution == 'Fedora'
with_items:
......
......@@ -34,7 +34,7 @@ desktop_software:
- thunderbird
- firefox
- libreoffice
- bwSyncAndShare
# - bwSyncAndShare
- perl-Clipboard
- perl-Capture-Tiny
......
---
- name: "Install basic client software"
apt: name={{ item }} state=installed
apt:
name: "{{ item }}"
state: present
with_items: "{{ client_software }}"
when: ansible_distribution == 'Ubuntu'
become: yes
- name: "Install basic client software"
dnf: name={{ item }} state=installed
dnf:
name: "{{ item }}"
state: present
with_items: "{{ client_software }}"
when: ansible_distribution == 'Fedora'
become: yes
---
- name: install CUPS
become: yes
dnf: name=cups state=installed
dnf:
name: cups
state: present
when: ansible_distribution == 'Fedora'
- name: install CUPS
become: yes
apt: name=cups state=installed
apt:
name: cups
state: present
when: ansible_distribution == 'Ubuntu'
- name: copy CUPS' configs
become: yes
copy: src={{ item }} dest=/etc/cups backup=yes group=lp owner=root
copy:
src: "{{ item }}"
dest: /etc/cups
backup: yes
group: lp
owner: root
with_items:
- "printers.conf"
- "cupsd.conf"
......@@ -19,7 +28,13 @@
- name: copy PPD files
become: yes
copy: src=ppd/{{ item }} dest=/etc/cups/ppd backup=yes group=root owner=root mode=0644
copy:
src: "ppd/{{ item }}"
dest: /etc/cups/ppd
backup: yes
group: root
owner: root
mode: 0644
notify: restart cups
with_items:
- "HP-LaserJet-P2015-Series.ppd"
......
---
- name: install etckeeper
become: yes
package: name=etckeeper state=installed
package:
name: etckeeper
state: present
- name: Initialise etckeeper
tags: etckeeper
command: etckeeper init creates=/etc/.etckeeper chdir=/etc
become: yes
tags: etckeeper
command: etckeeper init
args:
creates: "/etc/.etckeeper"
chdir: /etc
- name: dnf as package manager
lineinfile: dest=/etc/etckeeper/etckeeper.conf line="HIGHLEVEL_PACKAGE_MANAGER=dnf" regexp="HIGHLEVEL_PACKAGE_MANAGER=.*" backup=yes
become: yes
lineinfile:
dest: /etc/etckeeper/etckeeper.conf
line: "HIGHLEVEL_PACKAGE_MANAGER=dnf"
regexp: "HIGHLEVEL_PACKAGE_MANAGER=.*"
backup: 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
lineinfile:
dest: /etc/etckeeper/etckeeper.conf
line: "HIGHLEVEL_PACKAGE_MANAGER=yum"
regexp: "HIGHLEVEL_PACKAGE_MANAGER=.*"
backup: 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
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
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
lineinfile:
dest: /etc/etckeeper/etckeeper.conf
line: '# VCS="bzr"'
regexp: '.*VCS="bzr"'
backup: yes
become: yes
......@@ -3,7 +3,7 @@
become: yes
dnf:
name: '{{ item }}'
state: installed
state: present
with_items:
- NetworkManager-glib
- libnm-qt-devel.x86_64
......
---
- name: install ntpdate
package:
state: installed
state: present
name: ntpdate
become: yes
......
......@@ -3,7 +3,7 @@
become: yes
package:
name: smartmontools
state: installed
state: present
notify:
- enable smartd
- restart smartd
......
---
- name: install common software
package: name={{item}} state=installed
with_items: "{{ common_software }}"
become: true
package:
name: "{{ item }}"
state: present
with_items: "{{ common_software }}"
......@@ -2,14 +2,14 @@
- name: Installed sshd
become: yes
package:
state: installed
state: present
name: openssh-server
- name: install firewalld
become: yes
package:
name: python-firewall
state: installed
state: present
when: ansible_distribution == "Fedora" or
(ansible_distribution == "CentOS" and ansible_distribution_major_version >= 7)
......
---
- name: Ensure sudo is installed
package: pkg=sudo state=installed
become: yes
package:
pkg: sudo
state: present
- name: Copy sudoers file including validation
become: yes
template: src=sudoers.j2 dest=/etc/sudoers.d/sudoers validate='visudo -cf %s' backup=yes owner=root group=root mode=0440
template:
src: sudoers.j2
dest: /etc/sudoers.d/sudoers
validate: 'visudo -cf %s'
backup: yes
owner: root
group: root
mode: 0440
notify: lock root user
- name: requiretty in sudoers
lineinfile: backup=yes regexp="Defaults !?requiretty" state=present dest=/etc/sudoers line="Defaults !requiretty" validate="visudo -c -f %s"
become: yes
lineinfile:
backup: yes
regexp: "Defaults !?requiretty"
state: present
dest: /etc/sudoers
line: "Defaults !requiretty"
validate: "visudo -c -f %s"
......@@ -13,4 +13,4 @@
become: yes
dnf:
name: google-chrome-stable
state: installed
state: present
---
- name: install Jupyter notebook for Python 3
dnf: state=installed name={{ item }}
become: yes
dnf:
state: present
name: "{{ item }}"
with_items:
- python3-jupyter-core
- python3-ipykernel
......@@ -12,11 +14,11 @@
when: ansible_distribution == 'Fedora'
- name: install Jupyter notebook extensions
become: yes
pip:
name: "{{ item }}"
executable: /usr/bin/pip3
state: installed
become: yes
state: present
with_items:
- ipywidgets
tags: notebook
......
---
- name: install KDevelop with Python support
package: name=kdevelop-python state=installed
package:
name: kdevelop-python
state: present
become: yes
---
- name: install requirements
dnf:
state: installed
state: present
name: nfs-utils
become: yes
when: ansible_distribution == 'Fedora'
- name: install requirements
apt:
state: installed
state: present
name: nfs-common
become: yes
when: ansible_distribution == 'Ubuntu'
- name: install requirements
yum:
state: installed
state: present
name: nfs-utils
become: yes
when: ansible_distribution == 'CentOS'
......
......@@ -6,14 +6,14 @@
become: yes
dnf:
name: texlive
state: installed
state: present
tags: latex
- name: Install LaTeX subpackages
become: yes
dnf:
name: "{{ item }}"
state: installed
state: present
with_items: "{{ texlivepackages }}"
when: ansible_distribution == "Fedora"
......
......@@ -2,7 +2,7 @@
- name: install MAD-8
dnf:
name: "{{ item }}"
state: installed
state: present
become: yes
with_items:
- "MAD-8"
......
......@@ -3,7 +3,7 @@
become: yes
package:
name: "{{ item }}"
state: installed
state: present
with_items:
- ssmtp
- mailx
......
......@@ -5,7 +5,7 @@
become: yes
dnf:
name: "{{ item }}"
state: installed
state: present
with_items:
- boost-devel
# boost
......
......@@ -2,7 +2,7 @@
# https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux
- name: install dependencies
dnf:
state: installed
state: present
name: "{{ item }}"
with_items:
- rpcbind
......
---
- name: install fitting for Python 3
dnf: state=installed name={{ item }}
become: yes
dnf:
state: present
name: "{{ item }}"
with_items:
- python3-scipy
- python3-scikit-learn
......@@ -9,8 +11,11 @@
when: ansible_distribution == 'Fedora'
- name: install fitting via pip3
pip: executable=pip3 state=installed name={{ item }}
become: yes
pip:
executable: pip3
state: present
name: "{{ item }}"
with_items:
- iminuit
# - kafe
......
......@@ -2,7 +2,7 @@
- name: Software for dependency installation
dnf:
name: "{{ item }}"
state: installed
state: present
become: yes
with_items:
- gcc
......@@ -20,7 +20,7 @@
- name: "Install Python stack for scientific purposes (Distribution)"
package:
name: "{{ item }}"
state: installed
state: present
become: yes
with_items:
- "{{ python2pkg }}"
......@@ -43,7 +43,7 @@
- name: install pip packages Python 2
pip:
name: "{{ item }}"
state: installed
state: present
become: yes
with_items: "{{python2pip}}"
......@@ -60,6 +60,6 @@
pip:
executable: pip3
name: "{{ item }}"
state: installed
state: present
become: yes
with_items: "{{python3pip}}"
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