Code Monkey home page Code Monkey logo

ansible-openwisp2-imagegenerator's People

Contributors

codesankalp avatar edgeking810 avatar mikysal78 avatar nemesifier avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ansible-openwisp2-imagegenerator's Issues

[bug] Upload fails if CONFIG_VERSION_DIST is not set

the output is:

13:15:05 TASK [openwisp.openwisp2-imagegenerator : ./build-images.sh] *******************
13:15:05 Sunday 09 May 2021  13:15:05 +0200 (0:00:00.692)       0:01:05.277 ************ 
13:18:21 changed: [jenkins.basilicata.nnxx]
13:18:21 
13:18:21 TASK [openwisp.openwisp2-imagegenerator : Prepare upload script] ***************
13:18:21 Sunday 09 May 2021  13:18:21 +0200 (0:03:15.321)       0:04:20.599 ************ 
13:18:21 changed: [jenkins.basilicata.nnxx]
13:18:21 
13:18:21 TASK [openwisp.openwisp2-imagegenerator : ./upload_firmware.py] ****************
13:18:21 Sunday 09 May 2021  13:18:21 +0200 (0:00:00.300)       0:04:20.899 ************ 
13:18:21 fatal: [jenkins.basilicata.nnxx]: FAILED! => changed=true 
13:18:21   cmd:
13:18:21   - ./upload_firmware.py
13:18:21   delta: '0:00:00.145079'
13:18:21   end: '2021-05-09 13:18:21.725762'
13:18:21   msg: non-zero return code
13:18:21   rc: 1
13:18:21   start: '2021-05-09 13:18:21.580683'
13:18:21   stderr: |-
13:18:21     Traceback (most recent call last):
13:18:21       File "./upload_firmware.py", line 46, in <module>
13:18:21         VERSION_DIST = find_config_line('CONFIG_VERSION_DIST')
13:18:21       File "./upload_firmware.py", line 37, in find_config_line
13:18:21         raise ValueError(f'{config_name} not found')
13:18:21     ValueError: CONFIG_VERSION_DIST not found
13:18:21   stderr_lines: <omitted>
13:18:21   stdout: ''
13:18:21   stdout_lines: <omitted>
13:18:21 
13:18:21 PLAY RECAP *********************************************************************
13:18:21 jenkins.basilicata.nnxx    : ok=26   changed=19   unreachable=0    failed=1    skipped=9    rescued=0    ignored=0   

on my playbook i have add this code:

    openwisp2fw_uploader:
        enabled: true
        url: "{{ openwisp2fw_controller_url }}"
        token: "xXxXx"
        category_map:
            - organization_name: basilicata
            - category_id:
                 - 9c6c1580-0d89-4a33-b8d9-7c306a482369
                 - 19e26a37-bece-43ad-8d5b-c5d31a9e7647
                 - 20c02269-69ef-463f-bf8f-21fee7b83539
            - flavour:
                 - base
                 - opennds
                 - chilli
        image_types:
            - mvebu-cortexa9-linksys_wrt3200acm-squashfs-sysupgrade.bin

Add empty crontab file

An empty crontab file will allow crond to start at boot and be reloaded in case OpenWISP supplies any update to the crontab.

[Feature] Please support OpenWrt 21.02

Hi,

please support OpenWrt 21.02.
I installed the ansible role and changed the variable to:
openwisp2fw_source_version: openwrt-21.02
Compilation seems to fail to due this change.
Can you please support the most recent version of Openwrt.

Error with theme and mod

Default main.yml L117 and L118.
I have this in the browser:

/usr/lib/lua/luci/template.lua:97: Failed to execute template 'sysauth'.
A runtime error occurred: /usr/lib/lua/luci/template.lua:97: Failed to execute template 'header'.
A runtime error occurred: /usr/lib/lua/luci/template.lua:97: Failed to execute template 'themes/openwisp/header'.
A runtime error occurred: [string "/usr/lib/lua/luci/view/themes/openwisp/head..."]:20: attempt to call field 'node_childs' (a nil value)
stack traceback:
	[string "/usr/lib/lua/luci/view/themes/openwisp/head..."]:20: in main chunk
stack traceback:
	[C]: in function 'error'
	/usr/lib/lua/luci/template.lua:97: in function 'render'
	/usr/lib/lua/luci/dispatcher.lua:755: in function 'include'
	[string "/usr/lib/lua/luci/view/header.htm"]:3: in main chunk
stack traceback:
	[C]: in function 'error'
	/usr/lib/lua/luci/template.lua:97: in function 'render'
	/usr/lib/lua/luci/dispatcher.lua:755: in function 'include'
	[string "/usr/lib/lua/luci/view/sysauth.htm"]:1: in main chunk
stack traceback:
	[C]: in function 'error'
	/usr/lib/lua/luci/template.lua:97: in function </usr/lib/lua/luci/template.lua:85>
	(tail call): ?
	(tail call): ?
	/usr/lib/lua/luci/dispatcher.lua:984: in function 'dispatch'
	/usr/lib/lua/luci/dispatcher.lua:478: in function </usr/lib/lua/luci/dispatcher.lua:477>

build-images.sh seems incomplete

