透過Ansible安裝Go38Box

以下是在Raspberry Pi 3 執行「ansible-playbook go38box.yml」安裝的過程,整個過程大約為30分鐘

allen-mbp:go38box-temperature allen$ ansible-playbook go38box.yml

PLAY [playbook to get SSH public key into root account] ************************

TASK [Gathering Facts] *********************************************************
ok: [go38box]

TASK [include_vars] ************************************************************

TASK [install SSH public key to root user] *************************************
changed: [go38box]

PLAY [playbook to provision most of the Go38Box] *******************************

TASK [Gathering Facts] *********************************************************
ok: [go38box]

TASK [include_vars] ************************************************************

TASK [bootstrap : reduce memory split down to 16Mb, as we are on a headless system] ***
changed: [go38box]

TASK [bootstrap : enable shutdown/startup hardware button] *********************
changed: [go38box]

TASK [bootstrap : turn off screen blanking] ************************************
changed: [go38box]

TASK [bootstrap : write version file] ******************************************
changed: [go38box]

TASK [bootstrap : update motd] *************************************************
changed: [go38box]

TASK [bootstrap : copy ascii logo file] ****************************************
changed: [go38box]

TASK [bootstrap : crontab update-motd] *****************************************
changed: [go38box]

RUNNING HANDLER [bootstrap : reboot machine] ***********************************
changed: [go38box]

RUNNING HANDLER [bootstrap : wait for machine to come back] ********************
ok: [go38box -> localhost]

TASK [bootstrap : update apt cache and upgrade] ********************************
ok: [go38box]

TASK [bootstrap : install rpi-update] ******************************************
skipping: [go38box]

TASK [bootstrap : update firmware] *********************************************
skipping: [go38box]

TASK [bootstrap : reboot machine] **********************************************
skipping: [go38box]

TASK [bootstrap : wait for machine to come back] *******************************
skipping: [go38box]

TASK [bootstrap : change hostname] *********************************************
changed: [go38box]

TASK [bootstrap : change /etc/hosts] *******************************************
changed: [go38box]

TASK [bootstrap : change username in several files] ****************************
changed: [go38box] => (item=/etc/passwd)
changed: [go38box] => (item=/etc/group)
changed: [go38box] => (item=/etc/shadow)
changed: [go38box] => (item=/etc/gshadow)
changed: [go38box] => (item=/etc/systemd/system/autologin@.service)

TASK [bootstrap : create sudoers file] *****************************************
changed: [go38box]

TASK [bootstrap : delete old sudoers file] *************************************
changed: [go38box]

TASK [bootstrap : check presence of '/home/pi' directory] **********************
ok: [go38box]

TASK [bootstrap : move user home directory] ************************************
changed: [go38box]

TASK [bootstrap : simlink to old directory] ************************************
changed: [go38box]

TASK [bootstrap : change user password] ****************************************
changed: [go38box]

TASK [bootstrap : update .bashrc file (1)] *************************************
changed: [go38box]

TASK [bootstrap : update .bashrc file (2)] *************************************
changed: [go38box]

TASK [bootstrap : set timezone] ************************************************
changed: [go38box]

TASK [bootstrap : update tzdata] ***********************************************
changed: [go38box]

TASK [bootstrap : set keyboard pc104(us)] **************************************
changed: [go38box]

TASK [bootstrap : add locales] *************************************************
changed: [go38box] => (item=en_US.UTF-8)
changed: [go38box] => (item=zh_TW.UTF-8)

TASK [bootstrap : generate locales] ********************************************
changed: [go38box]

TASK [bootstrap : deploy default locale] ***************************************
changed: [go38box]

TASK [bootstrap : set wifi country] ********************************************
changed: [go38box]

TASK [bootstrap : unblock wifi] ************************************************
changed: [go38box]

RUNNING HANDLER [bootstrap : restart networking] *******************************
changed: [go38box]

TASK [install : update apt cache and upgrade] **********************************
changed: [go38box]

TASK [install : configure MariaDB root password before installing] *************
changed: [go38box] => (item=mysql-server/root_password)
changed: [go38box] => (item=mysql-server/root_password_again)

TASK [install : configure phpMyAdmin password before installing] ***************
changed: [go38box] => (item=phpmyadmin/mysql/admin-pass)
changed: [go38box] => (item=phpmyadmin/mysql/app-pass)
changed: [go38box] => (item=phpmyadmin/app-password-confirm)

TASK [install : configure phpMyAdmin reconfigure before installing] ************
changed: [go38box]

