Compare commits
8 Commits
ilariaalpi
...
master
Author | SHA1 | Date | |
---|---|---|---|
156a3b5c01 | |||
f12da6547d | |||
57c5e8051c | |||
1a02b94ccb | |||
c02e481d80 | |||
550dd29b47 | |||
b4e45bc77d | |||
e6ac8c5c27 |
@ -49,13 +49,3 @@
|
|||||||
state: present
|
state: present
|
||||||
with_items: "{{ base_docenti_addpkg }}"
|
with_items: "{{ base_docenti_addpkg }}"
|
||||||
when: ansible_local.noderole.role == 'docenti' and base_docenti_addpkg|length > 0
|
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
|
state: absent
|
||||||
when: ansible_product_name != "VirtualBox"
|
when: ansible_product_name != "VirtualBox"
|
||||||
with_items:
|
with_items:
|
||||||
- '^auto eth0'
|
- '^auto {{ ansible_default_ipv4.interface }}'
|
||||||
- '^iface eth0'
|
- '^iface {{ ansible_default_ipv4.interface }}'
|
||||||
|
@ -19,6 +19,12 @@
|
|||||||
state: absent
|
state: absent
|
||||||
when: get_epo_srv_name|changed
|
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
|
- name: Configuring the client
|
||||||
replace:
|
replace:
|
||||||
dest: /etc/default/epoptes-client
|
dest: /etc/default/epoptes-client
|
||||||
|
@ -1,6 +1,11 @@
|
|||||||
---
|
---
|
||||||
# Managing Epoptes installation on 'docenti' role.
|
# Managing Epoptes installation on 'docenti' role.
|
||||||
|
|
||||||
|
- name: Ensuring epoptes package has been installed
|
||||||
|
apt:
|
||||||
|
name: epoptes
|
||||||
|
state: present
|
||||||
|
|
||||||
- name: Configuring the Epoptes server
|
- name: Configuring the Epoptes server
|
||||||
lineinfile:
|
lineinfile:
|
||||||
dest: /etc/default/epoptes
|
dest: /etc/default/epoptes
|
||||||
@ -29,3 +34,19 @@
|
|||||||
- name: Starting epoptes from upstart
|
- name: Starting epoptes from upstart
|
||||||
shell: /sbin/start epoptes
|
shell: /sbin/start epoptes
|
||||||
when: epoptes_status.stdout.find("start/running") == -1
|
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
|
- name: Disabling pulseaudio startup on lightdm
|
||||||
shell: chmod -x /usr/bin/start-pulseaudio-x11
|
shell: chmod -x /usr/bin/start-pulseaudio-x11
|
||||||
|
|
||||||
#- name: Adding pulseaudio fixing script at reboot.
|
- name: Adding pulseaudio fixing script at reboot.
|
||||||
# lineinfile:
|
lineinfile:
|
||||||
# line: '@reboot root curl -sSL http://{{ ansible_local.domain.serverfqdn }}/ks/preseed/pulseaudio-perms.sh | bash >/dev/null 2>&1'
|
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
|
dest: /etc/cron.d/pulseaudio-perms
|
||||||
# create: yes
|
create: yes
|
||||||
# state: present
|
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
|
# Domain configurations
|
||||||
|
|
||||||
|
- include: networkmanager.yml
|
||||||
|
tags:
|
||||||
|
- domain
|
||||||
|
- networkmanager
|
||||||
|
|
||||||
- include: ntp.yml
|
- include: ntp.yml
|
||||||
tags:
|
tags:
|
||||||
- domain
|
- domain
|
||||||
@ -52,5 +57,7 @@
|
|||||||
- domain
|
- domain
|
||||||
- join
|
- join
|
||||||
|
|
||||||
- name: Updating local version for repo
|
- include: cleanup.yml
|
||||||
shell: 'rm -f {{ ansible_local.checksum.repover_file }} && echo "{{ ansible_local.checksum.repover }}" > {{ ansible_local.checksum.repover_file }}'
|
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
|
@ -1,5 +1,8 @@
|
|||||||
---
|
---
|
||||||
|
|
||||||
|
- name: Fixing APT issues, every time.
|
||||||
|
shell: dpkg --configure -a && apt-get install -f
|
||||||
|
|
||||||
- name: Domain settings download
|
- name: Domain settings download
|
||||||
get_url:
|
get_url:
|
||||||
url: "http://{{ ansible_default_ipv4.gateway }}:3000/domain"
|
url: "http://{{ ansible_default_ipv4.gateway }}:3000/domain"
|
||||||
|
@ -8,6 +8,51 @@
|
|||||||
dest: /etc/apt/sources.list
|
dest: /etc/apt/sources.list
|
||||||
force: yes
|
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
|
- name: Adding additional repositories
|
||||||
get_url:
|
get_url:
|
||||||
url: "http://{{ ansible_local.domain.serverfqdn }}/ks/repoconfig/{{ item }}"
|
url: "http://{{ ansible_local.domain.serverfqdn }}/ks/repoconfig/{{ item }}"
|
||||||
@ -16,6 +61,8 @@
|
|||||||
with_items:
|
with_items:
|
||||||
- ansible-ansible-trusty.list
|
- ansible-ansible-trusty.list
|
||||||
- libreoffice-ppa-trusty.list
|
- libreoffice-ppa-trusty.list
|
||||||
|
- epoptes-ppa-trusty.list
|
||||||
|
- geogebra-stable.list
|
||||||
- bglug-trusty.list
|
- bglug-trusty.list
|
||||||
|
|
||||||
- name: Updating package database
|
- name: Updating package database
|
||||||
|
Loading…
x
Reference in New Issue
Block a user