Hello,
I'm new to the project and following the readme in order to build an image with openwisp-config baked in. The task ./build-images.sh fails, and examining the contents of the file I suspect it may be incomplete. Also, examining the file with nano reveals green highlighting where I suspect dynamically generated content should be.

screen shot 2018-07-07 at 3 14 24 pm

Add support for subtargets

At the moment it is not possible to specify which subtargets and profiles must be compiled for each architecture, the role will use the default subtargets and profiles for each arch.

If one needs to add support for a different subtarget than the default one, he/she will need to do this by hand which is highly undesirable, considering the goal of this project.

[docs] OpenWRT version in README is outdated

states 18.06 which is dated, can it do 21.02 ??

This playbook will let you compile firmware images for an organization named snakeoil using only the standard flavour (which includes a default OpenWRT 18.06 image with the standard OpenWISP2 modules) for two architectures, ar71xx and x86.

[ansible-imagegenerator] Integrate with openwisp-firmware-upgrader

This aims at integrating this role with openwisp-firmware-upgrader, the goal is to upload firmware images to OpenWISP once they're compiled.

This feature shall be optional and must be documented in the README to guide the user in using it successfully.

Requirements:

  • have an OpenWISP instance with the firmware upgrader module enabled (can be the dev env of openwisp-firmware-upgrader)
  • create a user in an , the user shall have view and add permissions on Firmware Images, Builds and Category

In the YAML, we should now add a variable that if configured signals that this feature is enabled, eg:

openwisp2fw_upload_api:
  user: <username>
  password: <password> # if this is supplied, it will be used to get the token and token is not required
  token: <token>  # if this is supplied, password is not required and the obtain authentication step will not be performed
  url: URL of the openwisp instance
  images:
      # list of files that will be uploaded, becasue we don't want to upload
      # all the images produced, since that is unnecessary in most cases
      # if this list is empty, abort with a warning, but do not cause the failure of the playbook
      - ar71xx-generic-xd3200-squashfs-sysupgrade.bin
      - ramips-mt76x8-gl-mt300n-v2-squashfs-sysupgrade.bin

The following steps should be performed when a compilation has completed and only if this feature is enabled:

  • for each organization listed in openwisp2fw_organizations
    • for each flavour used
      • get or create related category
      • create a new build for this org and category
      • upload the images listed in openwisp2fw_upload_api.images (if one of the images listed is not present on the filesystem, skip and ensure an info message is shown in the console)

[docs] Update galaxy badges

Ansible Galaxy has changed their internal URLs and badges which links to the ansible galaxy website and show the download count are not working as expected.

Styling problems

Hey guys,
Just a couple of styling/best practices issues.
normally you want to use apt only if the platform is ubuntu and or debian so i would recommend to put a when condition for that.

as in when ansible_distribution==Debian or ansible_distribution==Ubuntu

Besides that you normally do not specify become_method and become_user on each task, is normally done in the generic playbook.

Normally you do not want to enforce to use sudo in case the user is running in a fakeroot environment or similia.

Just my two cents. Don't really have time to send you a pull requests ATM.

Avoid installation of luci-openwisp

Hello, is there a way to avoid the installation of luci-openwisp? Can you provide a complete example of the playbook.yml file to do this? I need to install the complete luci web interface because I'd like to accomplish some task through the web interface
Thank you

[question] firmware-upgrader

Your esample:

  vars:
    openwisp2fw_controller_url: "https://openwisp.myproject.com"
    openwisp2fw_organizations:
      - name: prod
        flavours:
          - default
        openwisp:
          url: "{{ openwisp2fw_controller_url }}"
          shared_secret: "xxxxx"
        root_password: "xxxxx"
        categories:
          default: <CATEGORY-UUID>
    openwisp2fw_uploader:
        enabled: true
        url: "{{ openwisp2fw_controller_url }}"
        token: "<REST-API-USER-TOKEN>"
        image_types:
            - ath79-generic-ubnt_airrouter-squashfs-sysupgrade.bin
            - ar71xx-generic-ubnt-bullet-m-xw-squashfs-sysupgrade.bin
            - ar71xx-generic-ubnt-bullet-m-squashfs-sysupgrade.bin

if by hypothesis i have any flavours and categories.
For flavours the build is in the folder "name_organizations/flavours_1, 2, 3
how it works with categories A, B and C?
an image has all categories?
Thanks

Make password management easier

The current way to add passwords to the playbook files is cumbersome: one has to generate the password by hand on a router and then copy part of the /etc/shadow file in the YAML file.

It is not hard to let users define their passwords and salts in clear text in the YAML and then let the role take care of turning those clear text passwords in correctly hashed strings.

import crypt;
print(crypt.crypt('password', '$1$openwisp$'))

Will return $1$openwisp$iQpdG2IrO4lya98cODuUB/, which is the password example now present in the README for luci_openwisp.

Update: asked for a suggestion on stackoverflow, see "Generate ansible role variable locally".

DEPRECATION WARNING

evaluating recompile as a bare variable, this behaviour will go away and you might need to add |bool to the expression in the future.
Also see CONDITIONAL_BARE_VARS configuration toggle.. This feature will be removed in version 2.12. Deprecation warnings can be disabled by setting

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.