equal
  deleted
  inserted
  replaced
  
    
    
     1 ---  | 
     1 ---  | 
     2   | 
     2   | 
     3 - name: download automationhat install script  | 
     3 # Based on https://get.pimoroni.com/automationhat script  | 
     4   get_url:  | 
         | 
     5     url: "https://get.pimoroni.com/automationhat"  | 
         | 
     6     dest: "/tmp/automationhat.sh"  | 
         | 
     7     mode: 0750  | 
         | 
     8   | 
     4   | 
     9 - name: install automationhat  | 
     5 - name: install automationhat apt packages  | 
    10   shell: "/tmp/automationhat.sh"  | 
     6   become: yes  | 
    11   args:  | 
     7   apt: name="{{item}}" | 
    12     chdir: "/tmp"  | 
     8   with_items: "{{automationhat_apt_packages}}" | 
    13     executable: "/bin/bash"  | 
     9   | 
         | 
    10 - name: configure i2c boot config  | 
         | 
    11   become: yes  | 
         | 
    12   lineinfile:  | 
         | 
    13     path: "/boot/config.txt"  | 
         | 
    14     line: "dtparam=i2c_arm=on"  | 
         | 
    15     insertafter: "^#dtparam=i2c_arm=on"  | 
         | 
    16   | 
         | 
    17 - name: configure i2c kernel modules  | 
         | 
    18   become: yes  | 
         | 
    19   lineinfile:  | 
         | 
    20     path: "/etc/modules"  | 
         | 
    21     line: "{{item}}" | 
         | 
    22   with_items: "{{automationhat_modules}}" | 
         | 
    23   | 
         | 
    24 - name: modprobe kernel modules  | 
         | 
    25   become: yes  | 
         | 
    26   modprobe: name="{{item}}" | 
         | 
    27   with_items: "{{automationhat_modules}}" | 
         | 
    28   | 
         | 
    29 - name: dtparam i2c  | 
         | 
    30   become: yes  | 
         | 
    31   command: "dtparam i2c_arm=on"  | 
         | 
    32   changed_when: false  | 
         | 
    33   | 
         | 
    34 - name: enable i2c with raspi-config  | 
         | 
    35   become: yes  | 
         | 
    36   command: "raspi-config nonint do_i2c 0"  | 
         | 
    37   changed_when: false  |