1
0
Fork 0
mirror of https://github.com/iiab/iiab.git synced 2025-03-09 15:40:17 +00:00

Merge pull request #1273 from holta/ansible-output

Ansible output that educates en route (building on PRs #1271, #1272)
This commit is contained in:
A Holt 2018-10-31 14:20:25 -04:00 committed by GitHub
commit bf01c71bf6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 24 additions and 24 deletions

View file

@ -1,4 +1,4 @@
- name: Install 10 yum/dnf packages {avahi, avahi-tools, createrepo, linux-firmware, nss-mdns, openssl, syslog, wpa_supplicant, xml-common, yum-utils} (redhat) - name: "Install 10 yum/dnf packages: avahi, avahi-tools, createrepo, linux-firmware, nss-mdns, openssl, syslog, wpa_supplicant, xml-common, yum-utils (redhat)"
package: package:
name: name:
- avahi - avahi
@ -20,7 +20,7 @@
#timeout: "{{ download_timeout }}" # Ansible's apt module doesn't support timeout parameter; that's ok as usbmount_0.0.14.1_all.deb is only 10KB #timeout: "{{ download_timeout }}" # Ansible's apt module doesn't support timeout parameter; that's ok as usbmount_0.0.14.1_all.deb is only 10KB
when: internet_available and is_debian_9 when: internet_available and is_debian_9
- name: Install 7 packages {avahi-daemon, avahi-discover, exfat-fuse, exfat-utils, inetutils-syslogd, libnss-mdns, wpasupplicant} (debuntu) - name: "Install 7 deb/apt packages: avahi-daemon, avahi-discover, exfat-fuse, exfat-utils, inetutils-syslogd, libnss-mdns, wpasupplicant (debuntu)"
package: package:
name: name:
- avahi-daemon - avahi-daemon
@ -33,7 +33,7 @@
state: present state: present
when: is_debuntu when: is_debuntu
- name: Install 23 common packages {acpid, bridge-utils, bzip2, curl, gawk, hostapd, htop, i2c-tools, logrotate, make, mlocate, netmask, net-tools, ntfs-3g, openssh-server, pandoc, rsync, sudo, tar, unzip, usbmount, usbutils, wget} - name: "Install 23 common packages: acpid, bridge-utils, bzip2, curl, gawk, hostapd, htop, i2c-tools, logrotate, make, mlocate, netmask, net-tools, ntfs-3g, openssh-server, pandoc, rsync, sudo, tar, unzip, usbmount, usbutils, wget"
package: package:
name: name:
- acpid - acpid
@ -63,7 +63,7 @@
- wget - wget
state: present state: present
- name: Install 4 common Python packages {python-passlib, python-pip, python-setuptools, python-virtualenv} - name: "Install 4 common Python packages: python-passlib, python-pip, python-setuptools, python-virtualenv"
package: package:
name: name:
- python-passlib - python-passlib

View file

@ -1,4 +1,4 @@
- name: Install textmode remote access packages {screen, lynx} - name: "Install textmode remote access packages: screen, lynx"
package: package:
name: name:
- screen - screen

View file

@ -1,4 +1,4 @@
- name: Install named packages {bind9, bind9utils} (if debuntu) - name: "Install named packages: bind9, bind9utils (debuntu)"
package: package:
name: name:
- bind9 - bind9
@ -8,7 +8,7 @@
tags: tags:
- download - download
- name: Install named packages {bind, bind-utils} (if not debuntu) - name: "Install named packages: bind, bind-utils (OS's other than debuntu)"
package: package:
name: name:
- bind - bind
@ -25,7 +25,7 @@
state: stopped state: stopped
when: first_run and is_debuntu when: first_run and is_debuntu
- name: Set folder permission - name: "Set 3 folders' ownership to {{ dns_user }}:root and permission to 0755"
file: file:
path: "{{ item }}" path: "{{ item }}"
owner: "{{ dns_user }}" owner: "{{ dns_user }}"
@ -37,7 +37,7 @@
- /var/named-iiab/data - /var/named-iiab/data
- /etc/sysconfig/olpc-scripts/domain_config.d - /etc/sysconfig/olpc-scripts/domain_config.d
- name: Configure named - name: Install 21 configuration files for named, from templates
template: template:
src: "{{ item.src }}" src: "{{ item.src }}"
dest: "{{ item.dest }}" dest: "{{ item.dest }}"
@ -68,39 +68,39 @@
- { src: 'roles/network/templates/named/dummy', dest: '/var/named-iiab/data/dummy', owner: "{{ dns_user }}", mode: '0644' } - { src: 'roles/network/templates/named/dummy', dest: '/var/named-iiab/data/dummy', owner: "{{ dns_user }}", mode: '0644' }
- { src: 'roles/network/templates/named/named.blackhole', dest: '/var/named-iiab/named.blackhole', owner: "{{ dns_user }}", mode: '0644' } - { src: 'roles/network/templates/named/named.blackhole', dest: '/var/named-iiab/named.blackhole', owner: "{{ dns_user }}", mode: '0644' }
- name: Substitute our unit file which uses $OPTIONS from sysconfig - name: Install named unit file /etc/systemd/system/{{ dns_service }}.service, which uses $OPTIONS from sysconfig
template: template:
src: "roles/network/templates/named/{{ dns_service }}.service" src: "roles/network/templates/named/{{ dns_service }}.service"
dest: "/etc/systemd/system/{{ dns_service }}.service" dest: "/etc/systemd/system/{{ dns_service }}.service"
mode: 0644 mode: 0644
- name: The dns-jail redirect requires the named.blackhole, disabling recursion (if dns_jail_enabled) - name: "Install /etc/{{ apache_config_dir }}/dns-jail.conf from template: dns-jail redirect requires the named.blackhole, disabling recursion (if dns_jail_enabled)"
# in named-iiab.conf, and the redirection of 404 error documents to / # in named-iiab.conf, and the redirection of 404 error documents to /
template: template:
src: roles/network/templates/named/dns-jail.conf src: roles/network/templates/named/dns-jail.conf
dest: "/etc/{{ apache_config_dir }}/" dest: "/etc/{{ apache_config_dir }}/"
when: dns_jail_enabled when: dns_jail_enabled
- name: Separate enabling required (if debuntu and dns_jail_enabled) - name: Create symlink dns-jail.conf from sites-enabled to sites-available (if debuntu and dns_jail_enabled)
file: file:
src: "/etc/{{ apache_config_dir }}/dns-jail.conf" src: "/etc/{{ apache_config_dir }}/dns-jail.conf"
path: "/etc/{{ apache_service }}/sites-enabled/dns-jail.conf" path: "/etc/{{ apache_service }}/sites-enabled/dns-jail.conf"
state: link state: link
when: is_debuntu and dns_jail_enabled when: is_debuntu and dns_jail_enabled
- name: Separate disabling required (if debuntu and not dns_jail_enabled) - name: Remove symlink /etc/{{ apache_service }}/sites-enabled/dns-jail.conf (if debuntu and not dns_jail_enabled)
file: file:
path: "/etc/{{ apache_service }}/sites-enabled/dns-jail.conf" path: "/etc/{{ apache_service }}/sites-enabled/dns-jail.conf"
state: absent state: absent
when: is_debuntu and not dns_jail_enabled when: is_debuntu and not dns_jail_enabled
- name: Separate enabling/disabling required (if not debuntu and not dns_jail_enabled) - name: Remove symlink /etc/{{ apache_config_dir }}/dns-jail.conf (if not debuntu and not dns_jail_enabled)
file: file:
path: "/etc/{{ apache_config_dir }}/dns-jail.conf" path: "/etc/{{ apache_config_dir }}/dns-jail.conf"
state: absent state: absent
when: not is_debuntu and not dns_jail_enabled when: not is_debuntu and not dns_jail_enabled
- name: Start named after copying files - name: Start named systemd service
service: systemd:
name: "{{ dns_service }}" name: "{{ dns_service }}"
state: started state: started

View file

@ -1,4 +1,4 @@
- name: 'Install packages: {{ proxy }} and cadaver' - name: "Install 2 packages: {{ proxy }}, cadaver"
package: package:
name: name:
- "{{ proxy }}" - "{{ proxy }}"
@ -7,7 +7,7 @@
tags: tags:
- download - download
- name: 'Bigger hammer for Ubuntu, run: /etc/init.d/squid stop' - name: "Bigger hammer for Ubuntu, run: /etc/init.d/squid stop"
command: /etc/init.d/squid stop command: /etc/init.d/squid stop
when: is_ubuntu when: is_ubuntu
@ -17,13 +17,13 @@
state: stopped state: stopped
when: not installing when: not installing
- name: 'Create the Squid user: {{ proxy_user }}' - name: "Create the Squid user: {{ proxy_user }}"
user: user:
name: "{{ proxy_user }}" name: "{{ proxy_user }}"
createhome: False createhome: False
shell: /bin/false shell: /bin/false
- name: 'Install from template: /usr/bin/iiab-httpcache, /etc/sysconfig/squid, /etc/{{ proxy }}/sites.whitelist.txt and 3 .rules files' - name: "Install from template: /usr/bin/iiab-httpcache, /etc/sysconfig/squid, /etc/{{ proxy }}/sites.whitelist.txt and 3 .rules files"
template: template:
src: "{{ item.src }}" src: "{{ item.src }}"
dest: "{{ item.dest }}" dest: "{{ item.dest }}"

View file

@ -83,7 +83,7 @@
state: present state: present
when: is_redhat when: is_redhat
- name: Unarchive {{ nextcloud_src_file }} to permanent location {{ nextcloud_prefix }} # e.g. unpack nextcloud_latest-14.tar.bz2 to /opt/nextcloud - name: Unarchive {{ nextcloud_src_file }} to permanent location {{ nextcloud_prefix }}/nextcloud # e.g. unpack nextcloud_latest-14.tar.bz2 to /opt/nextcloud
unarchive: unarchive:
src: "{{ downloads_dir }}/{{ nextcloud_src_file }}" src: "{{ downloads_dir }}/{{ nextcloud_src_file }}"
dest: "{{ nextcloud_prefix }}" dest: "{{ nextcloud_prefix }}"

View file

@ -1,10 +1,10 @@
- name: 'Create smb user: {{ smbuser }}' - name: "Create smb user: {{ smbuser }}"
user: user:
name: "{{ smbuser }}" name: "{{ smbuser }}"
shell: /sbin/nologin shell: /sbin/nologin
password: "{{ smbpassword }}" password: "{{ smbpassword }}"
- name: 'Create public folder: {{ shared_dir }}' - name: "Create public folder: {{ shared_dir }}"
file: file:
path: "{{ shared_dir }}" path: "{{ shared_dir }}"
owner: "{{ smbuser }}" owner: "{{ smbuser }}"
@ -13,7 +13,7 @@
state: directory state: directory
# Install and configure samba server (requires ports 137, 138, 139, 445 open). # Install and configure samba server (requires ports 137, 138, 139, 445 open).
- name: Install 4 packages {samba, samba-client, samba-common, cifs-client} - name: "Install 4 packages: samba, samba-client, samba-common, cifs-client"
package: package:
name: name:
- samba - samba