TASK [install : configure phpMyAdmin dbconfig before installing] ***************
changed: [go38box]

TASK [install : install MariaDB with custom configuration] *********************
changed: [go38box]

TASK [install : install python-mysqldb] ****************************************
changed: [go38box]

TASK [install : add 'go38box' MariaDB user with all privileges] ****************
changed: [go38box]

TASK [install : update MariaDB settings] ***************************************
changed: [go38box]

TASK [install : restart MariaDB database] **************************************
changed: [go38box]

TASK [install : uninstall useless packages] ************************************
skipping: [go38box]

TASK [install : install packages] **********************************************
changed: [go38box] => (item=[u'iptables-persistent', u'git', u'ntfs-3g', u'exfat-fuse', u'lockfile-progs', u'incron', u'nginx', u'php7.0-fpm', u'php7.0-cli', u'php7.0-xmlrpc', u'php7.0-curl', u'php7.0-gd', u'php7.0-intl', u'php7.0-soap', u'php7.0-mysql', u'php-apcu', u'vim', u'python-pip', u'python-dev', u'build-essential', u'python-pandas'])

TASK [install : install phpMyAdmin package] ************************************
changed: [go38box]

TASK [install : copy usbmount deb package] *************************************
changed: [go38box]

TASK [install : install usbmount deb package] **********************************
changed: [go38box]

TASK [install : remove usbmount deb package] ***********************************
changed: [go38box]

TASK [install : Install python package(pip)] ***********************************
changed: [go38box] => (item=bokeh)

TASK [install : add script to resize partition on first boot] ******************
changed: [go38box]

TASK [install : enable ntfs format mounting by usbmount] ***********************
changed: [go38box]

TASK [install : add root to allowed incron users] ******************************
changed: [go38box]

RUNNING HANDLER [install : restart incron] *************************************
changed: [go38box]

TASK [network : configure zeroconf service] ************************************
changed: [go38box]

TASK [network : configure nginx] ***********************************************
changed: [go38box]

RUNNING HANDLER [bootstrap : restart networking] *******************************
changed: [go38box]

RUNNING HANDLER [network : restart web services] *******************************
changed: [go38box] => (item=nginx)
changed: [go38box] => (item=php7.0-fpm)

TASK [temperature : create database for Temperature] ***************************
changed: [go38box]

TASK [temperature : copy Temperature database file] ****************************
changed: [go38box]

TASK [temperature : import table from sql] *************************************
changed: [go38box]

TASK [temperature : get Templated from git repository] *************************
changed: [go38box]

TASK [temperature : create Templated directories with adequate permissions] ****
changed: [go38box] => (item=/var/www/html/temperature)

TASK [temperature : create DHT22 directories with adequate permissions] ********
changed: [go38box] => (item=/home/go38box/DHT22)

TASK [temperature : copy tempDHT22 file] ***************************************
changed: [go38box]

TASK [temperature : copy db_temp.html file] ************************************
changed: [go38box]

TASK [temperature : copy db_humidity.html file] ********************************
changed: [go38box]

TASK [temperature : copy tempLogs file] ****************************************
changed: [go38box]

TASK [temperature : copy and unzip Adafruit_Python_DHT file] *******************
changed: [go38box]

TASK [temperature : Go to the Adafruit_Python_DHT folder and execute install command] ***
changed: [go38box]

TASK [temperature : link directories for phpmyadmin] ***************************
changed: [go38box] => (item={u'src': u'/usr/share/phpmyadmin', u'path': u'/var/www/html/temperature/phpmyadmin'})
changed: [go38box] => (item={u'src': u'/home/go38box/DHT22/db_temp.html', u'path': u'/var/www/html/temperature/db_temp.html'})
changed: [go38box] => (item={u'src': u'/home/go38box/DHT22/db_humidity.html', u'path': u'/var/www/html/temperature/db_humidity.html'})

TASK [temperature : crontab tempDHT22.py] **************************************
changed: [go38box]

TASK [cleanup : remove useless packages from cache and no longer required dependencies] ***
ok: [go38box]

TASK [cleanup : empty log files] ***********************************************
changed: [go38box]

TASK [cleanup : reboot machine] ************************************************
changed: [go38box]

TASK [cleanup : wait for machine to come back] *********************************
ok: [go38box -> localhost]

TASK [cleanup : remove ssh public keys] ****************************************
changed: [go38box]

PLAY RECAP *********************************************************************
go38box                    : ok=76   changed=69   unreachable=0    failed=0

allen-mbp:go38box-temperature allen$

Last updated