GithubHelp home page GithubHelp logo

macos_installer's Introduction

macos_installer

This role is under construction. The goal is to allow an Ansible user to automate:

  • Installing .dmg files
  • Removing the downloaded .dmg files after installation.

Notes

  • Assumes your dmgs are downloaded to {{ dmg_path }} and the following attributes are set:
    • app_name (required) - used internally (string).
    • dmg_path (required) - full path to the dmg being installed (string).
    • state (required) - present to install, absent will not install (string).
      • removing an app by specifying state: absent is still in testing.
      • This would require the installed_name attribute to be set (string).
    • force (optional) will attempt to reinstall even if app is already present (boolean, True/False).

Example Usage

config.yml

dmg_path: "/path/to/download/dmgs"

dmgs:
  - {
      name: "Test",
      url: "https://example.com/path/to/app",
      force: False,
      installed_name: "no_path",
      state: "present"
    }
  - {
      name: "Test2"
      url: "https://example2.com/path/to/app",
      force: False,
      installed_name: "no_path",
      state: "present"
    }

playbook.yml

- hosts: all
  
  vars_files:
    - config.yml
  
  pre_tasks:
    - name: Download .dmgs
      get_url:
        url: "{{ item.url }}"
        dest: "{{ dmg_path }}/{{ item.name }}.dmg"
      with_items: "{{ dmgs }}"
      
  roles:
    - role: pipersniper.macos_installer

Current Limitations

  • If there is a single .app bundle in an attached .dmg, it will be installed.
  • If there is more than one .app bundle in an attached .dmg:
    • The program will search for 'Install.app'; enter that bundle, and search for a .pkg. If there is one .pkg, it will be installed.
    • If there is no 'Install.app', the role will do nothing. I'm just implementing this; once I get more .dmg files with different cases that fit here, I will update the role.
  • The role will do nothing in all other cases.

macos_installer's People

Contributors

pipersniper avatar

Watchers

 avatar

Forkers

mason-splunk

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.