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

    SaltStack setup for /etc/hosts

    IT Discussion
    fedora 28 linux windows hosts file
    3
    7
    814
    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.
    • FATeknollogeeF
      FATeknollogee
      last edited by

      I remember this has been discussed on the forums sometime back when...

      I'd like to have a master host file & push this out to Linux & Windows servers & desktops.

      Anyone have a good how to guide?

      ObsolesceO 1 Reply Last reply Reply Quote 1
      • black3dynamiteB
        black3dynamite
        last edited by

        https://docs.saltstack.com/en/latest/ref/cli/salt-cp.html

        1 Reply Last reply Reply Quote 0
        • black3dynamiteB
          black3dynamite
          last edited by

          0_1534867397408_bd4d0389-fa52-4b3b-bbfe-08960b10a1a9-image.png

          1 Reply Last reply Reply Quote 0
          • ObsolesceO
            Obsolesce
            last edited by Obsolesce

            I can't believe this is almost a year old already... it should still be okay though:

            https://timothygruber.com/linux/saltstack-installation-configuration/

            If you hit any snags let me know and I'll update it.

            Edit: Do you already have SaltStack up and running? If so ignore the guide, and I'll help you set up a State file.

            FATeknollogeeF 1 Reply Last reply Reply Quote 1
            • FATeknollogeeF
              FATeknollogee @Obsolesce
              last edited by

              @obsolesce said in SaltStack setup for /etc/hosts:

              I can't believe this is almost a year old already... it should still be okay though:

              https://timothygruber.com/linux/saltstack-installation-configuration/

              If you hit any snags let me know and I'll update it.

              Edit: Do you already have SaltStack up and running? If so ignore the guide, and I'll help you set up a State file.

              No man, got nothing running, starting from scratch!!

              ObsolesceO 1 Reply Last reply Reply Quote 0
              • ObsolesceO
                Obsolesce @FATeknollogee
                last edited by

                @fateknollogee said in SaltStack setup for /etc/hosts:

                @obsolesce said in SaltStack setup for /etc/hosts:

                I can't believe this is almost a year old already... it should still be okay though:

                https://timothygruber.com/linux/saltstack-installation-configuration/

                If you hit any snags let me know and I'll update it.

                Edit: Do you already have SaltStack up and running? If so ignore the guide, and I'll help you set up a State file.

                No man, got nothing running, starting from scratch!!

                Okay. Well let me know when you have the master up and running, and a minion going. Part2 of my guide has State creation and such but isn't finished yet.

                1 Reply Last reply Reply Quote 0
                • ObsolesceO
                  Obsolesce @FATeknollogee
                  last edited by Obsolesce

                  @fateknollogee said in SaltStack setup for /etc/hosts:

                  I remember this has been discussed on the forums sometime back when...

                  I'd like to have a master host file & push this out to Linux & Windows servers & desktops.

                  Anyone have a good how to guide?

                  One more thing, you'll want to use file.managed in a State file.

                  That way, you keep a master copy on Git and only need to edit that. Saltstack will take care of the rest and make sure all minions have that updated file.

                  Otherwise, with salt-cp, you have to manually SSH to the salt-master server and run the command. I'd rather just update the file in VSCode, then be done with it...

                  In your State file, you can do Linux and Windows using an If statement, having it do it one way for each OS.

                  I use grains, os_family, etc.

                  1 Reply Last reply Reply Quote 1
                  • 1 / 1
                  • First post
                    Last post