Compare commits
8 Commits
ilariaalpi
...
master
Author | SHA1 | Date | |
---|---|---|---|
156a3b5c01 | |||
f12da6547d | |||
57c5e8051c | |||
1a02b94ccb | |||
c02e481d80 | |||
550dd29b47 | |||
b4e45bc77d | |||
e6ac8c5c27 |
@ -1,6 +1,7 @@
|
||||
$ANSIBLE_VAULT;1.1;AES256
|
||||
38373236666661616335383136393366616563663962313930373937616534393235363439353830
|
||||
3436663732616632366330346235656462346161386132660a313065626266306237316239356539
|
||||
32333139333462363038333433303235386330613562636663323864373033633363373334346639
|
||||
6537366431376238370a303366313330626139353266383430346266626337653431376665633934
|
||||
35306533373031613339373234623161306163313765353336663836643664346333
|
||||
34656463636239626332366464373337386539643933653433653362613238666330636334323465
|
||||
6666373739386430643330666238366237646365623634370a363530303762373036616332313966
|
||||
31343339373532346538393164373037396135633631653133663862316161373566633938386234
|
||||
6366613030386432320a313262383838663262373037643138616131343337626234306436323462
|
||||
64333262663662353836303365316433353463326664623838353339376164313235363339313238
|
||||
3865613230306436346365623338366564346633343565623964
|
||||
|
@ -49,13 +49,3 @@
|
||||
state: present
|
||||
with_items: "{{ base_docenti_addpkg }}"
|
||||
when: ansible_local.noderole.role == 'docenti' and base_docenti_addpkg|length > 0
|
||||
|
||||
- name: Correggo NetworkManager per gestire la rete
|
||||
lineinfile:
|
||||
dest: /etc/network/interfaces
|
||||
regexp: "{{ item }}"
|
||||
state: absent
|
||||
when: ansible_product_name != "VirtualBox"
|
||||
with_items:
|
||||
- ^auto eth0
|
||||
- ^iface eth0
|
||||
|
@ -8,5 +8,5 @@
|
||||
state: absent
|
||||
when: ansible_product_name != "VirtualBox"
|
||||
with_items:
|
||||
- '^auto eth0'
|
||||
- '^iface eth0'
|
||||
- '^auto {{ ansible_default_ipv4.interface }}'
|
||||
- '^iface {{ ansible_default_ipv4.interface }}'
|
||||
|
@ -19,6 +19,12 @@
|
||||
state: absent
|
||||
when: get_epo_srv_name|changed
|
||||
|
||||
- name: Ensuring epoptes-client is installed
|
||||
apt:
|
||||
name: epoptes-client
|
||||
state: present
|
||||
when: get_epo_srv_name|changed
|
||||
|
||||
- name: Configuring the client
|
||||
replace:
|
||||
dest: /etc/default/epoptes-client
|
||||
|
@ -1,6 +1,11 @@
|
||||
---
|
||||
# Managing Epoptes installation on 'docenti' role.
|
||||
|
||||
- name: Ensuring epoptes package has been installed
|
||||
apt:
|
||||
name: epoptes
|
||||
state: present
|
||||
|
||||
- name: Configuring the Epoptes server
|
||||
lineinfile:
|
||||
dest: /etc/default/epoptes
|
||||
@ -29,3 +34,19 @@
|
||||
- name: Starting epoptes from upstart
|
||||
shell: /sbin/start epoptes
|
||||
when: epoptes_status.stdout.find("start/running") == -1
|
||||
|
||||
# Disabling ufw as per issue #12
|
||||
- name: Disabling ufw by override
|
||||
lineinfile:
|
||||
path: /etc/init/ufw.override
|
||||
line: "manual"
|
||||
state: present
|
||||
create: yes
|
||||
owner: root
|
||||
group: root
|
||||
mode: 0644
|
||||
|
||||
- name: Stopping ufw
|
||||
service:
|
||||
name: ufw
|
||||
state: stopped
|
||||
|
@ -29,9 +29,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
|
||||
|
9
roles/domain/tasks/cleanup.yml
Normal file
9
roles/domain/tasks/cleanup.yml
Normal file
@ -0,0 +1,9 @@
|
||||
---
|
||||
# Final tasks.
|
||||
|
||||
- name: Ensuring APT stack is healthy
|
||||
shell: dpkg --configure -a && apt-get install -f
|
||||
|
||||
# Correctly managing ansible-pull runs.
|
||||
- name: Updating local version for repo
|
||||
shell: 'rm -f {{ ansible_local.checksum.repover_file }} && echo "{{ ansible_local.checksum.repover }}" > {{ ansible_local.checksum.repover_file }}'
|
@ -1,6 +1,11 @@
|
||||
---
|
||||
# Domain configurations
|
||||
|
||||
- include: networkmanager.yml
|
||||
tags:
|
||||
- domain
|
||||
- networkmanager
|
||||
|
||||
- include: ntp.yml
|
||||
tags:
|
||||
- domain
|
||||
@ -52,5 +57,7 @@
|
||||
- domain
|
||||
- join
|
||||
|
||||
- name: Updating local version for repo
|
||||
shell: 'rm -f {{ ansible_local.checksum.repover_file }} && echo "{{ ansible_local.checksum.repover }}" > {{ ansible_local.checksum.repover_file }}'
|
||||
- include: cleanup.yml
|
||||
tags:
|
||||
- domain
|
||||
- cleanup
|
||||
|
19
roles/domain/tasks/networkmanager.yml
Normal file
19
roles/domain/tasks/networkmanager.yml
Normal file
@ -0,0 +1,19 @@
|
||||
---
|
||||
# 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"
|
||||
|
||||
# Hiding icon for any sessions
|
||||
|
||||
- name: Disabling NetworkManager from popping up in sessions
|
||||
shell: mv /etc/xdg/autostart/nm-applet.desktop /etc/xdg/autostart/nm-applet.desktop.disabled
|
||||
ignore_errors: yes
|
@ -18,14 +18,14 @@
|
||||
ignore_errors: yes
|
||||
changed_when: "'2:4.1.6+dfsg-1ubuntu2' not in check_samba_version.stdout"
|
||||
|
||||
- name: Downgrading SAMBA if not the right version
|
||||
shell: "/var/lib/{{ ansible_local.domain.domainfull }}/bin/downgrade_samba.sh"
|
||||
when: check_samba_version|changed
|
||||
|
||||
- name: Checking again for the correct SAMBA version
|
||||
shell: dpkg -l | grep libsmbclient
|
||||
register: recheck_samba_version
|
||||
changed_when: "'2:4.1.6+dfsg-1ubuntu2' in check_samba_version.stdout"
|
||||
#- name: Downgrading SAMBA if not the right version
|
||||
# shell: "/var/lib/{{ ansible_local.domain.domainfull }}/bin/downgrade_samba.sh"
|
||||
# when: check_samba_version|changed
|
||||
#
|
||||
#- name: Checking again for the correct SAMBA version
|
||||
# shell: dpkg -l | grep libsmbclient
|
||||
# register: recheck_samba_version
|
||||
# changed_when: "'2:4.1.6+dfsg-1ubuntu2' in check_samba_version.stdout"
|
||||
|
||||
- name: Installing domain packages
|
||||
apt:
|
||||
|
@ -1,5 +1,8 @@
|
||||
---
|
||||
|
||||
- name: Fixing APT issues, every time.
|
||||
shell: dpkg --configure -a && apt-get install -f
|
||||
|
||||
- name: Domain settings download
|
||||
get_url:
|
||||
url: "http://{{ ansible_default_ipv4.gateway }}:3000/domain"
|
||||
|
@ -8,6 +8,51 @@
|
||||
dest: /etc/apt/sources.list
|
||||
force: yes
|
||||
|
||||
- name: Checking for libreoffice PPA GPG key
|
||||
shell: apt-key list | grep -q 1378B444
|
||||
register: check_gpg_libreoffice
|
||||
ignore_errors: yes
|
||||
|
||||
- name: Installing libreoffice PPA GPG key
|
||||
shell: apt-key adv --keyserver keyserver.ubuntu.com --recv 1378B444
|
||||
when: check_gpg_libreoffice|failed
|
||||
|
||||
- name: Checking for ansible PPA GPG key
|
||||
shell: apt-key list | grep -q 7BB9C367
|
||||
register: check_gpg_ansible
|
||||
ignore_errors: yes
|
||||
|
||||
- name: Installing ansible PPA GPG key
|
||||
shell: apt-key adv --keyserver keyserver.ubuntu.com --recv 7BB9C367
|
||||
when: check_gpg_ansible|failed
|
||||
|
||||
- name: Checking for epoptes PPA GPG key
|
||||
shell: apt-key list | grep -q 0350B375
|
||||
register: check_gpg_epoptes
|
||||
ignore_errors: yes
|
||||
|
||||
- name: Installing epoptes PPA GPG key
|
||||
shell: apt-key adv --keyserver keyserver.ubuntu.com --recv 0350B375
|
||||
when: check_gpg_epoptes|failed
|
||||
|
||||
- name: Checking for geogebra GPG key
|
||||
shell: apt-key list | grep -q 83A736CF
|
||||
register: check_gpg_geogebra
|
||||
ignore_errors: yes
|
||||
|
||||
- name: Installing geogebra GPG key
|
||||
shell: apt-key adv --keyserver keyserver.ubuntu.com --recv 83A736CF
|
||||
when: check_gpg_geogebra|failed
|
||||
|
||||
- name: Removing old repositories (if present)
|
||||
file:
|
||||
path: "{{ item }}"
|
||||
state: absent
|
||||
with_items:
|
||||
- ansible.list
|
||||
- geogebra.list
|
||||
- libreoffice.list
|
||||
|
||||
- name: Adding additional repositories
|
||||
get_url:
|
||||
url: "http://{{ ansible_local.domain.serverfqdn }}/ks/repoconfig/{{ item }}"
|
||||
@ -16,6 +61,8 @@
|
||||
with_items:
|
||||
- ansible-ansible-trusty.list
|
||||
- libreoffice-ppa-trusty.list
|
||||
- epoptes-ppa-trusty.list
|
||||
- geogebra-stable.list
|
||||
- bglug-trusty.list
|
||||
|
||||
- name: Updating package database
|
||||
|
Loading…
x
Reference in New Issue
Block a user