ML
    • Recent
    • Categories
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    Using Ansible to Manage install and update Apple OSX DHCP clients

    IT Discussion
    osx ansible homebrew apple automation
    5
    100
    7.9k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • stacksofplatesS
      stacksofplates
      last edited by

      Plus your tree doesn't have the inventory directory which the ansible.cfg file is looking for.

      DustinB3403D 1 Reply Last reply Reply Quote 0
      • DustinB3403D
        DustinB3403 @stacksofplates
        last edited by

        @stacksofplates said in Using Ansible to Manage install and update Apple OSX DHCP clients:

        Plus your tree doesn't have the inventory directory which the ansible.cfg file is looking for.

        pwd
        /home/ansi/playbook-skeleton
        # tree
        .
        ├── ansible.cfg
        ├── group_vars
        │   └── README
        ├── inventory
        │   ├── apple_workstations
        │   └── dev
        ├── library
        │   └── README
        ├── Makefile
        └── roles
        	└── requirements.yml
        
        4 directories, 7 files
        
        1 Reply Last reply Reply Quote 0
        • DustinB3403D
          DustinB3403
          last edited by

          Hopefully that's better?

          stacksofplatesS 1 Reply Last reply Reply Quote 0
          • stacksofplatesS
            stacksofplates @DustinB3403
            last edited by

            @DustinB3403 said in Using Ansible to Manage install and update Apple OSX DHCP clients:

            Hopefully that's better?

            Yeah. I mean I'm not trying to make you do it certain way, but if you want to use that skeleton, it's looking for things in a certain directory unless you modify it.

            1 Reply Last reply Reply Quote 0
            • stacksofplatesS
              stacksofplates
              last edited by

              So I'd put your playbook in /etc/ansi/playbook-skeleton and then you can run make roles to install the role (after you add it to the requirements.yml of course).

              DustinB3403D 1 Reply Last reply Reply Quote 0
              • DustinB3403D
                DustinB3403 @stacksofplates
                last edited by

                @stacksofplates said in Using Ansible to Manage install and update Apple OSX DHCP clients:

                So I'd put your playbook in /etc/ansi/playbook-skeleton and then you can run make roles to install the role (after you add it to the requirements.yml of course).

                okay so everything is in

                /home/ansi/playbook-skeleton

                With that, I need to make a playbook to do brew stuff, right?

                Any pointers on where to go?

                stacksofplatesS 1 Reply Last reply Reply Quote 0
                • stacksofplatesS
                  stacksofplates @DustinB3403
                  last edited by

                  @DustinB3403 said in Using Ansible to Manage install and update Apple OSX DHCP clients:

                  @stacksofplates said in Using Ansible to Manage install and update Apple OSX DHCP clients:

                  So I'd put your playbook in /etc/ansi/playbook-skeleton and then you can run make roles to install the role (after you add it to the requirements.yml of course).

                  okay so everything is in

                  /home/ansi/playbook-skeleton

                  With that, I need to make a playbook to do brew stuff, right?

                  Any pointers on where to go?

                  What was in your apple.yml playbook?

                  DustinB3403D 1 Reply Last reply Reply Quote 0
                  • DustinB3403D
                    DustinB3403 @stacksofplates
                    last edited by

                    @stacksofplates Nothing now, I blew it all away.

                    stacksofplatesS 1 Reply Last reply Reply Quote 0
                    • stacksofplatesS
                      stacksofplates @DustinB3403
                      last edited by

                      @DustinB3403 said in Using Ansible to Manage install and update Apple OSX DHCP clients:

                      @stacksofplates Nothing now, I blew it all away.

                      Ok. So here https://docs.ansible.com/ansible/latest/user_guide/playbooks.html has pretty much everything you could want, but for a short start here's what I would do:

                      ---
                      - name: Set up Macs
                        hosts: apple_workstations
                        user: dustin
                        become: true
                      
                        tasks:
                          - include_role:
                              name: role-name
                      

                      That should be a good simple start. You can pass any variables to the role by doing this:

                      tasks:
                        - include_role:
                            name: role-name
                          vars: 
                            key: value
                      
                      1 Reply Last reply Reply Quote 2
                      • stacksofplatesS
                        stacksofplates
                        last edited by

                        This is a good starter video:

                        Youtube Video

                        1 Reply Last reply Reply Quote 1
                        • 1
                        • 2
                        • 3
                        • 4
                        • 5
                        • 5 / 5
                        • First post
                          Last post