Files
@ d46f6d0254d1
Branch filter:
Location: ChaosStuff/cnc-dashboard/roles/python/tasks/main.yml - annotation
d46f6d0254d1
984 B
text/x-yaml
Add further documentation in README
c3309581c2ac c3309581c2ac d62fafa9ab3a c3309581c2ac c3309581c2ac c3309581c2ac c3309581c2ac c3309581c2ac c3309581c2ac c3309581c2ac c3309581c2ac c3309581c2ac c3309581c2ac c3309581c2ac c3309581c2ac c3309581c2ac c3309581c2ac c3309581c2ac c3309581c2ac c3309581c2ac c3309581c2ac c3309581c2ac c3309581c2ac c3309581c2ac c3309581c2ac c3309581c2ac c3309581c2ac c3309581c2ac | # $DATE is host time, which we force set on the target machine.
# Allows downloading stuff without TLS errors
# Expect timeout is needed, otherwise by default it terminates itself after 10 seconds
- name: Pacman keyring + Python installation
delegate_to: localhost
ansible.builtin.shell: |
DATE=$(date "+%F %T")
expect <<EOD
set timeout 600
spawn sshpass -p alarm ssh \
-o UserKnownHostsFile=/dev/null \
-o StrictHostKeyChecking=no \
-o PubkeyAuthentication=false \
alarm@{{ ansible_host }}
expect "$ "
send "su\r"
expect "Password: "
send "root\r"
expect "alarm alarm]# "
send -- "date --set=\"$DATE\"\; "
send -- "pacman-key --init\; "
send -- "pacman-key --populate archlinuxarm\; "
send -- "pacman -q --noconfirm -Sy python\r"
expect "alarm alarm]# "
interact
EOD
register: cmd_reg
- debug: msg="{{ cmd_reg.stdout }}"
|