Download: 2458 kbit/s
Upload: 383 kbit/s

lirc
sudo apt-get install lirc
lirc
module - edit /boot/config.txt
dtoverlay=lirc-rpi,gpio_out_pin=4,gpio_in_pin=22
lirc
- edit /etc/lirc/hardware.conf
LIRCD_ARGS="" ... DRIVER="default" DEVICE="/dev/lirc0" MODULES="lirc_rpi"
irrecord -d /dev/lirc0 ~/lircd.conf
sudo cp ~/lircd.conf /etc/lirc/lircd.conf
/etc/lirc/lircd.conf
I choose magicmirrorlirc
pi@mamomami /etc/lirc $ sudo /etc/init.d/lirc start [ ok ] Loading LIRC modules:. [ ok ] Starting remote control daemon(s) : LIRC :.
pi@mamomami /etc/lirc $ irsend LIST "magicmirror" "" irsend: 00000000000043bc KEY_POWER
lirc
service on start up
sudo update-rc.d lirc defaults
# an example something=xxxxLets assume I want to update the xxxx with some values.
--- - hosts: localhost tasks: - name: create file copy: src=./demo dest=/tmp/demo - name: update xxxx lineinfile: dest: /tmp/demo regexp: '^(.*)xxxx' line: '\1{{ansible_date_time.year}}' backrefs: yes state: presentThe update task "update xxxx" should inspect the file, search for the line with "xxxx" and replace the "xxxx" while keeping the part in front of it.
# an example P16
\1
is not resolved as expected but merged with (some) of the year digits. This results in the "P".(?P<name>pattern)
and can than be reference with \g<1>
or \g<name>
# an example simple backref=xxxx group backref with number=yyyy group backref with name=zzzzthe generated output is:
# an example P16 group backref with number=2016 group backref with name=2016
role_path
returns the current role's pathname (see Ansible docs). Use the basename filter to extract the role name.{{ role_path | basename }}Note:
role_path
is only defined inside a role.
rpm -i inadyn-mt-2.24.44-1.fc22.src.rpm
cd ~/rpmbuild/SPECS rpmbuild -ba inadyn-mt.spec
rpm -i ~/rpmbuild/RPMS/x86_64/inadyn-mt-2.24.44-1.el7.centos.x86_64.rpm