Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
ansible
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
36
Issues
36
List
Boards
Labels
Service Desk
Milestones
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
las-it-organisation
32-0-IT instructions and rules
ansible
Commits
2863d594
Commit
2863d594
authored
Aug 14, 2017
by
julian.gethmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix update issues
* installed is no longer supported * some fixes in handlers
parent
a82feb4d
Changes
23
Hide whitespace changes
Inline
Side-by-side
Showing
23 changed files
with
119 additions
and
47 deletions
+119
-47
admin.yml
admin.yml
+3
-1
desktop.yml
desktop.yml
+1
-1
group_vars/all
group_vars/all
+1
-1
roles/clients/tasks/basic_software.yml
roles/clients/tasks/basic_software.yml
+6
-2
roles/clients/tasks/cups.yml
roles/clients/tasks/cups.yml
+19
-4
roles/common/tasks/etckeeper.yml
roles/common/tasks/etckeeper.yml
+33
-8
roles/common/tasks/hostname.yml
roles/common/tasks/hostname.yml
+1
-1
roles/common/tasks/ntp.yml
roles/common/tasks/ntp.yml
+1
-1
roles/common/tasks/smartd.yml
roles/common/tasks/smartd.yml
+1
-1
roles/common/tasks/software.yml
roles/common/tasks/software.yml
+4
-2
roles/common/tasks/sshd.yml
roles/common/tasks/sshd.yml
+2
-2
roles/common/tasks/sudoer.yml
roles/common/tasks/sudoer.yml
+18
-3
roles/google-chrome/tasks/main.yml
roles/google-chrome/tasks/main.yml
+1
-1
roles/ipynb/tasks/notebooks.yml
roles/ipynb/tasks/notebooks.yml
+5
-3
roles/kdev/tasks/kdevelop-python.yml
roles/kdev/tasks/kdevelop-python.yml
+3
-1
roles/lasarchiv/tasks/nfs.yml
roles/lasarchiv/tasks/nfs.yml
+3
-3
roles/latex/tasks/LateX.yml
roles/latex/tasks/LateX.yml
+2
-2
roles/mad8/tasks/mad8.yml
roles/mad8/tasks/mad8.yml
+1
-1
roles/mail/tasks/main.yml
roles/mail/tasks/main.yml
+1
-1
roles/naff_cpp/tasks/main.yml
roles/naff_cpp/tasks/main.yml
+1
-1
roles/nfs-server/tasks/nfsd.yml
roles/nfs-server/tasks/nfsd.yml
+1
-1
roles/python_stack/tasks/fitting.yml
roles/python_stack/tasks/fitting.yml
+7
-2
roles/python_stack/tasks/python.yml
roles/python_stack/tasks/python.yml
+4
-4
No files found.
admin.yml
View file @
2863d594
-
hosts
:
admin_pcs
tasks
:
-
name
:
install admin software
dnf
:
name={{ item }} state=installed
become
:
yes
dnf
:
name
:
"
{{
item
}}"
state
:
present
with_items
:
"
{{
admin_software
}}"
desktop.yml
View file @
2863d594
...
...
@@ -3,7 +3,7 @@
-
name
:
install desktop software
dnf
:
name
:
"
{{
item
}}"
state
:
installed
state
:
present
become
:
yes
when
:
ansible_distribution == 'Fedora'
with_items
:
...
...
group_vars/all
View file @
2863d594
...
...
@@ -34,7 +34,7 @@ desktop_software:
- thunderbird
- firefox
- libreoffice
- bwSyncAndShare
#
- bwSyncAndShare
- perl-Clipboard
- perl-Capture-Tiny
...
...
roles/clients/tasks/basic_software.yml
View file @
2863d594
---
-
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
roles/clients/tasks/cups.yml
View file @
2863d594
---
-
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"
...
...
roles/common/tasks/etckeeper.yml
View file @
2863d594
---
-
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
roles/common/tasks/hostname.yml
View file @
2863d594
...
...
@@ -3,7 +3,7 @@
become
:
yes
dnf
:
name
:
'
{{
item
}}'
state
:
installed
state
:
present
with_items
:
-
NetworkManager-glib
-
libnm-qt-devel.x86_64
...
...
roles/common/tasks/ntp.yml
View file @
2863d594
---
-
name
:
install ntpdate
package
:
state
:
installed
state
:
present
name
:
ntpdate
become
:
yes
...
...
roles/common/tasks/smartd.yml
View file @
2863d594
...
...
@@ -3,7 +3,7 @@
become
:
yes
package
:
name
:
smartmontools
state
:
installed
state
:
present
notify
:
-
enable smartd
-
restart smartd
...
...
roles/common/tasks/software.yml
View file @
2863d594
---
-
name
:
install common software
package
:
name={{item}} state=installed
with_items
:
"
{{
common_software
}}"
become
:
true
package
:
name
:
"
{{
item
}}"
state
:
present
with_items
:
"
{{
common_software
}}"
roles/common/tasks/sshd.yml
View file @
2863d594
...
...
@@ -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)
...
...
roles/common/tasks/sudoer.yml
View file @
2863d594
---
-
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"
roles/google-chrome/tasks/main.yml
View file @
2863d594
...
...
@@ -13,4 +13,4 @@
become
:
yes
dnf
:
name
:
google-chrome-stable
state
:
installed
state
:
present
roles/ipynb/tasks/notebooks.yml
View file @
2863d594
---
-
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
...
...
roles/kdev/tasks/kdevelop-python.yml
View file @
2863d594
---
-
name
:
install KDevelop with Python support
package
:
name=kdevelop-python state=installed
package
:
name
:
kdevelop-python
state
:
present
become
:
yes
roles/lasarchiv/tasks/nfs.yml
View file @
2863d594
---
-
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'
...
...
roles/latex/tasks/LateX.yml
View file @
2863d594
...
...
@@ -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"
...
...
roles/mad8/tasks/mad8.yml
View file @
2863d594
...
...
@@ -2,7 +2,7 @@
-
name
:
install MAD-8
dnf
:
name
:
"
{{
item
}}"
state
:
installed
state
:
present
become
:
yes
with_items
:
-
"
MAD-8"
...
...
roles/mail/tasks/main.yml
View file @
2863d594
...
...
@@ -3,7 +3,7 @@
become
:
yes
package
:
name
:
"
{{
item
}}"
state
:
installed
state
:
present
with_items
:
-
ssmtp
-
mailx
...
...
roles/naff_cpp/tasks/main.yml
View file @
2863d594
...
...
@@ -5,7 +5,7 @@
become
:
yes
dnf
:
name
:
"
{{
item
}}"
state
:
installed
state
:
present
with_items
:
-
boost-devel
# boost
...
...
roles/nfs-server/tasks/nfsd.yml
View file @
2863d594
...
...
@@ -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
...
...
roles/python_stack/tasks/fitting.yml
View file @
2863d594
---
-
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
...
...
roles/python_stack/tasks/python.yml
View file @
2863d594
...
...
@@ -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}}"
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment