mirror of
https://github.com/iiab/iiab.git
synced 2025-03-09 15:40:17 +00:00
commit
c73e8cf6b8
21 changed files with 120 additions and 112 deletions
|
@ -19,11 +19,11 @@ fi
|
||||||
|
|
||||||
OS="unknown" # will be overridden below, if /etc/iiab/iiab.env is legit
|
OS="unknown" # will be overridden below, if /etc/iiab/iiab.env is legit
|
||||||
if [ -f /etc/iiab/iiab.env ]; then
|
if [ -f /etc/iiab/iiab.env ]; then
|
||||||
echo "Running /etc/iiab/iiab.env"
|
echo "Reading /etc/iiab/iiab.env"
|
||||||
source /etc/iiab/iiab.env
|
source /etc/iiab/iiab.env
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "Ansible will now run iiab-network.yml -- monitor log file iiab-network.log"
|
echo "Ansible will now run iiab-network.yml -- log file is iiab-network.log"
|
||||||
Start=`date`
|
Start=`date`
|
||||||
ansible-playbook -i ansible_hosts iiab-network.yml --connection=local
|
ansible-playbook -i ansible_hosts iiab-network.yml --connection=local
|
||||||
End=`date`
|
End=`date`
|
||||||
|
|
|
@ -12,5 +12,7 @@ calibre_sample_book: "Metamorphosis-jackson.epub"
|
||||||
|
|
||||||
calibre_src_url: "https://raw.githubusercontent.com/kovidgoyal/calibre/master/setup/linux-installer.py"
|
calibre_src_url: "https://raw.githubusercontent.com/kovidgoyal/calibre/master/setup/linux-installer.py"
|
||||||
|
|
||||||
calibre_debs_on_debian: true
|
|
||||||
# USE TO TEST debs.yml (RASPBIAN APPROACH!) ON DEBIAN 9.X
|
# USE TO TEST debs.yml (RASPBIAN APPROACH!) ON DEBIAN 9.X
|
||||||
|
calibre_debs_on_debian: True
|
||||||
|
# enable calibre unstable
|
||||||
|
calibre_unstable: False
|
||||||
|
|
|
@ -1,12 +1,24 @@
|
||||||
- name: Start by installing OS's Calibre package
|
- name: Start by installing OS's Calibre package
|
||||||
package:
|
package:
|
||||||
name: calibre
|
name: "{{ item }}"
|
||||||
state: present
|
state: latest
|
||||||
|
with_items:
|
||||||
|
- calibre
|
||||||
|
- calibre-bin
|
||||||
|
when: internet_available
|
||||||
|
|
||||||
# April 5 2018 raspbian is now tracking the latest Calibre with a small delay.
|
# April 5 2018 raspbian is now tracking the latest Calibre with a small delay.
|
||||||
# Should you really want the latest just run the below script standalone, it is
|
# Should you really want the latest just run the below script standalone, it is
|
||||||
# strongly suggested that waiting for the lastest deb from Rasbian is the best.
|
# strongly suggested that waiting for the lastest deb from Raspbian is the best.
|
||||||
|
|
||||||
- name: Upgrade latest Calibre
|
- name: Upgrade to testing Calibre - RPi
|
||||||
|
command: scripts/calibre-install-latest-rpi.sh
|
||||||
|
when: is_rpi and internet_available
|
||||||
|
|
||||||
|
- name: Upgrade to testing Calibre - non-RPi
|
||||||
command: scripts/calibre-install-latest.sh
|
command: scripts/calibre-install-latest.sh
|
||||||
when: not is_rpi
|
when: not is_rpi and not is_ubuntu_18 and internet_available
|
||||||
|
|
||||||
|
- name: Upgrade to unstable Calibre - all
|
||||||
|
command: scripts/calibre-install-unstable.sh
|
||||||
|
when: calibre_unstable and internet_available
|
||||||
|
|
|
@ -3,13 +3,16 @@
|
||||||
# RUNS IF /usr/bin/calibre-uninstall DOES NOT ALEADY EXIST
|
# RUNS IF /usr/bin/calibre-uninstall DOES NOT ALEADY EXIST
|
||||||
- name: Install Calibre via calibre-installer.py (redhat, ubuntu, debian if NOT calibre_debs_on_debian)
|
- name: Install Calibre via calibre-installer.py (redhat, ubuntu, debian if NOT calibre_debs_on_debian)
|
||||||
include_tasks: py-installer.yml
|
include_tasks: py-installer.yml
|
||||||
when: is_redhat or is_ubuntu or (is_debian and not calibre_debs_on_debian)
|
when: is_redhat or (is_ubuntu and not is_ubuntu_18) or (is_debian and not calibre_debs_on_debian)
|
||||||
#when: not is_rpi
|
#when: not is_rpi
|
||||||
|
|
||||||
- name: Install Calibre via .debs (Raspbian, Debian if calibre_debs_on_debian)
|
- name: Install Calibre via .debs (Raspbian, Debian if calibre_debs_on_debian)
|
||||||
include_tasks: debs.yml
|
include_tasks: debs.yml
|
||||||
when: is_rpi or (is_debian and calibre_debs_on_debian)
|
when: is_rpi or (is_debian and calibre_debs_on_debian)
|
||||||
#when: is_rpi or is_debian # (is_debian also covers & includes is_rpi)
|
|
||||||
|
- name: Install Calibre via .debs (Ubuntu 18.xx)
|
||||||
|
include_tasks: debs.yml
|
||||||
|
when: is_ubuntu_18
|
||||||
|
|
||||||
- name: Create calibre-serve.service and calibre.conf
|
- name: Create calibre-serve.service and calibre.conf
|
||||||
template:
|
template:
|
||||||
|
|
|
@ -29,22 +29,11 @@
|
||||||
when: iiab_wireless_lan_iface is defined and hostapd_enabled and iiab_network_mode != "Appliance"
|
when: iiab_wireless_lan_iface is defined and hostapd_enabled and iiab_network_mode != "Appliance"
|
||||||
|
|
||||||
- name: Reload systemd
|
- name: Reload systemd
|
||||||
shell: systemctl daemon-reload
|
systemd:
|
||||||
|
daemon_reload: yes
|
||||||
|
|
||||||
- name: Restart the NetworkManager service
|
- name: Restart the NetworkManager service
|
||||||
service:
|
systemd:
|
||||||
name: network-manager
|
name: network-manager
|
||||||
state: restarted
|
state: restarted
|
||||||
when: not nobridge is defined and not no_net_restart
|
when: not nobridge is defined and not no_net_restart
|
||||||
|
|
||||||
- name: Restart hostapd when WiFi is present
|
|
||||||
service:
|
|
||||||
name: hostapd
|
|
||||||
state: restarted
|
|
||||||
when: iiab_wireless_lan_iface is defined and hostapd_enabled and iiab_network_mode != "Appliance"
|
|
||||||
|
|
||||||
- name: dhcp_server may be affected - starting - user choice
|
|
||||||
service:
|
|
||||||
name: "{{ dhcp_service2 }}"
|
|
||||||
state: started
|
|
||||||
when: iiab_network_mode != "Appliance"
|
|
||||||
|
|
|
@ -58,7 +58,8 @@
|
||||||
when: dnsmasq_install
|
when: dnsmasq_install
|
||||||
|
|
||||||
- name: Reload systemd
|
- name: Reload systemd
|
||||||
shell: systemctl daemon-reload
|
systemd:
|
||||||
|
daemon_reload: yes
|
||||||
|
|
||||||
# now pick up denyinterfaces
|
# now pick up denyinterfaces
|
||||||
- name: Restart dhcpcd
|
- name: Restart dhcpcd
|
||||||
|
@ -68,11 +69,3 @@
|
||||||
- name: Restart the networking service
|
- name: Restart the networking service
|
||||||
service: name=networking state=restarted
|
service: name=networking state=restarted
|
||||||
when: not nobridge is defined and not no_net_restart
|
when: not nobridge is defined and not no_net_restart
|
||||||
|
|
||||||
- name: Restart hostapd when WiFi is present
|
|
||||||
service: name=hostapd state=restarted
|
|
||||||
when: iiab_wireless_lan_iface is defined and hostapd_enabled and iiab_network_mode != "Appliance"
|
|
||||||
|
|
||||||
#- name: dhcp_server may be affected - starting - user choice
|
|
||||||
# service: name={{ dhcp_service2 }} state=started
|
|
||||||
# when: iiab_network_mode != "Appliance"
|
|
||||||
|
|
|
@ -1,9 +1,3 @@
|
||||||
- name: Disable the Access Point 'hostapd' service
|
|
||||||
service: enabled=no
|
|
||||||
name=hostapd.service
|
|
||||||
when: not iiab_wireless_lan_iface is defined or iiab_network_mode == "Appliance"
|
|
||||||
#or not hostapd_enabled
|
|
||||||
|
|
||||||
- name: Disable dhcpd service
|
- name: Disable dhcpd service
|
||||||
service: name=dhcpd
|
service: name=dhcpd
|
||||||
enabled=no
|
enabled=no
|
||||||
|
|
|
@ -16,12 +16,6 @@
|
||||||
mode: 0644
|
mode: 0644
|
||||||
when: discovered_wireless_iface is defined
|
when: discovered_wireless_iface is defined
|
||||||
|
|
||||||
- name: Disable the Access Point 'hostapd' service
|
|
||||||
service:
|
|
||||||
enabled: no
|
|
||||||
name: hostapd.service
|
|
||||||
when: not hostapd_enabled
|
|
||||||
|
|
||||||
- name: Use custom systemd unit file to start 'hostapd' service
|
- name: Use custom systemd unit file to start 'hostapd' service
|
||||||
template:
|
template:
|
||||||
src: hostapd/hostapd.service.j2
|
src: hostapd/hostapd.service.j2
|
||||||
|
@ -37,6 +31,7 @@
|
||||||
owner: root
|
owner: root
|
||||||
group: root
|
group: root
|
||||||
mode: 0755
|
mode: 0755
|
||||||
|
when: is_rpi
|
||||||
|
|
||||||
- name: Create /usr/bin/iiab-hotspot-off from template
|
- name: Create /usr/bin/iiab-hotspot-off from template
|
||||||
template:
|
template:
|
||||||
|
@ -45,10 +40,24 @@
|
||||||
owner: root
|
owner: root
|
||||||
group: root
|
group: root
|
||||||
mode: 0755
|
mode: 0755
|
||||||
|
when: is_rpi
|
||||||
|
|
||||||
- name: Enable/Restart the Access Point 'hostapd' service
|
- name: Disable the Access Point 'hostapd' service
|
||||||
service:
|
systemd:
|
||||||
# enabled: yes
|
name: hostapd
|
||||||
state: restarted
|
enabled: no
|
||||||
name: hostapd.service
|
# cheap workaround for when /etc/init.d is populated
|
||||||
|
# when: not hostapd_enabled
|
||||||
|
|
||||||
|
- name: Enable the Access Point 'hostapd' service
|
||||||
|
systemd:
|
||||||
|
name: hostapd
|
||||||
|
enabled: yes
|
||||||
when: hostapd_enabled and iiab_wireless_lan_iface is defined and iiab_network_mode != "Appliance"
|
when: hostapd_enabled and iiab_wireless_lan_iface is defined and iiab_network_mode != "Appliance"
|
||||||
|
|
||||||
|
- name: Record HOSTAPD_ENABLED to /etc/iiab/iiab.env
|
||||||
|
lineinfile:
|
||||||
|
dest: /etc/iiab/iiab.env
|
||||||
|
regexp: '^HOSTAPD_ENABLED=*'
|
||||||
|
line: 'HOSTAPD_ENABLED={{ hostapd_enabled }}'
|
||||||
|
state: present
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
- name: Stop the Access Point hostapd program
|
- name: Stop the Access Point hostapd program
|
||||||
service: name=hostapd.service
|
systemd:
|
||||||
state=stopped
|
name: hostapd
|
||||||
|
state: stopped
|
||||||
when: iiab_wireless_lan_iface != "none"
|
when: iiab_wireless_lan_iface != "none"
|
||||||
|
|
||||||
# might need an exclude for F18 here
|
# might need an exclude for F18 here
|
||||||
|
@ -81,7 +82,8 @@
|
||||||
when: not installing and not iiab_demo_mode
|
when: not installing and not iiab_demo_mode
|
||||||
|
|
||||||
- name: ask systemd to reread the unit files, picks up changes done
|
- name: ask systemd to reread the unit files, picks up changes done
|
||||||
shell: systemctl daemon-reload
|
systemd:
|
||||||
|
daemon_reload: yes
|
||||||
when: not installing
|
when: not installing
|
||||||
|
|
||||||
# monitor-connection-files defaults to no with F21, F18-F20 defaults to yes
|
# monitor-connection-files defaults to no with F21, F18-F20 defaults to yes
|
||||||
|
|
|
@ -12,23 +12,13 @@
|
||||||
# (2) debian.yml, (3) rpi_debian.yml
|
# (2) debian.yml, (3) rpi_debian.yml
|
||||||
when: discovered_wireless_iface == iiab_wan_iface and not reboot_to_AP
|
when: discovered_wireless_iface == iiab_wan_iface and not reboot_to_AP
|
||||||
# EITHER WAY: hostapd_enabled's state is RECORDED into /etc/iiab/iiab.env
|
# EITHER WAY: hostapd_enabled's state is RECORDED into /etc/iiab/iiab.env
|
||||||
# (happens just below) for later use by...
|
# in hostapd.yml for later use by...
|
||||||
# /usr/libexec/iiab-startup.sh, iiab-hotspot-off & iiab-hotspot-on
|
# /usr/libexec/iiab-startup.sh, iiab-hotspot-off & iiab-hotspot-on
|
||||||
#
|
#
|
||||||
# Separate Idea, Not Without Risks: should WiFi-as-gateway detection logic
|
# Separate Idea, Not Without Risks: should WiFi-as-gateway detection logic
|
||||||
# be encapsulated into roles/network/tasks/hostapd.yml in future? Whereas
|
# be encapsulated into roles/network/tasks/hostapd.yml in future? Whereas
|
||||||
# today "./runtags hostapd" doesn't exist & "./runtags AP" is UNSUPPORTED!
|
# today "./runtags hostapd" doesn't exist & "./runtags AP" is UNSUPPORTED!
|
||||||
|
|
||||||
- name: Record HOSTAPD_ENABLED to /etc/iiab/iiab.env
|
|
||||||
lineinfile:
|
|
||||||
dest: /etc/iiab/iiab.env
|
|
||||||
regexp: '^HOSTAPD_ENABLED=*'
|
|
||||||
line: 'HOSTAPD_ENABLED={{ hostapd_enabled }}'
|
|
||||||
state: present
|
|
||||||
#when: not installing #REMOVE THIS LINE IF installing IS ALWAYS false AS SET IN roles/0-init/defaults/main.yml
|
|
||||||
tags:
|
|
||||||
- network
|
|
||||||
|
|
||||||
#- name: RPi - reboot to AP post install - installed via wifi so the services are ready
|
#- name: RPi - reboot to AP post install - installed via wifi so the services are ready
|
||||||
# set_fact:
|
# set_fact:
|
||||||
# iiab_lan_iface: br0
|
# iiab_lan_iface: br0
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
#- name: restart hostapd when wifi is present
|
- name: restart hostapd when wifi is present
|
||||||
# service: name=hostapd state=started
|
systemd:
|
||||||
# when: iiab_wireless_lan_iface is defined and hostapd_enabled
|
name: hostapd
|
||||||
|
state: restarted
|
||||||
|
when: iiab_wireless_lan_iface is defined and hostapd_enabled and iiab_network_mode != "Appliance"
|
||||||
|
|
||||||
- name: Start named service
|
- name: Start named service
|
||||||
service:
|
service:
|
||||||
|
@ -63,8 +65,8 @@
|
||||||
register: wifi_slave
|
register: wifi_slave
|
||||||
|
|
||||||
- name: Restart hostapd if WiFi slave is inactive
|
- name: Restart hostapd if WiFi slave is inactive
|
||||||
service:
|
systemd:
|
||||||
name: hostapd.service
|
name: hostapd
|
||||||
state: restarted
|
state: restarted
|
||||||
when: hostapd_enabled and wifi_slave.stdout is defined and wifi_slave.stdout == 0
|
when: hostapd_enabled and wifi_slave.stdout is defined and wifi_slave.stdout == 0
|
||||||
|
|
||||||
|
|
|
@ -46,7 +46,8 @@
|
||||||
include_tasks: down-debian.yml
|
include_tasks: down-debian.yml
|
||||||
|
|
||||||
- name: Reload systemd
|
- name: Reload systemd
|
||||||
shell: systemctl daemon-reload
|
systemd:
|
||||||
|
daemon_reload: yes
|
||||||
|
|
||||||
# now pick up denyinterfaces
|
# now pick up denyinterfaces
|
||||||
- name: Restart dhcpcd
|
- name: Restart dhcpcd
|
||||||
|
@ -60,17 +61,3 @@
|
||||||
enabled: yes
|
enabled: yes
|
||||||
state: restarted
|
state: restarted
|
||||||
when: not nobridge is defined and not no_net_restart
|
when: not nobridge is defined and not no_net_restart
|
||||||
|
|
||||||
- name: Restart hostapd if appropriate
|
|
||||||
service:
|
|
||||||
name: hostapd
|
|
||||||
state: restarted
|
|
||||||
when: hostapd_enabled and iiab_wan_iface != discovered_wireless_iface and iiab_network_mode != "Appliance"
|
|
||||||
|
|
||||||
- name: Ansible is having a problem enabling services
|
|
||||||
shell: systemctl enable hostapd
|
|
||||||
when: hostapd_enabled and iiab_wan_iface != discovered_wireless_iface and iiab_network_mode != "Appliance"
|
|
||||||
|
|
||||||
#- name: dhcp_server may be affected - starting - user choice
|
|
||||||
# service: name={{ dhcp_service2 }} state=started
|
|
||||||
# when: iiab_network_mode != "Appliance"
|
|
||||||
|
|
|
@ -19,22 +19,12 @@
|
||||||
include_tasks: down-debian.yml
|
include_tasks: down-debian.yml
|
||||||
|
|
||||||
- name: Reload systemd
|
- name: Reload systemd
|
||||||
shell: systemctl daemon-reload
|
systemd:
|
||||||
|
daemon_reload: yes
|
||||||
|
|
||||||
- name: Restart the systemd-networkd service
|
- name: Restart the systemd-networkd service
|
||||||
service:
|
systemd:
|
||||||
name: systemd-networkd
|
name: systemd-networkd
|
||||||
enabled: yes
|
enabled: yes
|
||||||
state: restarted
|
state: restarted
|
||||||
when: not nobridge is defined and not no_net_restart
|
when: not nobridge is defined and not no_net_restart
|
||||||
|
|
||||||
- name: Restart hostapd when WiFi is present
|
|
||||||
service:
|
|
||||||
name: hostapd
|
|
||||||
enabled: yes
|
|
||||||
state: restarted
|
|
||||||
when: iiab_wireless_lan_iface is defined and hostapd_enabled and iiab_network_mode != "Appliance"
|
|
||||||
|
|
||||||
#- name: dhcp_server may be affected - starting - user choice
|
|
||||||
# service: name={{ dhcp_service2 }} state=started
|
|
||||||
# when: iiab_network_mode != "Appliance"
|
|
||||||
|
|
|
@ -31,13 +31,14 @@ if [ ! `command -v ansible-playbook` ]; then # "command -v" is POSIX compliant
|
||||||
pip install --upgrade pip setuptools wheel #EOL just do it
|
pip install --upgrade pip setuptools wheel #EOL just do it
|
||||||
pip install ansible==$GOOD_VER --disable-pip-version-check
|
pip install ansible==$GOOD_VER --disable-pip-version-check
|
||||||
# Parens are optional, but greatly clarify :)
|
# Parens are optional, but greatly clarify :)
|
||||||
elif (grep -qi ubuntu /etc/lsb-release) || (grep -qi ubuntu /etc/os-release); then
|
elif (grep -qi ubuntu /etc/lsb-release 2> /dev/null) || (grep -qi ubuntu /etc/os-release); then
|
||||||
apt -y install python-pip python-setuptools python-wheel patch
|
apt -y install python-pip python-setuptools python-wheel patch
|
||||||
apt-add-repository -y ppa:ansible/ansible
|
apt-add-repository -y ppa:ansible/ansible
|
||||||
#apt-add-repository -y ppa:ansible/ansible-2.4
|
#apt-add-repository -y ppa:ansible/ansible-2.4
|
||||||
# elif UBUNTU MUST REMAIN ABOVE (as Ubuntu ALSO contains /etc/debian_version, which would trigger the line just below)
|
# elif UBUNTU MUST REMAIN ABOVE (as Ubuntu ALSO contains /etc/debian_version, which would trigger the line just below)
|
||||||
elif [ -f /etc/debian_version ] || (grep -qi raspbian /etc/*elease) ; then
|
elif [ -f /etc/debian_version ] || (grep -qi raspbian /etc/*elease) ; then
|
||||||
if ( ! grep -qi ansible /etc/apt/sources.list) && [ ! -f /etc/apt/sources.list.d/ansible ]; then
|
if ( ! grep -qi ansible /etc/apt/sources.list) && [ ! -f /etc/apt/sources.list.d/ansible ]; then
|
||||||
|
apt update
|
||||||
apt -y install dirmngr python-pip python-setuptools python-wheel patch
|
apt -y install dirmngr python-pip python-setuptools python-wheel patch
|
||||||
echo "deb http://ppa.launchpad.net/ansible/ansible/ubuntu xenial main" \
|
echo "deb http://ppa.launchpad.net/ansible/ansible/ubuntu xenial main" \
|
||||||
>> /etc/apt/sources.list.d/iiab-ansible.list
|
>> /etc/apt/sources.list.d/iiab-ansible.list
|
||||||
|
|
|
@ -32,13 +32,14 @@ if [ ! `command -v ansible-playbook` ]; then # "command -v" is POSIX compliant
|
||||||
pip install --upgrade pip setuptools wheel #EOL just do it
|
pip install --upgrade pip setuptools wheel #EOL just do it
|
||||||
pip install ansible==$GOOD_VER --disable-pip-version-check
|
pip install ansible==$GOOD_VER --disable-pip-version-check
|
||||||
# Parens are optional, but greatly clarify :)
|
# Parens are optional, but greatly clarify :)
|
||||||
elif (grep -qi ubuntu /etc/lsb-release) || (grep -qi ubuntu /etc/os-release); then
|
elif (grep -qi ubuntu /etc/lsb-release 2> /dev/null) || (grep -qi ubuntu /etc/os-release); then
|
||||||
apt -y install python-pip python-setuptools python-wheel patch
|
apt -y install python-pip python-setuptools python-wheel patch
|
||||||
#apt-add-repository -y ppa:ansible/ansible
|
#apt-add-repository -y ppa:ansible/ansible
|
||||||
apt-add-repository -y ppa:ansible/ansible-2.4
|
apt-add-repository -y ppa:ansible/ansible-2.4
|
||||||
# elif UBUNTU MUST REMAIN ABOVE (as Ubuntu ALSO contains /etc/debian_version, which would trigger the line just below)
|
# elif UBUNTU MUST REMAIN ABOVE (as Ubuntu ALSO contains /etc/debian_version, which would trigger the line just below)
|
||||||
elif [ -f /etc/debian_version ] || (grep -qi raspbian /etc/*elease) ; then
|
elif [ -f /etc/debian_version ] || (grep -qi raspbian /etc/*elease) ; then
|
||||||
if ( ! grep -qi ansible /etc/apt/sources.list) && [ ! -f /etc/apt/sources.list.d/ansible ]; then
|
if ( ! grep -qi ansible /etc/apt/sources.list) && [ ! -f /etc/apt/sources.list.d/ansible ]; then
|
||||||
|
apt update
|
||||||
apt -y install dirmngr python-pip python-setuptools python-wheel patch
|
apt -y install dirmngr python-pip python-setuptools python-wheel patch
|
||||||
#echo "deb http://ppa.launchpad.net/ansible/ansible/ubuntu xenial main" \
|
#echo "deb http://ppa.launchpad.net/ansible/ansible/ubuntu xenial main" \
|
||||||
# >> /etc/apt/sources.list.d/iiab-ansible.list
|
# >> /etc/apt/sources.list.d/iiab-ansible.list
|
||||||
|
|
|
@ -31,13 +31,14 @@ if [ ! `command -v ansible-playbook` ]; then # "command -v" is POSIX compliant
|
||||||
pip install --upgrade pip setuptools wheel #EOL just do it
|
pip install --upgrade pip setuptools wheel #EOL just do it
|
||||||
pip install ansible==$GOOD_VER --disable-pip-version-check
|
pip install ansible==$GOOD_VER --disable-pip-version-check
|
||||||
# Parens are optional, but greatly clarify :)
|
# Parens are optional, but greatly clarify :)
|
||||||
elif (grep -qi ubuntu /etc/lsb-release) || (grep -qi ubuntu /etc/os-release); then
|
elif (grep -qi ubuntu /etc/lsb-release 2> /dev/null) || (grep -qi ubuntu /etc/os-release); then
|
||||||
apt -y install python-pip python-setuptools python-wheel patch
|
apt -y install python-pip python-setuptools python-wheel patch
|
||||||
#apt-add-repository -y ppa:ansible/ansible
|
#apt-add-repository -y ppa:ansible/ansible
|
||||||
apt-add-repository -y ppa:ansible/ansible-2.5
|
apt-add-repository -y ppa:ansible/ansible-2.5
|
||||||
# elif UBUNTU MUST REMAIN ABOVE (as Ubuntu ALSO contains /etc/debian_version, which would trigger the line just below)
|
# elif UBUNTU MUST REMAIN ABOVE (as Ubuntu ALSO contains /etc/debian_version, which would trigger the line just below)
|
||||||
elif [ -f /etc/debian_version ] || (grep -qi raspbian /etc/*elease) ; then
|
elif [ -f /etc/debian_version ] || (grep -qi raspbian /etc/*elease) ; then
|
||||||
if ( ! grep -qi ansible /etc/apt/sources.list) && [ ! -f /etc/apt/sources.list.d/ansible ]; then
|
if ( ! grep -qi ansible /etc/apt/sources.list) && [ ! -f /etc/apt/sources.list.d/ansible ]; then
|
||||||
|
apt update
|
||||||
apt -y install dirmngr python-pip python-setuptools python-wheel patch
|
apt -y install dirmngr python-pip python-setuptools python-wheel patch
|
||||||
#echo "deb http://ppa.launchpad.net/ansible/ansible/ubuntu xenial main" \
|
#echo "deb http://ppa.launchpad.net/ansible/ansible/ubuntu xenial main" \
|
||||||
# >> /etc/apt/sources.list.d/iiab-ansible.list
|
# >> /etc/apt/sources.list.d/iiab-ansible.list
|
||||||
|
|
18
scripts/calibre-install-latest-rpi.sh
Executable file
18
scripts/calibre-install-latest-rpi.sh
Executable file
|
@ -0,0 +1,18 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Thanks to Jerry Vonau (https://github.com/jvonau) who made
|
||||||
|
# this critical breakthrough (Calibre 3.x on Raspbian) possible!
|
||||||
|
# The latest available is 3.20 available from testing
|
||||||
|
# https://packages.debian.org/search?keywords=calibre
|
||||||
|
# (SEE http://archive.raspbian.org/raspbian/pool/main/c/calibre/ ?)
|
||||||
|
# might break future updates, you have been warned
|
||||||
|
|
||||||
|
export DEBIAN_FRONTEND=noninteractive
|
||||||
|
# Updates calibre calibre-bin to version 3.20 or ... from testing
|
||||||
|
echo "deb http://raspbian.raspberrypi.org/raspbian/ testing main" > /etc/apt/sources.list.d/rpi-testing.list
|
||||||
|
apt update
|
||||||
|
apt -y install calibre calibre-bin
|
||||||
|
# Remove last line, safer than: rm /etc/apt/sources.list.d/debian-testing.list
|
||||||
|
sed -i '$ d' /etc/apt/sources.list.d/rpi-testing.list
|
||||||
|
# Clears the cache of testing
|
||||||
|
apt update
|
|
@ -1,26 +1,20 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# Thanks to Jerry Vonau (https://github.com/jvonau) who made
|
# Thanks to Jerry Vonau (https://github.com/jvonau) who made
|
||||||
# this critical breakthrough (Calibre 3.x on Raspbian) possible!
|
# this critical breakthrough for Calibre 3.x possible!
|
||||||
|
# The latest available is 3.20 available from testing
|
||||||
|
# https://packages.debian.org/search?keywords=calibre
|
||||||
|
# (SEE http://deb.debian.org/debian/pool/main/c/calibre/ ?)
|
||||||
|
# might break future updates, you have been warned
|
||||||
|
|
||||||
export DEBIAN_FRONTEND=noninteractive
|
export DEBIAN_FRONTEND=noninteractive
|
||||||
# Drags in stock desktop dependencies without too much from testing below
|
# Drags in stock desktop dependencies without too much from testing below
|
||||||
apt -y install calibre-bin dirmngr
|
apt -y install calibre-bin dirmngr
|
||||||
|
# Updates calibre calibre-bin to version 3.20 or ... from testing
|
||||||
# Updates calibre-bin to version 3.10 or 3.14 or ... from testing (SEE http://archive.raspbian.org/raspbian/pool/main/c/calibre/ ?)
|
|
||||||
apt-key adv --recv-key --keyserver keyserver.ubuntu.com 7638D0442B90D010
|
apt-key adv --recv-key --keyserver keyserver.ubuntu.com 7638D0442B90D010
|
||||||
echo "deb http://deb.debian.org/debian testing main" >> /etc/apt/sources.list.d/debian-testing.list
|
echo "deb http://deb.debian.org/debian testing main" >> /etc/apt/sources.list.d/debian-testing.list
|
||||||
apt update
|
apt update
|
||||||
apt -y install libqt5core5a python-lxml calibre
|
apt -y install libqt5core5a python-lxml calibre
|
||||||
# Remove last line, safer than: rm /etc/apt/sources.list.d/debian-testing.list
|
# Remove last line, safer than: rm /etc/apt/sources.list.d/debian-testing.list
|
||||||
sed -i '$ d' /etc/apt/sources.list.d/debian-testing.list
|
sed -i '$ d' /etc/apt/sources.list.d/debian-testing.list
|
||||||
|
|
||||||
# Updates to calibre & calibre-bin to "very latest" 3.x from unstable
|
|
||||||
echo "deb http://deb.debian.org/debian unstable main" >> /etc/apt/sources.list.d/debian-unstable.list
|
|
||||||
apt update
|
|
||||||
apt -y install calibre
|
|
||||||
# Remove last line, safer than: rm /etc/apt/sources.list.d/debian-unstable.list
|
|
||||||
sed -i '$ d' /etc/apt/sources.list.d/debian-unstable.list
|
|
||||||
|
|
||||||
# Clears the cache of testing and unstable
|
|
||||||
apt update
|
apt update
|
||||||
|
|
18
scripts/calibre-install-unstable.sh
Executable file
18
scripts/calibre-install-unstable.sh
Executable file
|
@ -0,0 +1,18 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Thanks to Jerry Vonau (https://github.com/jvonau) who made
|
||||||
|
# this critical breakthrough possible!
|
||||||
|
# might break future updates, you have been warned
|
||||||
|
# The latest available is 3.20 available from testing
|
||||||
|
# https://packages.debian.org/search?keywords=calibre
|
||||||
|
# might break future updates, you have been warned
|
||||||
|
|
||||||
|
export DEBIAN_FRONTEND=noninteractive
|
||||||
|
# Updates to calibre & calibre-bin to "very latest" 3.x from unstable
|
||||||
|
echo "deb http://deb.debian.org/debian unstable main" >> /etc/apt/sources.list.d/unstable.list
|
||||||
|
apt update
|
||||||
|
apt -y install calibre calibre-bin
|
||||||
|
# Remove last line, safer than: rm /etc/apt/sources.list.d/debian-unstable.list
|
||||||
|
sed -i '$ d' /etc/apt/sources.list.d/unstable.list
|
||||||
|
# Clears the cache of testing and unstable
|
||||||
|
apt update
|
|
@ -383,6 +383,7 @@ xovis_chart_heading: "My School: Usage Data Visualization"
|
||||||
# wide to narrow
|
# wide to narrow
|
||||||
is_debuntu: False
|
is_debuntu: False
|
||||||
is_ubuntu: False
|
is_ubuntu: False
|
||||||
|
is_ubuntu_18: False
|
||||||
is_debian: False
|
is_debian: False
|
||||||
is_debian_9: False
|
is_debian_9: False
|
||||||
is_debian_8: False
|
is_debian_8: False
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
is_debuntu: True
|
is_debuntu: True
|
||||||
is_ubuntu: True
|
is_ubuntu: True
|
||||||
|
is_ubuntu_18: True
|
||||||
dns_service: bind9
|
dns_service: bind9
|
||||||
dns_user: bind
|
dns_user: bind
|
||||||
dhcp_service: isc-dhcp-server
|
dhcp_service: isc-dhcp-server
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue