diff --git a/.gitignore b/.gitignore
index d4b0c5a..2475f04 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,2 +1,3 @@
*.iml
-.idea
\ No newline at end of file
+.idea
+*.retry
\ No newline at end of file
diff --git a/scratches/002-sync_photos.conf b/scratches/002-sync_photos.conf
new file mode 100644
index 0000000..54672e7
--- /dev/null
+++ b/scratches/002-sync_photos.conf
@@ -0,0 +1,30 @@
+
+
+
+ ServerAdmin rudolfss13@gmail.com
+ ServerName part.syncthing.rudolf.com.ua
+
+ Use MacroSSL part.syncthing.rudolf
+
+ Use GoogleAuth https://part.syncthing.rudolf.com.ua/oauth2callback /
+
+ DocumentRoot /var/www/photos/cgi-bin
+
+
+ AllowOverride None
+ Options +ExecCGI
+ Order allow,deny
+ Allow from all
+
+
+ AddHandler cgi-script .py
+
+
+
+ Require claim email:rudolfss13@gmail.com
+ Require claim email:malta4ka@gmail.com
+
+
+
+
+
diff --git a/scratches/ESP_draft.sh b/scratches/ESP_draft.sh
new file mode 100644
index 0000000..df4df70
--- /dev/null
+++ b/scratches/ESP_draft.sh
@@ -0,0 +1,101 @@
+
+docker build -t rudolf/esp8266:0.1 .
+
+
+docker run -it \
+-v /media/WRK/projects/sh_ui:/root/sketch \
+-v /media/WRK/projects/sh_ui/build:/root/build \
+rudolf/esp8266:0.1 build node/node.ino
+
+
+docker run -it rudolf/esp8266:0.1 /bin/bash
+
+
+
+
+arduino --pref build.path=/root/build --verify /usr/local/share/arduino/examples/01.Basics/Blink/Blink.ino
+arduino --pref build.path=/root/build --verify /root/src/Blink.ino
+
+arduino --pref build.path=/root/build --pref build.board=esp8266 --verify /root/src/AdvancedWebServer.ino
+
+'arduino --pref build.path=/root/build --pref build.board=esp8266 --verify /root/src/AdvancedWebServer.ino'
+
+
+docker run --rm -it -v /tmp/.X11-unix:/tmp/.X11-unix -v $(pwd):/home/arduino/src rudeale/esp8266:0.3 ls -la src
+
+docker run --rm -it -e DISPLAY=$DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix rudeale/esp8266:0.3 ./arduino
+
+docker run --rm -it -e DISPLAY=$DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix rudeale/esp8266:0.3 ./arduino; /bin/bash
+
+
+
+----
+SKETCH=Blink
+rm -r "$SKETCH/build"
+mkdir "$SKETCH/build"
+docker run --rm -it -e DISPLAY=$DISPLAY -v $(pwd):/home/arduino/src -v $(pwd)/$SKETCH/build:/home/arduino/build -v /tmp/.X11-unix:/tmp/.X11-unix arduino-1.6.7 \
+./arduino --pref build.path=/home/arduino/build --verify /home/arduino/src/$SKETCH/$SKETCH.ino
+----
+
+SKETCH=ESP8266_WiFiTelnetToSerial
+chmod 777 -R
+rm -r "$SKETCH/build"
+mkdir "$SKETCH/build"
+docker run --rm -it -e DISPLAY=$DISPLAY -v $(pwd):/home/arduino/src -v $(pwd)/$SKETCH/build:/home/arduino/build -v /tmp/.X11-unix:/tmp/.X11-unix rudeale/esp8266:0.3 \
+./arduino --pref build.path=/home/arduino/build --verify /home/arduino/src/$SKETCH/$SKETCH.ino
+
+
+
+docker run --rm -it -e DISPLAY=$DISPLAY -v $(pwd):/home/arduino/src -v $(pwd)/$SKETCH/build:/home/arduino/build -v /tmp/.X11-unix:/tmp/.X11-unix arduino-1.6.7 \
+./arduino
+
+
+docker run --rm -it -e DISPLAY=$DISPLAY -v $(pwd)/Blink:/home/arduino/src -v /tmp/.X11-unix:/tmp/.X11-unix arduino-1.6.7 \
+ls -la
+
+Work
+ docker run --rm -it -e DISPLAY=$DISPLAY -v $(pwd):/home/arduino/src -v /tmp/.X11-unix:/tmp/.X11-unix arduino-1.6.7 ./arduino /home/arduino/src/Blink/Blink.in
+
+
+----
+arduinoc --install-library ArduinoJson
+
+
+
+
+docker run --rm -it ls -la src
+
+
+
+arduino --pref build.path=/root/build --pref build.board=nano --verify /root/src/Blink.ino
+
+
+ln -s /media/WRK/arduino/arduino-1.6.5 /usr/local/share/arduino
+ln -s /media/WRK/arduino/arduino-1.6.5/arduino /usr/local/bin/arduino
+
+arduino --pref build.path=/home/rudolf/tmp/build --pref build.board=esp8266 --verify /media/WRK/projects/arduino/cmake/ESP8266_WiFiTelnetToSerial/ESP8266_WiFiTelnetToSerial.ino
+
+
+
+
+sudo docker exec -i -t 665b4a1e17b6 arduinoc
+
+/root/.arduino15/packages/esp8266/hardware/esp8266/2.0.0/libraries/ESP8266WebServer/examples/AdvancedWebServer/AdvancedWebServer.ino
+
+
+sudo docker run -it rudeale/esp8266:0.1 bash
+
+sudo docker run -it bash
+
+sudo docker run --privileged \
+ -v /dev/ttyS1:/dev/ttyS1 \
+ -v $(pwd):/app \
+ coopermaa/ino
+
+# TODO Compile in directory SRC
+
+# Build blink example
+
+# ./arduino examples/01.Basics/Blink/Blink.ino
+# docker run -it -d ubuntu:15.10 bin/bash
+# docker exec -it fc /bin/bash
diff --git a/gitlab.yaml b/scratches/gitlab.yaml
similarity index 100%
rename from gitlab.yaml
rename to scratches/gitlab.yaml
diff --git a/scratches/jenkins/Dockerfile b/scratches/jenkins/Dockerfile
new file mode 100644
index 0000000..bcae224
--- /dev/null
+++ b/scratches/jenkins/Dockerfile
@@ -0,0 +1,8 @@
+FROM jenkins
+
+USER root
+RUN apt-get update \
+ && apt-get install -y sudo docker.io \
+ && rm -rf /var/lib/apt/lists/*
+RUN echo "jenkins ALL=NOPASSWD: ALL" >> /etc/sudoers
+
diff --git a/scratches/jenkins/docker/Dockerfile b/scratches/jenkins/docker/Dockerfile
new file mode 100644
index 0000000..80ee5cd
--- /dev/null
+++ b/scratches/jenkins/docker/Dockerfile
@@ -0,0 +1,8 @@
+FROM jenkins
+
+USER root
+RUN apt-get update \
+ && apt-get install -y sudo \
+ && rm -rf /var/lib/apt/lists/*
+RUN echo "jenkins ALL=NOPASSWD: ALL" >> /etc/sudoers
+
diff --git a/jenkins/hudson.plugins.git.GitSCM.xml b/scratches/jenkins/hudson.plugins.git.GitSCM.xml
similarity index 100%
rename from jenkins/hudson.plugins.git.GitSCM.xml
rename to scratches/jenkins/hudson.plugins.git.GitSCM.xml
diff --git a/jenkins/hudson.tasks.Maven.xml b/scratches/jenkins/hudson.tasks.Maven.xml
similarity index 100%
rename from jenkins/hudson.tasks.Maven.xml
rename to scratches/jenkins/hudson.tasks.Maven.xml
diff --git a/jenkins/jenkins.mvn.GlobalMavenConfig.xml b/scratches/jenkins/jenkins.mvn.GlobalMavenConfig.xml
similarity index 100%
rename from jenkins/jenkins.mvn.GlobalMavenConfig.xml
rename to scratches/jenkins/jenkins.mvn.GlobalMavenConfig.xml
diff --git a/jenkins/jobs/Deploy_glassfish/config.xml b/scratches/jenkins/jobs/Deploy_glassfish/config.xml
similarity index 100%
rename from jenkins/jobs/Deploy_glassfish/config.xml
rename to scratches/jenkins/jobs/Deploy_glassfish/config.xml
diff --git a/jenkins/jobs/Deploy_tomcat/config.xml b/scratches/jenkins/jobs/Deploy_tomcat/config.xml
similarity index 100%
rename from jenkins/jobs/Deploy_tomcat/config.xml
rename to scratches/jenkins/jobs/Deploy_tomcat/config.xml
diff --git a/jenkins/jobs/ExpEng/config.xml b/scratches/jenkins/jobs/ExpEng/config.xml
similarity index 100%
rename from jenkins/jobs/ExpEng/config.xml
rename to scratches/jenkins/jobs/ExpEng/config.xml
diff --git a/jenkins/jobs/Finance/config.xml b/scratches/jenkins/jobs/Finance/config.xml
similarity index 100%
rename from jenkins/jobs/Finance/config.xml
rename to scratches/jenkins/jobs/Finance/config.xml
diff --git a/jenkins/jobs/Finance_selenium/config.xml b/scratches/jenkins/jobs/Finance_selenium/config.xml
similarity index 100%
rename from jenkins/jobs/Finance_selenium/config.xml
rename to scratches/jenkins/jobs/Finance_selenium/config.xml
diff --git a/jenkins/jobs/GAU_self_cache/config.xml b/scratches/jenkins/jobs/GAU_self_cache/config.xml
similarity index 100%
rename from jenkins/jobs/GAU_self_cache/config.xml
rename to scratches/jenkins/jobs/GAU_self_cache/config.xml
diff --git a/jenkins/jobs/GIT Backups/config.xml b/scratches/jenkins/jobs/GIT Backups/config.xml
similarity index 100%
rename from jenkins/jobs/GIT Backups/config.xml
rename to scratches/jenkins/jobs/GIT Backups/config.xml
diff --git a/jenkins/jobs/Gau_1.2/config.xml b/scratches/jenkins/jobs/Gau_1.2/config.xml
similarity index 100%
rename from jenkins/jobs/Gau_1.2/config.xml
rename to scratches/jenkins/jobs/Gau_1.2/config.xml
diff --git a/jenkins/jobs/Gau_1.3/config.xml b/scratches/jenkins/jobs/Gau_1.3/config.xml
similarity index 100%
rename from jenkins/jobs/Gau_1.3/config.xml
rename to scratches/jenkins/jobs/Gau_1.3/config.xml
diff --git a/jenkins/jobs/LetsEncrypt renewal/config.xml b/scratches/jenkins/jobs/LetsEncrypt renewal/config.xml
similarity index 100%
rename from jenkins/jobs/LetsEncrypt renewal/config.xml
rename to scratches/jenkins/jobs/LetsEncrypt renewal/config.xml
diff --git a/jenkins/jobs/Monitoring/config.xml b/scratches/jenkins/jobs/Monitoring/config.xml
similarity index 100%
rename from jenkins/jobs/Monitoring/config.xml
rename to scratches/jenkins/jobs/Monitoring/config.xml
diff --git a/jenkins/jobs/MySQL Backups/config.xml b/scratches/jenkins/jobs/MySQL Backups/config.xml
similarity index 100%
rename from jenkins/jobs/MySQL Backups/config.xml
rename to scratches/jenkins/jobs/MySQL Backups/config.xml
diff --git a/jenkins/jobs/SVN backups/config.xml b/scratches/jenkins/jobs/SVN backups/config.xml
similarity index 100%
rename from jenkins/jobs/SVN backups/config.xml
rename to scratches/jenkins/jobs/SVN backups/config.xml
diff --git a/jenkins/jobs/smarthome/config.xml b/scratches/jenkins/jobs/smarthome/config.xml
similarity index 99%
rename from jenkins/jobs/smarthome/config.xml
rename to scratches/jenkins/jobs/smarthome/config.xml
index 2206698..3743d65 100644
--- a/jenkins/jobs/smarthome/config.xml
+++ b/scratches/jenkins/jobs/smarthome/config.xml
@@ -68,7 +68,7 @@
clean
install
- maven 3.3.9
+ maven
web_ui/pom.xml
false
diff --git a/jenkins/jobs/smarthome_master/config.xml b/scratches/jenkins/jobs/smarthome_master/config.xml
similarity index 98%
rename from jenkins/jobs/smarthome_master/config.xml
rename to scratches/jenkins/jobs/smarthome_master/config.xml
index 6db13a7..8f63b30 100644
--- a/jenkins/jobs/smarthome_master/config.xml
+++ b/scratches/jenkins/jobs/smarthome_master/config.xml
@@ -27,7 +27,7 @@
false
- H/5 * * * *
+ */1 * * * *
false
diff --git a/scratches/photos_syncer.yaml b/scratches/photos_syncer.yaml
new file mode 100644
index 0000000..d700c00
--- /dev/null
+++ b/scratches/photos_syncer.yaml
@@ -0,0 +1,18 @@
+---
+- hosts: apache2
+
+ tasks:
+
+ - name: create directory for python
+ file:
+ path: /var/www/photos/cgi-bin
+ state: directory
+ mode: 0777
+ become: yes
+
+
+ - name: checkout photos syncer
+ git:
+ repo: ssh://git@rudolf.com.ua:23/rudolf/photos.git
+ dest: /var/www/photos/cgi-bin
+ accept_hostkey: True
diff --git a/scratches/some_role/README.md b/scratches/some_role/README.md
new file mode 100644
index 0000000..225dd44
--- /dev/null
+++ b/scratches/some_role/README.md
@@ -0,0 +1,38 @@
+Role Name
+=========
+
+A brief description of the role goes here.
+
+Requirements
+------------
+
+Any pre-requisites that may not be covered by Ansible itself or the role should be mentioned here. For instance, if the role uses the EC2 module, it may be a good idea to mention in this section that the boto package is required.
+
+Role Variables
+--------------
+
+A description of the settable variables for this role should go here, including any variables that are in defaults/main.yml, vars/main.yml, and any variables that can/should be set via parameters to the role. Any variables that are read from other roles and/or the global scope (ie. hostvars, group vars, etc.) should be mentioned here as well.
+
+Dependencies
+------------
+
+A list of other roles hosted on Galaxy should go here, plus any details in regards to parameters that may need to be set for other roles, or variables that are used from other roles.
+
+Example Playbook
+----------------
+
+Including an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too:
+
+ - hosts: servers
+ roles:
+ - { role: username.rolename, x: 42 }
+
+License
+-------
+
+BSD
+
+Author Information
+------------------
+
+An optional section for the role authors to include contact information, or a website (HTML is not allowed).
diff --git a/scratches/some_role/defaults/main.yml b/scratches/some_role/defaults/main.yml
new file mode 100644
index 0000000..e69de29
diff --git a/scratches/some_role/handlers/main.yml b/scratches/some_role/handlers/main.yml
new file mode 100644
index 0000000..4c5d428
--- /dev/null
+++ b/scratches/some_role/handlers/main.yml
@@ -0,0 +1,2 @@
+---
+# handlers file for some_role
\ No newline at end of file
diff --git a/scratches/some_role/meta/main.yml b/scratches/some_role/meta/main.yml
new file mode 100644
index 0000000..7223799
--- /dev/null
+++ b/scratches/some_role/meta/main.yml
@@ -0,0 +1,57 @@
+galaxy_info:
+ author: your name
+ description: your description
+ company: your company (optional)
+
+ # If the issue tracker for your role is not on github, uncomment the
+ # next line and provide a value
+ # issue_tracker_url: http://example.com/issue/tracker
+
+ # Some suggested licenses:
+ # - BSD (default)
+ # - MIT
+ # - GPLv2
+ # - GPLv3
+ # - Apache
+ # - CC-BY
+ license: license (GPLv2, CC-BY, etc)
+
+ min_ansible_version: 1.2
+
+ # If this a Container Enabled role, provide the minimum Ansible Container version.
+ # min_ansible_container_version:
+
+ # Optionally specify the branch Galaxy will use when accessing the GitHub
+ # repo for this role. During role install, if no tags are available,
+ # Galaxy will use this branch. During import Galaxy will access files on
+ # this branch. If Travis integration is configured, only notifications for this
+ # branch will be accepted. Otherwise, in all cases, the repo's default branch
+ # (usually master) will be used.
+ #github_branch:
+
+ #
+ # platforms is a list of platforms, and each platform has a name and a list of versions.
+ #
+ # platforms:
+ # - name: Fedora
+ # versions:
+ # - all
+ # - 25
+ # - name: SomePlatform
+ # versions:
+ # - all
+ # - 1.0
+ # - 7
+ # - 99.99
+
+ galaxy_tags: []
+ # List tags for your role here, one per line. A tag is a keyword that describes
+ # and categorizes the role. Users find roles by searching for tags. Be sure to
+ # remove the '[]' above, if you add tags to this list.
+ #
+ # NOTE: A tag is limited to a single word comprised of alphanumeric characters.
+ # Maximum 20 tags per role.
+
+dependencies: []
+ # List your role dependencies here, one per line. Be sure to remove the '[]' above,
+ # if you add dependencies to this list.
\ No newline at end of file
diff --git a/scratches/some_role/tasks/main.yml b/scratches/some_role/tasks/main.yml
new file mode 100644
index 0000000..1a6282a
--- /dev/null
+++ b/scratches/some_role/tasks/main.yml
@@ -0,0 +1,2 @@
+---
+# tasks file for some_role
\ No newline at end of file
diff --git a/scratches/some_role/tests/inventory b/scratches/some_role/tests/inventory
new file mode 100644
index 0000000..878877b
--- /dev/null
+++ b/scratches/some_role/tests/inventory
@@ -0,0 +1,2 @@
+localhost
+
diff --git a/scratches/some_role/tests/test.yml b/scratches/some_role/tests/test.yml
new file mode 100644
index 0000000..9325a86
--- /dev/null
+++ b/scratches/some_role/tests/test.yml
@@ -0,0 +1,5 @@
+---
+- hosts: localhost
+ remote_user: root
+ roles:
+ - some_role
\ No newline at end of file
diff --git a/scratches/some_role/vars/main.yml b/scratches/some_role/vars/main.yml
new file mode 100644
index 0000000..f800ef6
--- /dev/null
+++ b/scratches/some_role/vars/main.yml
@@ -0,0 +1,2 @@
+---
+# vars file for some_role
\ No newline at end of file
diff --git a/syncthing.yaml b/scratches/syncthing.yaml
similarity index 100%
rename from syncthing.yaml
rename to scratches/syncthing.yaml
diff --git a/syncthing/config.xml b/scratches/syncthing/config.xml
similarity index 100%
rename from syncthing/config.xml
rename to scratches/syncthing/config.xml
diff --git a/syncthing/syncthing.service b/scratches/syncthing/syncthing.service
similarity index 100%
rename from syncthing/syncthing.service
rename to scratches/syncthing/syncthing.service
diff --git a/tomcat.yaml b/scratches/tomcat.yaml
similarity index 82%
rename from tomcat.yaml
rename to scratches/tomcat.yaml
index d5298fe..8c1fae5 100644
--- a/tomcat.yaml
+++ b/scratches/tomcat.yaml
@@ -1,5 +1,5 @@
---
-- hosts: serva4og
+- hosts: tomcat
vars:
user: rudolf
become: yes
@@ -18,6 +18,14 @@
groups: docker
append: yes
+ - name: create required folders
+ file:
+ path: /var/tomcat
+ state: directory
+ mode: 0755
+ owner: "{{ user }}"
+ group: "{{ user }}"
+
- name: copy users file
copy:
src: tomcat/tomcat-users.xml
@@ -34,6 +42,7 @@
image: tomcat:jre8
detach: True
net: default
+ restart_policy: always
ports:
- "0.0.0.0:{{ tomcat_port }}:8080"
volumes:
@@ -48,6 +57,7 @@
- name: restart tomcat docker
docker_container:
name: tomcat
+ restart_policy: always
image: tomcat:jre8
restart: yes
ports:
diff --git a/tomcat/tomcat-users.xml b/scratches/tomcat/tomcat-users.xml
similarity index 100%
rename from tomcat/tomcat-users.xml
rename to scratches/tomcat/tomcat-users.xml