diff --git a/hosts b/hosts index bf50b99..d450033 100644 --- a/hosts +++ b/hosts @@ -6,3 +6,4 @@ ipads: ansible_ssh_user: mobile ansible_ssh_pass: alpine ansible_become_pass: alpine + ansible_python_interpreter: /usr/bin/python2.7 diff --git a/initial-setup.yml b/initial-setup.yml new file mode 100644 index 0000000..0cce09c --- /dev/null +++ b/initial-setup.yml @@ -0,0 +1,20 @@ +- name: ipad setup + hosts: ipads + gather_facts: no + become: true + tasks: + - name: Allow Pubkey Authentication for OpenSSH + raw: >- + sed -i /etc/ssh/sshd_config + -e 's|^#\?PubkeyAuthentication\W.*|PubkeyAuthentication yes|' + -e 's|^#\?AuthorizedKeysFile\W.*|AuthorizedKeysFile %h/.ssh/authorized_keys|' + -e 's|^#\?PermitRootLogin\W.*|PermitRootLogin no|' + - name: Fix /var/mobile permissions + raw: chmod 750 /var/mobile + - name: restart sshd + raw: launchctl kickstart -k system/com.openssh.sshd + - name: copy python 2.7 deb + local_action: command scp -r ./python_2.7.6-3_iphoneos-arm.deb "{{ inventory_hostname }}:" + become: false + - name: install python 2.7 + raw: dpkg -i python_2.7.6-3_iphoneos-arm.deb && rm python_2.7.6-3_iphoneos-arm.deb diff --git a/ipads.yml b/ipads.yml index 943c87a..18e043b 100644 --- a/ipads.yml +++ b/ipads.yml @@ -3,26 +3,24 @@ gather_facts: no become: true tasks: - - name: Allow Pubkey Authentication for OpenSSH - raw: >- - sed -i /etc/ssh/sshd_config - -e 's|^#\?PubkeyAuthentication\W.*|PubkeyAuthentication yes|' - -e 's|^#\?AuthorizedKeysFile\W.*|AuthorizedKeysFile %h/.ssh/authorized_keys|' - -e 's|^#\?PermitRootLogin\W.*|PermitRootLogin no|' - - name: Fix /var/mobile permissions - raw: chmod 750 /var/mobile - - name: restart sshd - raw: launchctl kickstart -k system/com.openssh.sshd - name: Add Karen's Repo - raw: echo "deb http://cydia.akemi.ai/ ./" > /etc/apt/sources.list.d/akemi.list + copy: + content: | + deb http://cydia.akemi.ai/ ./ + dest: /etc/apt/sources.list.d/akemi.list - name: Add rpetrich Repo - raw: echo "deb https://rpetri.ch/repo/ ./" > /etc/apt/sources.list.d/rpetrich.list + copy: + content: | + deb https://rpetri.ch/repo/ ./ + dest: /etc/apt/sources.list.d/rpetrich.list - name: Update apt sources - raw: apt-get update + command: apt-get update - name: Install packages - raw: apt-get install -y --force-yes net.angelxwind.mikoto libactivator com.rpetrich.monocle + command: apt-get install -y --force-yes net.angelxwind.mikoto libactivator com.rpetrich.monocle - name: Copy webclip - local_action: command scp -r ./reservations_display.webclip {{ inventory_hostname }}:Library/WebClips become: false + copy: + src: reservations_display.webclip + dest: /var/mobile/Library/WebClips/ - name: Respring - raw: killall SpringBoard + command: killall SpringBoard diff --git a/notes.org b/notes.org index 374da4b..4c7d3ce 100644 --- a/notes.org +++ b/notes.org @@ -19,6 +19,10 @@ 3. edit =/etc/sudoers= to allow =wheel= 4. edit =/etc/group= to add mobile to =wheel= 5. install [[https://cydia.akemi.ai/?page/net.angelxwind.mikoto][mikoto]] to disable OTA update notifications (and some other things) + +* ansible +** Python 2.7 availible from https://github.com/linusyang/python-for-ios/releases + * iPad lock/unlock via activator #+begin_src bash activator send libactivator.system.sleepbutton # lock diff --git a/python_2.7.6-3_iphoneos-arm.deb b/python_2.7.6-3_iphoneos-arm.deb new file mode 100644 index 0000000..57938b8 Binary files /dev/null and b/python_2.7.6-3_iphoneos-arm.deb differ