summaryrefslogtreecommitdiff
path: root/dan/ele-ap.yml
blob: a64ed8a4d5c726893911dc051b176e81f86420cb (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
---
- hosts: ele-ap
  connection: local
  roles:
    - role: openwrt/image
      delegate_to: localhost
  post_tasks:
    - name: copy image to target
      command: "scp '{{ openwrt_output_images[0] }}' '{{ inventory_hostname }}:/tmp/ansible-upgrade.img'"

    - name: run sysupgrade
      command: "ssh '{{ inventory_hostname }}' sysupgrade -n '/tmp/ansible-upgrade.img'"
      ignore_errors: true
      failed_when: false
      register: sysupgrade_result

    - debug:
        var: sysupgrade_result.stdout