Coder Social home page Coder Social logo

ansible-role-bootstrap_python_on_openwrt's Introduction

Ansible Lint

bootstrap_python_on_OpenWRT

Install python3 and other packages needed for managing OpenWRT via ansible

Requirements

  1. You need an OpenWRT device that you want to manage.
  2. The device needs to have at least the gateway and DNS server set, so it has basic connectivity and can install packages.
  3. You need to have SSH connectivity to the device. This can be the dropbear instance running by default and (by default) allowing root logins, even though the root user does not yet have a password.

Note for myself: For an example VM with only one single NIC put something like this in /etc/config/network:

config interface 'lan'
        option device 'br-lan'
        option proto 'static'
        option ipaddr '192.168.1.20'
        option netmask '255.255.255.0'
        option ip6assign '60'
        option gateway '192.168.1.1'
        list dns '192.168.1.1'

Role Variables

None.

Dependencies

None

Example Playbook

The example playbook disabling gathering of facts, which would fail as no python is installed yet. It disables become aka sudo or su, and hardcodes the root user.

- hosts: servers
  gather_facts: 'false'
  become: 'false'
  vars:
    ansible_user: 'root'
  roles:
    - role: 'johanneskastl.bootstrap_python_on_OpenWRT'

You can test whether ansible is fully working by pinging the host:

ansible -m ping openwrt -e ansible_user=root
[WARNING]: sftp transfer mechanism failed on [openwrt]. Use ANSIBLE_DEBUG=1 to see detailed information
openwrt | SUCCESS => {
    "changed": false,
    "ping": "pong"
}

License

BSD-3-Clause

Author Information

I am Johannes Kastl, reachable via [email protected].

ansible-role-bootstrap_python_on_openwrt's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

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.