Install python 2.7 in initial-setup playbook, avoid raw where now possible

This commit is contained in:
Adam Goldsmith 2021-11-17 02:24:06 -05:00
parent 2df67725cb
commit 695a7ba8c4
5 changed files with 39 additions and 16 deletions

1
hosts
View File

@ -6,3 +6,4 @@ ipads:
ansible_ssh_user: mobile ansible_ssh_user: mobile
ansible_ssh_pass: alpine ansible_ssh_pass: alpine
ansible_become_pass: alpine ansible_become_pass: alpine
ansible_python_interpreter: /usr/bin/python2.7

20
initial-setup.yml Normal file
View File

@ -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

View File

@ -3,26 +3,24 @@
gather_facts: no gather_facts: no
become: true become: true
tasks: 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 - 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 - 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 - name: Update apt sources
raw: apt-get update command: apt-get update
- name: Install packages - 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 - name: Copy webclip
local_action: command scp -r ./reservations_display.webclip {{ inventory_hostname }}:Library/WebClips
become: false become: false
copy:
src: reservations_display.webclip
dest: /var/mobile/Library/WebClips/
- name: Respring - name: Respring
raw: killall SpringBoard command: killall SpringBoard

View File

@ -19,6 +19,10 @@
3. edit =/etc/sudoers= to allow =wheel= 3. edit =/etc/sudoers= to allow =wheel=
4. edit =/etc/group= to add mobile to =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) 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 * iPad lock/unlock via activator
#+begin_src bash #+begin_src bash
activator send libactivator.system.sleepbutton # lock activator send libactivator.system.sleepbutton # lock

Binary file not shown.