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