Monday, June 18, 2018

reverse task sequence in Ansible

I found this solution to be handy for my need that I need to reverse the task sequence when I remove the instance from the cloud, basically, all task are the same just like when creating the instance, only for removing it, the task should start from the last one, here is my ansible playbook, as you can see I have list of task that needs to be performed in sequence, put them in to the list is the trick here, so I can have them sequenced in reverse.


- name: Create/Destroy instance
  hosts: localhost

    cmd_sequence:  [  "projects.yml", "members.yml", "groups.yml", "rules.yml", "networks.yml", "subnets.yml", "ports.yml", "servers.yml", "router.yml", "properties.yml" ]


    - name: DESTROY Instance from the Cloud
        task_name: "tasks/{{ item }}"
      include_tasks: "{{ task_name }}"
        - "{{ cmd_sequence[::-1] }}"
      when: deploytype=="DESTROY"

    - name: CREATE Instance in the Cloud
        task_name: "tasks/{{ item }}"
      include_tasks: "{{ task_name }}"
        - "{{ cmd_sequence }}"
      when: deploytype=="CREATE"


Monday, February 2, 2015

Clover IRC105 Color Camera connector 4 pinout

for the owner or ex-owner that has the IRC105 camera without the cable and want to know what is the pin out for its connector, here is the info :

this is the camera :

this is the connector pinout :

1 : Video (+) pin
2 : Video (-) pin
3 : Camera Voltage  (-)  pin
4 : Camera Voltage (+) pin

Wednesday, September 24, 2014

Windows 7 Share inaccessible from non-windows or old media player (PBO, PlayOn, ACRyan)

recently my windows 7 PC got the update and suddenly my media player unable to access video files stored in my PC, turned out now windows 7 is too secure for non-microsoft media player, or any old media player.

here is the remedy, change the windows 7 registry to allow old style authentication from other device.

open Regedit, go to HKEY_LOCAL_MACHINE  (HKLM)
  • in HKLM\SYSTEM\CurrentControlSet\Control\Lsa, create LmCompatibilityLevel = dword "1", and change NoLmHash from "0" to "1"
  • in HKLM\SOFTWARE\Policies\Microsoft create key Netlogon
  • in HKLM\SOFTWARE\Policies\Microsoft\Netlogon create key Paramaters
  • in HKLM\SOFTWARE\Policies\Microsoft\Netlogon\Paramaters create AllowNT4Crypto = dword "1"
  • in HKLM\SYSTEM\CurrentControlSet\Services\Netlogon\Paramaters create AllowNT4Crypto = dword "1"
  • make sure in HKLM\SYSTEM\CurrentControlSet\Services\Lanmanserver\Paramaters requiresecuritysignature already set to dword "0"

restart a PC, now window share is accessible again from old media player.

my media player is PBO from patriot, and run PlayonHD firmware from AC Ryan.

Thursday, September 18, 2014

Driver for Tiny USB wifi dongle, RTL8188BEV or RTL8188CUS

just want to share the link, here is the driver for Linux, Windows XP up to 8 and Mac OSX, looking the right ones was pain in the butt.

and here is the dongle that I got it from ebay.

Monday, June 3, 2013

traffic measurement with STAK on asterisk with g.729

ever wonder how much g729 compare to g711 when it come to use the bandwidth ?, here is the result when I am using STAK, ( stak-1.0b1 on linux) in my asterisk server.

with g711 codec :

./stakrate -r5 -ci eth2 -f  "host  x.x.x.x"
=> Currently 19.57 kBps/100.40  pps, Average: 19.57 kBps/100.40  pps
=> Currently 19.57 kBps/100.40  pps, Average: 19.57 kBps/100.40  pps
=> Currently 19.57 kBps/100.40  pps, Average: 19.57 kBps/100.40  pps
=> Currently 19.61 kBps/100.60  pps, Average: 19.58 kBps/100.45  pps

with g729 codec :

./stakrate -r5 -ci eth2 -f  "host  x.x.x.x"
=> Currently 5.90 kBps/100.40  pps, Average: 5.90 kBps/100.40  pps
=> Currently 5.91 kBps/100.60  pps, Average: 5.90 kBps/100.50  pps
=> Currently 6.75 kBps/101.80  pps, Average: 6.18 kBps/100.93  pps
=> Currently 6.79 kBps/102.20  pps, Average: 6.34 kBps/101.25  pps

almost 1/4.

Thursday, May 2, 2013

Unlock Linksys Sipura SPA 2102-R from clearwire.

I know this is getting old, but continuing the topic, I found another used SPA-2102-R that is no longer attached with the provider, named clearwire, and with the same trick that I use in this link 
Unlock Linksys Sipura SPA 2102, I am able to unlock it and use it with my own voip provider, but with slightly different step.

1. without connecting it anywhere, except a phone headset, set device to default configuration, by pressing **** and option 73738# and press 1 to confirm.
2. make dns record to have pointing out to personal webserver address.
3. and copy that spaMAC.cfg which is explained in above link to webserver directory.
4. turn on SPA device, and after it get the provision file above the device will have all password cleared.

easy device to work with. 

Saturday, January 19, 2013

Memory Stick 64bit driver for Sony Vaio VGN-FW140E, dev id 0592

download the driver from this site if you want to enable ricoh memory stick controller on windows 7 64bit.



last archive