Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
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
Fix update issues
* installed is no longer supported * some fixes in handlers
parent
a82feb4d
Changes
23
Hide whitespace changes
Inline
Side-by-side
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
...
...
Prev
1
2
Next
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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