mirror of
https://github.com/iiab/iiab.git
synced 2025-03-09 15:40:17 +00:00
56 changes to include_tasks --edits double check after rebase
This commit is contained in:
parent
d23e3d760f
commit
c07c0d2d76
22 changed files with 68 additions and 60 deletions
|
@ -14,10 +14,10 @@
|
||||||
|
|
||||||
# we need to inialize the ini file and only write the location and version sections once and only
|
# we need to inialize the ini file and only write the location and version sections once and only
|
||||||
# once to preserve the install date and git hash.
|
# once to preserve the install date and git hash.
|
||||||
- include: roles/1-prep/tasks/iiab_ini.yml
|
- include_tasks: roles/1-prep/tasks/iiab_ini.yml
|
||||||
when: first_run
|
when: first_run
|
||||||
# Now load the computed vars
|
# Now load the computed vars
|
||||||
- include: roles/1-prep/tasks/computed_vars.yml
|
- include_tasks: roles/1-prep/tasks/computed_vars.yml
|
||||||
|
|
||||||
- name: ...HAS COMPLETED ===========================================
|
- name: ...HAS COMPLETED ===========================================
|
||||||
command: echo
|
command: echo
|
||||||
|
|
|
@ -70,11 +70,11 @@
|
||||||
when: ansible_local.local_facts.os == "raspbian"
|
when: ansible_local.local_facts.os == "raspbian"
|
||||||
ignore_errors: true
|
ignore_errors: true
|
||||||
|
|
||||||
- include: prep.yml
|
- include_tasks: prep.yml
|
||||||
when: first_run
|
when: first_run
|
||||||
|
|
||||||
# Put conditional actions for hardware platforms here
|
# Put conditional actions for hardware platforms here
|
||||||
- include: raspberry_pi_2.yml
|
- include_tasks: raspberry_pi_2.yml
|
||||||
when: first_run and rpi_model != "none"
|
when: first_run and rpi_model != "none"
|
||||||
|
|
||||||
- name: Check if the identifier for Intel's NUC6 builtin WiFi is present
|
- name: Check if the identifier for Intel's NUC6 builtin WiFi is present
|
||||||
|
|
|
@ -3,22 +3,22 @@
|
||||||
- name: ...IS BEGINNING ==========================================
|
- name: ...IS BEGINNING ==========================================
|
||||||
command: echo
|
command: echo
|
||||||
|
|
||||||
#- include: iiab_ini.yml
|
#- include_tasks: iiab_ini.yml
|
||||||
|
|
||||||
# create the directory structure for IIAB
|
# create the directory structure for IIAB
|
||||||
- include: fl.yml
|
- include_tasks: fl.yml
|
||||||
|
|
||||||
- include: xo.yml
|
- include_tasks: xo.yml
|
||||||
when: xo_model != "none" or osbuilder is defined
|
when: xo_model != "none" or osbuilder is defined
|
||||||
|
|
||||||
- include: centos.yml
|
- include_tasks: centos.yml
|
||||||
when: ansible_distribution == "CentOS"
|
when: ansible_distribution == "CentOS"
|
||||||
|
|
||||||
- include: fedora.yml
|
- include_tasks: fedora.yml
|
||||||
when: ansible_distribution == "Fedora"
|
when: ansible_distribution == "Fedora"
|
||||||
|
|
||||||
# the following installs common packages for both debian and fedora
|
# the following installs common packages for both debian and fedora
|
||||||
- include: packages.yml
|
- include_tasks: packages.yml
|
||||||
|
|
||||||
- sysctl: name=net.ipv4.ip_forward value=1 state=present
|
- sysctl: name=net.ipv4.ip_forward value=1 state=present
|
||||||
- sysctl: name=net.ipv4.conf.default.rp_filter value=1 state=present
|
- sysctl: name=net.ipv4.conf.default.rp_filter value=1 state=present
|
||||||
|
@ -43,10 +43,10 @@
|
||||||
mode=0644
|
mode=0644
|
||||||
backup=no
|
backup=no
|
||||||
|
|
||||||
- include: net_mods.yml
|
- include_tasks: net_mods.yml
|
||||||
when: not is_debuntu and not is_F18
|
when: not is_debuntu and not is_F18
|
||||||
|
|
||||||
- include: udev.yml
|
- include_tasks: udev.yml
|
||||||
|
|
||||||
- name: Recording STAGE 2 HAS COMPLETED ==========================
|
- name: Recording STAGE 2 HAS COMPLETED ==========================
|
||||||
lineinfile: dest=/etc/iiab/iiab.env
|
lineinfile: dest=/etc/iiab/iiab.env
|
||||||
|
|
|
@ -37,7 +37,7 @@
|
||||||
mode=0744
|
mode=0744
|
||||||
state=file
|
state=file
|
||||||
|
|
||||||
- include: ajenti-wondershaper.yml
|
- include_tasks: ajenti-wondershaper.yml
|
||||||
when: 'iiab_lan_iface != ""'
|
when: 'iiab_lan_iface != ""'
|
||||||
|
|
||||||
# handler doesn't fire
|
# handler doesn't fire
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
- include: install.yml
|
- include_tasks: install.yml
|
||||||
when: awstats_install
|
when: awstats_install
|
||||||
|
|
||||||
- name: Add AWStats to service list
|
- name: Add AWStats to service list
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
- name: Include the install playbook
|
- name: Include the install playbook
|
||||||
include: install.yml
|
include_tasks: install.yml
|
||||||
when: dokuwiki_install
|
when: dokuwiki_install
|
||||||
|
|
||||||
- name: Add DokuWiki to service list
|
- name: Add DokuWiki to service list
|
||||||
|
|
|
@ -142,7 +142,7 @@
|
||||||
state=absent
|
state=absent
|
||||||
when: is_debuntu
|
when: is_debuntu
|
||||||
|
|
||||||
- include: html.yml
|
- include_tasks: html.yml
|
||||||
tags:
|
tags:
|
||||||
- base
|
- base
|
||||||
|
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
- include: admin-user.yml
|
- include_tasks: admin-user.yml
|
||||||
tags:
|
tags:
|
||||||
- base
|
- base
|
||||||
when: not no_admin is defined
|
when: not no_admin is defined
|
||||||
|
|
||||||
- include: access.yml
|
- include_tasks: access.yml
|
||||||
tags:
|
tags:
|
||||||
- base
|
- base
|
||||||
|
|
||||||
|
|
|
@ -16,23 +16,23 @@
|
||||||
stat: path="{{ kalite_db_name }}"
|
stat: path="{{ kalite_db_name }}"
|
||||||
register: kalite_installed
|
register: kalite_installed
|
||||||
|
|
||||||
- include: install-f18.yml
|
- include_tasks: install-f18.yml
|
||||||
when: not kalite_installed.stat.exists and is_F18
|
when: not kalite_installed.stat.exists and is_F18
|
||||||
|
|
||||||
- include: install.yml
|
- include_tasks: install.yml
|
||||||
when: kalite_installed is defined and not kalite_installed.stat.exists and not is_F18
|
when: kalite_installed is defined and not kalite_installed.stat.exists and not is_F18
|
||||||
|
|
||||||
- name: Ask systemd to reread the unit files
|
- name: Ask systemd to reread the unit files
|
||||||
shell: systemctl daemon-reload
|
shell: systemctl daemon-reload
|
||||||
when: not kalite_installed.stat.exists
|
when: not kalite_installed.stat.exists
|
||||||
|
|
||||||
- include: setup-f18.yml
|
- include_tasks: setup-f18.yml
|
||||||
when: not kalite_installed.stat.exists and is_F18
|
when: not kalite_installed.stat.exists and is_F18
|
||||||
|
|
||||||
- include: setup.yml
|
- include_tasks: setup.yml
|
||||||
when: not kalite_installed.stat.exists and not is_F18
|
when: not kalite_installed.stat.exists and not is_F18
|
||||||
|
|
||||||
- include: enable.yml
|
- include_tasks: enable.yml
|
||||||
|
|
||||||
- name: Add kalite to service list
|
- name: Add kalite to service list
|
||||||
ini_file: dest='{{ service_filelist }}'
|
ini_file: dest='{{ service_filelist }}'
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
get_url: url="{{ iiab_download_url }}/{{ kiwix_src_file }}" dest="{{ downloads_dir }}/{{ kiwix_src_file }}"
|
get_url: url="{{ iiab_download_url }}/{{ kiwix_src_file }}" dest="{{ downloads_dir }}/{{ kiwix_src_file }}"
|
||||||
when: internet_available
|
when: internet_available
|
||||||
|
|
||||||
- include: kiwix_install.yml
|
- include_tasks: kiwix_install.yml
|
||||||
when: kiwix_src_file is defined
|
when: kiwix_src_file is defined
|
||||||
tags:
|
tags:
|
||||||
- kiwix
|
- kiwix
|
||||||
|
|
|
@ -45,12 +45,12 @@
|
||||||
tags:
|
tags:
|
||||||
- download
|
- download
|
||||||
|
|
||||||
- include: centos.yml
|
- include_tasks: centos.yml
|
||||||
when: ansible_distribution == "CentOS"
|
when: ansible_distribution == "CentOS"
|
||||||
tags:
|
tags:
|
||||||
- download
|
- download
|
||||||
|
|
||||||
- include: fedora.yml
|
- include_tasks: fedora.yml
|
||||||
when: ansible_distribution == "Fedora"
|
when: ansible_distribution == "Fedora"
|
||||||
tags:
|
tags:
|
||||||
- download
|
- download
|
||||||
|
|
|
@ -27,7 +27,7 @@
|
||||||
when: discovered_wan_iface != "none"
|
when: discovered_wan_iface != "none"
|
||||||
|
|
||||||
- name: RedHat network detection
|
- name: RedHat network detection
|
||||||
include: detected_redhat.yml
|
include_tasks: detected_redhat.yml
|
||||||
when: is_redhat
|
when: is_redhat
|
||||||
|
|
||||||
- name: check to see if dhcpcd is installed and active - Can Fail
|
- name: check to see if dhcpcd is installed and active - Can Fail
|
||||||
|
|
|
@ -43,17 +43,17 @@
|
||||||
when: (num_lan_interfaces != "0" or iiab_wireless_lan_iface != "none")
|
when: (num_lan_interfaces != "0" or iiab_wireless_lan_iface != "none")
|
||||||
|
|
||||||
## vars/ users should set user_wan_iface to avoid messy redetect
|
## vars/ users should set user_wan_iface to avoid messy redetect
|
||||||
- include: redetect.yml
|
- include_tasks: redetect.yml
|
||||||
when: discovered_wan_iface == "none" and user_wan_iface == "auto"
|
when: discovered_wan_iface == "none" and user_wan_iface == "auto"
|
||||||
|
|
||||||
# move gateway if not WAN
|
# move gateway if not WAN
|
||||||
# might have wifi info if wireless is used as uplink.
|
# might have wifi info if wireless is used as uplink.
|
||||||
- include: edit_ifcfg.yml
|
- include_tasks: edit_ifcfg.yml
|
||||||
when: has_wifi_gw == "none" and has_ifcfg_gw != "none" and has_ifcfg_gw != "/etc/sysconfig/network-scripts/ifcfg-WAN"
|
when: has_wifi_gw == "none" and has_ifcfg_gw != "none" and has_ifcfg_gw != "/etc/sysconfig/network-scripts/ifcfg-WAN"
|
||||||
|
|
||||||
# create ifcfg-WAN if missing
|
# create ifcfg-WAN if missing
|
||||||
# if we get here we have gateway but no ifcfg file
|
# if we get here we have gateway but no ifcfg file
|
||||||
- include: create_ifcfg.yml
|
- include_tasks: create_ifcfg.yml
|
||||||
when: iiab_wan_iface != "none" and not has_WAN and has_ifcfg_gw == "none" and xo_model == "none" and not iiab_demo_mode
|
when: iiab_wan_iface != "none" and not has_WAN and has_ifcfg_gw == "none" and xo_model == "none" and not iiab_demo_mode
|
||||||
|
|
||||||
- name: Configuring LAN interface as iiab_lan_iface
|
- name: Configuring LAN interface as iiab_lan_iface
|
||||||
|
@ -76,7 +76,7 @@
|
||||||
tags:
|
tags:
|
||||||
- network
|
- network
|
||||||
|
|
||||||
- include: enable_wan.yml
|
- include_tasks: enable_wan.yml
|
||||||
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
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
- include: detected_network.yml
|
- include_tasks: detected_network.yml
|
||||||
when: not installing
|
when: not installing
|
||||||
tags:
|
tags:
|
||||||
- network
|
- network
|
||||||
- network-discover
|
- network-discover
|
||||||
|
|
||||||
- include: computed_network.yml
|
- include_tasks: computed_network.yml
|
||||||
when: not installing
|
when: not installing
|
||||||
tags:
|
tags:
|
||||||
- network
|
- network
|
||||||
|
@ -44,30 +44,29 @@
|
||||||
- domain
|
- domain
|
||||||
|
|
||||||
##### Start static ip address info for first run #####
|
##### Start static ip address info for first run #####
|
||||||
#- include: static.yml
|
#- include_tasks: static.yml
|
||||||
# when: 'iiab_wan_iface != "none" and wan_ip != "dhcp"'
|
# when: 'iiab_wan_iface != "none" and wan_ip != "dhcp"'
|
||||||
##### End static ip address info
|
##### End static ip address info
|
||||||
|
|
||||||
- include: hosts.yml
|
- include_tasks: hosts.yml
|
||||||
tags:
|
tags:
|
||||||
- network
|
- network
|
||||||
- domain
|
- domain
|
||||||
|
|
||||||
##### end hostname setup
|
- include_tasks: named.yml
|
||||||
##### start install portion
|
|
||||||
# only needs to be done once
|
|
||||||
- include: installing.yml
|
|
||||||
tags:
|
tags:
|
||||||
- network
|
- network
|
||||||
- named
|
- named
|
||||||
|
|
||||||
|
- include_tasks: dhcpd.yml
|
||||||
|
tags:
|
||||||
- dhcpd
|
- dhcpd
|
||||||
- dnsmasq
|
- dnsmasq
|
||||||
- squid
|
- squid
|
||||||
- domain
|
- domain
|
||||||
# when: hostname_change.changed or installing
|
# when: hostname_change.changed or installing
|
||||||
|
|
||||||
|
- include_tasks: squid.yml
|
||||||
- include: avahi.yml
|
|
||||||
tags:
|
tags:
|
||||||
- network
|
- network
|
||||||
|
|
||||||
|
@ -81,7 +80,7 @@
|
||||||
# - network
|
# - network
|
||||||
# - network-discover
|
# - network-discover
|
||||||
|
|
||||||
- include: computed_services.yml
|
- include_tasks: wondershaper.yml
|
||||||
tags:
|
tags:
|
||||||
- network
|
- network
|
||||||
- named
|
- named
|
||||||
|
@ -89,8 +88,7 @@
|
||||||
- dnsmasq
|
- dnsmasq
|
||||||
- squid
|
- squid
|
||||||
|
|
||||||
# templates needed from above install section live here
|
- include_tasks: iptables.yml
|
||||||
- include: enable_services.yml
|
|
||||||
tags:
|
tags:
|
||||||
- network
|
- network
|
||||||
- named
|
- named
|
||||||
|
@ -98,19 +96,23 @@
|
||||||
- dnsmasq
|
- dnsmasq
|
||||||
- squid
|
- squid
|
||||||
|
|
||||||
- include: hostapd.yml
|
- include_tasks: avahi.yml
|
||||||
tags:
|
tags:
|
||||||
- network
|
- network
|
||||||
|
|
||||||
- include: ifcfg_mods.yml
|
- include_tasks: ifcfg_mods.yml
|
||||||
when: not is_debuntu and not installing
|
|
||||||
tags:
|
tags:
|
||||||
- network
|
- network
|
||||||
|
|
||||||
- include: debian.yml
|
- include_tasks: debian.yml
|
||||||
when: is_debuntu and not installing
|
|
||||||
tags:
|
tags:
|
||||||
- network
|
- network
|
||||||
|
when: is_debuntu and not is_rpi and not installing
|
||||||
|
|
||||||
|
- include_tasks: rpi_debian.yml
|
||||||
|
tags:
|
||||||
|
- network
|
||||||
|
when: is_debuntu and is_rpi and not installing
|
||||||
|
|
||||||
- name: Create IIAB network flags
|
- name: Create IIAB network flags
|
||||||
template: src=network/{{ item }}.j2
|
template: src=network/{{ item }}.j2
|
||||||
|
@ -122,10 +124,16 @@
|
||||||
when: not installing
|
when: not installing
|
||||||
tags:
|
tags:
|
||||||
- network
|
- network
|
||||||
#### end network layout
|
|
||||||
#### start services
|
|
||||||
|
|
||||||
- include: restart.yml
|
- include_tasks: computed_services.yml
|
||||||
|
tags:
|
||||||
|
- network
|
||||||
|
|
||||||
|
- include_tasks: enable_services.yml
|
||||||
|
tags:
|
||||||
|
- network
|
||||||
|
|
||||||
|
- include_tasks: restart.yml
|
||||||
when: not installing
|
when: not installing
|
||||||
tags:
|
tags:
|
||||||
- network
|
- network
|
||||||
|
|
|
@ -64,7 +64,7 @@
|
||||||
mode=0750
|
mode=0750
|
||||||
state=directory
|
state=directory
|
||||||
|
|
||||||
- include: dansguardian.yml
|
- include_tasks: dansguardian.yml
|
||||||
when: dansguardian_install
|
when: dansguardian_install
|
||||||
|
|
||||||
#- name: Stop Squid
|
#- name: Stop Squid
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
template: src=network/ifcfg-WAN.j2
|
template: src=network/ifcfg-WAN.j2
|
||||||
dest=/etc/sysconfig/network-scripts/ifcfg-WAN
|
dest=/etc/sysconfig/network-scripts/ifcfg-WAN
|
||||||
|
|
||||||
- include: NM.yml
|
- include_tasks: NM.yml
|
||||||
when: 'ansible_distribution_version <= "20" and wan_ip != "dhcp"'
|
when: 'ansible_distribution_version <= "20" and wan_ip != "dhcp"'
|
||||||
|
|
||||||
- name: Re-read network config files
|
- name: Re-read network config files
|
||||||
|
|
|
@ -120,7 +120,7 @@
|
||||||
# Enable nextcloud by copying template to httpd config
|
# Enable nextcloud by copying template to httpd config
|
||||||
|
|
||||||
# following enables and disables
|
# following enables and disables
|
||||||
- include: nextcloud_enabled.yml
|
- include_tasks: nextcloud_enabled.yml
|
||||||
|
|
||||||
- name: Add Nextcloud to service list
|
- name: Add Nextcloud to service list
|
||||||
ini_file: dest='{{ service_filelist }}'
|
ini_file: dest='{{ service_filelist }}'
|
||||||
|
|
|
@ -102,7 +102,7 @@
|
||||||
|
|
||||||
# Enable owncloud by copying template to httpd config
|
# Enable owncloud by copying template to httpd config
|
||||||
|
|
||||||
- include: owncloud_enabled.yml
|
- include_tasks: owncloud_enabled.yml
|
||||||
when: owncloud_enabled
|
when: owncloud_enabled
|
||||||
|
|
||||||
- name: Add owncloud to service list
|
- name: Add owncloud to service list
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
rachel_content_found: True
|
rachel_content_found: True
|
||||||
when: rachel_content.stat.exists == true
|
when: rachel_content.stat.exists == true
|
||||||
|
|
||||||
- include: rachel_enabled.yml
|
- include_tasks: rachel_enabled.yml
|
||||||
when: rachel_enabled and rachel_content_found
|
when: rachel_enabled and rachel_content_found
|
||||||
|
|
||||||
- name: Add rachel to service list
|
- name: Add rachel to service list
|
||||||
|
|
|
@ -38,7 +38,7 @@
|
||||||
enabled=no
|
enabled=no
|
||||||
when: not sugar_stats_enabled
|
when: not sugar_stats_enabled
|
||||||
|
|
||||||
- include: statistics-consolidation.yml
|
- include_tasks: statistics-consolidation.yml
|
||||||
|
|
||||||
- name: Add sugar-stats to service list
|
- name: Add sugar-stats to service list
|
||||||
ini_file: dest='{{ service_filelist }}'
|
ini_file: dest='{{ service_filelist }}'
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
when: ansible_architecture == "armv7l" or not is_redhat
|
when: ansible_architecture == "armv7l" or not is_redhat
|
||||||
|
|
||||||
- name: Install Teamviewer if intel
|
- name: Install Teamviewer if intel
|
||||||
include: install.yml
|
include_tasks: install.yml
|
||||||
when: teamviewer_install
|
when: teamviewer_install
|
||||||
|
|
||||||
- name: Add teamviewer to service list
|
- name: Add teamviewer to service list
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
- name: Include the install playbook
|
- name: Include the install playbook
|
||||||
include: install.yml
|
include_tasks: install.yml
|
||||||
when: wordpress_install
|
when: wordpress_install
|
Loading…
Add table
Add a link
Reference in a new issue