Compare commits

...

11 Commits

8 changed files with 104 additions and 38 deletions

View File

@ -1,7 +1,7 @@
$ANSIBLE_VAULT;1.1;AES256
34656463636239626332366464373337386539643933653433653362613238666330636334323465
6666373739386430643330666238366237646365623634370a363530303762373036616332313966
31343339373532346538393164373037396135633631653133663862316161373566633938386234
6366613030386432320a313262383838663262373037643138616131343337626234306436323462
64333262663662353836303365316433353463326664623838353339376164313235363339313238
3865613230306436346365623338366564346633343565623964
61346634373262366638356239623132393734353135376535653433636137363331646432323438
3666376430616632613366653463303431313336346166330a616166366330333038666164626663
62623562333864613537313436323136666336656533346264323730386130316566633432383531
3338333862626664380a366638656363363663303031646366303964333361646336666134333134
37383035613166663838373632343061656537326163303831323335333464613964656531383933
3833343663333130636631643865393933656332616636366263

View File

@ -1,9 +1,10 @@
---
# Manages reactivation of pulseaudio as system daemon
- name: "Changing pulseaudio upstart script"
template:
src: pulseaudio.conf
- name: "Allowing pulseaudio to run at startup"
replace:
regexp: '^#start on runlevel.*$'
replace: 'start on runlevel [2345]'
dest: /etc/init/pulseaudio.conf
owner: root
group: root
@ -29,9 +30,9 @@
- name: Disabling pulseaudio startup on lightdm
shell: chmod -x /usr/bin/start-pulseaudio-x11
#- name: Adding pulseaudio fixing script at reboot.
# lineinfile:
# line: '@reboot root curl -sSL http://{{ ansible_local.domain.serverfqdn }}/ks/preseed/pulseaudio-perms.sh | bash >/dev/null 2>&1'
# dest: /etc/cron.d/pulseaudio-perms
# create: yes
# state: present
- name: Adding pulseaudio fixing script at reboot.
lineinfile:
line: '@reboot root curl -sSL http://{{ ansible_local.domain.serverfqdn }}/ks/preseed/pulseaudio-perms.sh | bash >/dev/null 2>&1'
dest: /etc/cron.d/pulseaudio-perms
create: yes
state: present

View File

@ -1,12 +1,11 @@
---
- name: Removing upgrade-notification from /etc
lineinfile:
dest: /etc/update-manager/release-upgrades
line: "Prompt=never"
regexp: '^Prompt='
state: present
- name: Removing notifications for system upgrade
shell: >
test -f /usr/share/upstart/sessions/update-notifier-release.conf && mv /usr/share/upstart/sessions/update-notifier-release.conf /usr/share/upstart/sessions/update-notifier-release.conf.disabled
- name: Checking for upgrade-notification configuration
stat:
path: /usr/share/upstart/sessions/update-notifier-release.conf
register: update_notifier_release_stat
ignore_errors: yes
#
#- name: Removing notifications for system upgrade
# shell: mv /usr/share/upstart/sessions/update-notifier-release.conf /usr/share/upstart/sessions/update-notifier-release.conf.disabled
# when: update_notifier_release_stat|success

View File

@ -26,10 +26,10 @@
- domain
- gui
- include: sslproxy.yml
tags:
- domain
- crt
#- include: sslproxy.yml
# tags:
# - domain
# - crt
- include: pkgs.yml
tags:

View File

@ -1,16 +1,16 @@
---
# Fixing NetworkManager issues.
- name: Ensuring first NIC will never be disabled again
lineinfile:
line: "{{ item }}"
state: present
dest: /etc/network/interfaces
insertafter: EOF
with_items:
- " "
- "auto eth0"
- "iface eth0 inet dhcp"
#- name: Ensuring first NIC will never be disabled again
# lineinfile:
# line: "{{ item }}"
# state: present
# dest: /etc/network/interfaces
# insertafter: EOF
# with_items:
# - " "
# - "auto eth0"
# - "iface eth0 inet dhcp"
# Hiding icon for any sessions

View File

@ -0,0 +1,42 @@
#!/bin/bash
# Define a fix name. This will be used to check if the fix was already
# applied.
name=samba-downgrade_20161124.sh
# If already applied, skip
if [[ -f "/var/lib/topolin.ia/fixes/${name}.done" ]]; then
echo "Already fixed with ${name}. Skipping."
exit 0
fi
# Make the required modifications.
export DEBIAN_FRONTEND=noninteractive
apt-get install -q -y --force-yes \
-o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" \
libsmbclient=2:4.3.11+dfsg-0ubuntu0.14.04.1 \
python-samba=2:4.3.11+dfsg-0ubuntu0.14.04.1 \
samba=2:4.3.11+dfsg-0ubuntu0.14.04.1 \
samba-common=2:4.3.11+dfsg-0ubuntu0.14.04.1 \
samba-common-bin=2:4.3.11+dfsg-0ubuntu0.14.04.1 \
samba-dsdb-modules=2:4.3.11+dfsg-0ubuntu0.14.04.1 \
samba-libs=2:4.3.11+dfsg-0ubuntu0.14.04.1 \
samba-vfs-modules=2:4.3.11+dfsg-0ubuntu0.14.04.1 \
smbclient=2:4.3.11+dfsg-0ubuntu0.14.04.1 \
libnss-winbind=2:4.3.11+dfsg-0ubuntu0.14.04.1 \
libpam-winbind=2:4.3.11+dfsg-0ubuntu0.14.04.1 \
libwbclient0=2:4.3.11+dfsg-0ubuntu0.14.04.1 \
winbind=2:4.3.11+dfsg-0ubuntu0.14.04.1
pkglist="libsmbclient python-samba samba-common samba-common-bin samba-dsdb-modules samba-libs samba-vfs-modules smbclient libnss-winbind libpam-winbind libwbclient0"
for pkg in ${pkglist}; do
apt-mark auto ${pkg}
apt-mark hold ${pkg}
done
# Once modified the system, ensure to create a check file to skip and not run
# it again if not needed.
mkdir -p /var/lib/topolin.ia/fixes
echo "$(date --iso | tr -d '-')" > /var/lib/topolin.ia/fixes/${name}.done

View File

@ -0,0 +1,18 @@
---
# Permits to apply per-site signed fixes automatically
#
# Prepare a script file, then crypt it with the Domain Administrator password:
# gpg -r info@bglug.it --symmetric --encrypt script.sh > script.sh.gpg
#
# Put the script within the server directory /var/lib/nethserver/ibay/ks/fixes
#
# List the file within domain.yml:
# apply_fixes:
# - script.sh.gpg
#
# Please see roles/prereq/files/samba-downgrade_20161124.sh as a template.
#
- name: Applying local signed fixes
shell: "/usr/bin/curl -sSL http://{{ ansible_local.domain.serverfqdn }}/ks/fixes/{{ item }} | /usr/bin/gpg --passphrase {{ domainadminpasswd }} --decrypt | sudo /bin/bash"
with_items: "{{ ansible_local.domain.apply_fixes|default([]) }}"

View File

@ -10,3 +10,9 @@
tags:
- prereq
- repos
- include: fixes.yml
tags:
- prereq
- fixes
when: ansible_local.domain.apply_fixes is defined