forked from admin/ansible
Scratches.
This commit is contained in:
+2
-1
@@ -1,2 +1,3 @@
|
||||
*.iml
|
||||
.idea
|
||||
.idea
|
||||
*.retry
|
||||
@@ -0,0 +1,30 @@
|
||||
<IfModule mod_ssl.c>
|
||||
<VirtualHost *:443>
|
||||
|
||||
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
|
||||
|
||||
<Directory "/var/www/photos/cgi-bin">
|
||||
AllowOverride None
|
||||
Options +ExecCGI
|
||||
Order allow,deny
|
||||
Allow from all
|
||||
</Directory>
|
||||
|
||||
AddHandler cgi-script .py
|
||||
|
||||
|
||||
<Location />
|
||||
Require claim email:rudolfss13@gmail.com
|
||||
Require claim email:malta4ka@gmail.com
|
||||
</Location>
|
||||
|
||||
|
||||
</VirtualHost>
|
||||
</IfModule>
|
||||
@@ -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
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -68,7 +68,7 @@
|
||||
<hudson.tasks.Maven>
|
||||
<targets>clean
|
||||
install</targets>
|
||||
<mavenName>maven 3.3.9</mavenName>
|
||||
<mavenName>maven</mavenName>
|
||||
<pom>web_ui/pom.xml</pom>
|
||||
<usePrivateRepository>false</usePrivateRepository>
|
||||
<settings class="jenkins.mvn.DefaultSettingsProvider"/>
|
||||
+1
-1
@@ -27,7 +27,7 @@
|
||||
<blockBuildWhenUpstreamBuilding>false</blockBuildWhenUpstreamBuilding>
|
||||
<triggers>
|
||||
<hudson.triggers.SCMTrigger>
|
||||
<spec>H/5 * * * *</spec>
|
||||
<spec>*/1 * * * *</spec>
|
||||
<ignorePostCommitHooks>false</ignorePostCommitHooks>
|
||||
</hudson.triggers.SCMTrigger>
|
||||
</triggers>
|
||||
@@ -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
|
||||
@@ -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).
|
||||
@@ -0,0 +1,2 @@
|
||||
---
|
||||
# handlers file for some_role
|
||||
@@ -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.
|
||||
@@ -0,0 +1,2 @@
|
||||
---
|
||||
# tasks file for some_role
|
||||
@@ -0,0 +1,2 @@
|
||||
localhost
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
- hosts: localhost
|
||||
remote_user: root
|
||||
roles:
|
||||
- some_role
|
||||
@@ -0,0 +1,2 @@
|
||||
---
|
||||
# vars file for some_role
|
||||
@@ -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:
|
||||
Reference in New Issue
Block a user