mirror of
https://github.com/iiab/iiab.git
synced 2025-02-12 11:12:06 +00:00
stage 4 installed
This commit is contained in:
parent
579fa10b05
commit
29b28d8393
9 changed files with 58 additions and 3 deletions
|
@ -34,7 +34,7 @@
|
|||
- name: Install Bluetooth - only on Raspberry Pi
|
||||
include_role:
|
||||
name: bluetooth
|
||||
when: is_rpi and bluetooth_install
|
||||
when: (is_rpi and bluetooth_install) or pan_bluetooth_installed is defined
|
||||
tags: bluetooth
|
||||
|
||||
- name: USB-LIB
|
||||
|
@ -68,13 +68,13 @@
|
|||
- name: CUPS
|
||||
include_role:
|
||||
name: cups
|
||||
when: cups_install | bool
|
||||
when: cups_install | bool or cups_installed is defined
|
||||
tags: cups
|
||||
|
||||
- name: SAMBA
|
||||
include_role:
|
||||
name: samba
|
||||
when: samba_install | bool
|
||||
when: samba_install | bool or samba_installed is defined
|
||||
tags: samba
|
||||
|
||||
- name: Run /usr/bin/iiab-refresh-wiki-docs (scraper script) to create http://box/info offline documentation. (This script was installed at the beginning of Stage 3 = roles/3-base-server/tasks/main.yml, which ran Apache playbook = roles/httpd/tasks/main.yml)
|
||||
|
|
|
@ -119,6 +119,13 @@
|
|||
state: absent
|
||||
when: not captive_portal_enabled
|
||||
|
||||
- name: Add 'captiveportal_installed' variable values to {{ iiab_installed }}
|
||||
lineinfile:
|
||||
dest: "{{ iiab_installed }}"
|
||||
regexp: '^captiveportal_installed'
|
||||
line: 'captiveportal_installed: True'
|
||||
state: present
|
||||
|
||||
- name: Restart Apache service ({{ apache_service }}) # i.e. apache2 on most distros
|
||||
systemd:
|
||||
name: "{{ apache_service }}"
|
||||
|
|
|
@ -7,6 +7,13 @@
|
|||
tags:
|
||||
- download
|
||||
|
||||
- name: Add 'cups_installed' variable values to {{ iiab_installed }}
|
||||
lineinfile:
|
||||
dest: "{{ iiab_installed }}"
|
||||
regexp: '^cups_installed'
|
||||
line: 'cups_installed: True'
|
||||
state: present
|
||||
|
||||
- name: Install our own /etc/cups/cupsd.conf from template, to permit local LAN admin
|
||||
template:
|
||||
src: cupsd.conf
|
||||
|
|
|
@ -49,3 +49,10 @@
|
|||
mode: 0750
|
||||
state: directory
|
||||
when: ansible_distribution == "CentOS"
|
||||
|
||||
- name: Add 'dansguardian_installed' variable values to {{ iiab_installed }}
|
||||
lineinfile:
|
||||
dest: "{{ iiab_installed }}"
|
||||
regexp: '^dansguardian_installed'
|
||||
line: 'dansguardian_installed: True'
|
||||
state: present
|
||||
|
|
|
@ -59,3 +59,10 @@
|
|||
mode: 0644
|
||||
state: file
|
||||
when: is_redhat | bool
|
||||
|
||||
- name: Add 'dhcpd_installed' variable values to {{ iiab_installed }}
|
||||
lineinfile:
|
||||
dest: "{{ iiab_installed }}"
|
||||
regexp: '^dhcpd_installed'
|
||||
line: 'dhcpd_installed: True'
|
||||
state: present
|
||||
|
|
|
@ -100,6 +100,13 @@
|
|||
state: absent
|
||||
when: not is_debuntu and not dns_jail_enabled
|
||||
|
||||
- name: Add 'named_installed' variable values to {{ iiab_installed }}
|
||||
lineinfile:
|
||||
dest: "{{ iiab_installed }}"
|
||||
regexp: '^named_installed'
|
||||
line: 'named_installed: True'
|
||||
state: present
|
||||
|
||||
- name: Start named systemd service
|
||||
systemd:
|
||||
name: "{{ dns_service }}"
|
||||
|
|
|
@ -82,6 +82,13 @@
|
|||
- include_tasks: roles/network/tasks/dansguardian.yml
|
||||
when: dansguardian_install | bool
|
||||
|
||||
- name: Add 'squid_installed' variable values to {{ iiab_installed }}
|
||||
lineinfile:
|
||||
dest: "{{ iiab_installed }}"
|
||||
regexp: '^squid_installed'
|
||||
line: 'squid_installed: True'
|
||||
state: present
|
||||
|
||||
# {{ proxy }} is normally "squid", but is "squid3" on raspbian-8 & debian-8
|
||||
- name: Add '{{ proxy }}' variable values to {{ iiab_ini_file }}
|
||||
ini_file:
|
||||
|
|
|
@ -30,6 +30,13 @@
|
|||
src: smb.conf.j2
|
||||
dest: /etc/samba/smb.conf
|
||||
|
||||
- name: Add 'samba_installed' variable values to {{ iiab_installed }}
|
||||
lineinfile:
|
||||
dest: "{{ iiab_installed }}"
|
||||
regexp: '^samba_installed'
|
||||
line: 'samba_installed: True'
|
||||
state: present
|
||||
|
||||
- name: Enable & Start Samba systemd service
|
||||
service:
|
||||
name: "{{ smb_service }}"
|
||||
|
|
6
runrole
6
runrole
|
@ -24,6 +24,12 @@ if [ "$1" == "--reinstall" ]; then
|
|||
if [ $2 == "calibre-web" ]; then # role directory & installed marker differ
|
||||
sed -i -e '/^calibreweb/d' /etc/iiab/config_vars2.yml
|
||||
fi
|
||||
if [ $2 == "captive-portal" ]; then # role directory & installed marker differ
|
||||
sed -i -e '/^captiveportal/d' /etc/iiab/config_vars2.yml
|
||||
fi
|
||||
if [ $2 == "bluetooth" ]; then # role directory & installed marker differ
|
||||
sed -i -e '/^pan_bluetooth/d' /etc/iiab/config_vars2.yml
|
||||
fi
|
||||
sed -i -e "/^$2/d" /etc/iiab/config_vars2.yml
|
||||
fi
|
||||
shift 1
|
||||
|
|
Loading…
Reference in a new issue