Skip to content

Latest commit

 

History

History

raspi-01

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

mackerel-practice/raspi-01

RaspberryPi起点で自宅インターネット回線モニタリング作戦 の環境構築コード
+ 自宅のグローバルIPが変わるのを監視する用のコード

refs

Pre-Requirements

Execution procedure

cd ${your_appropriate_directory}
git clone https://github.com/sogaoh/mackerel-practice.git

cd mackerel-practice/raspi-01

cd 02_ansible/roles
#ansible-galaxy install mackerelio.mackerel-agent
#mv ${/path/to/.ansible}/roles/* ./ 
cd ..    # 02_ansible

(vi inventry)
(vi variables.yaml)

ansible-playbook ./raspi-01.yaml -i "[target host IP, etc...],"  -e @variables.yaml -v -C

ansible-playbook ./raspi-01.yaml -i "[target host IP, etc...],"  -e @variables.yaml -vv

rm -f *.retry

cd ../..   # mackerel-practice

Setting Contents, Resources

variables.yaml

mackerel_agent_apikey: "${Set Yours}"
service_to_post: "${Set Service}"

inventory (if necessary)

[localhost]
127.0.0.1 ansible_connection=local

[raspi]
raspi-01  ansible_host=192.168.0.34

[raspi:vars]
#ansible_port=${Set if necessary}
ansible_ssh_user=pi     # RaspberryPi default
ansible_ssh_private_key_file=${Set Yours}
ansible_become=yes
ansible_become_user=root
ansible_become_method=enable

Appendix

Sub modules