FAQ
Hello fellow salt-users,

I am just migrating from a set of old bash scripts to salt-cloud, and after
facing some difficulties[1], I got it running.

I successfully set up a VM to test stuff with, but I would like to set the
hostname and right after run state.highstate on the VM(s).

But before I start adding another bootstrap script that warps around
salt-bootstrap I would like to hear your opinions has this seems to me, that
this should be a built-in feature.

[1] https://github.com/saltstack/salt/issues/22749

Regards,

--
Alfredo Palhares
GPG/PGP Key Fingerprint
68FC B06A 6C22 8B9B F110
38D6 E8F7 4D1F 0763 CAAD

--
You received this message because you are subscribed to the Google Groups "Salt-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to salt-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Search Discussions

  • C. R. Oldham at May 8, 2015 at 2:51 pm
    Just do a file.managed on /etc/hostname. It's so short you can even
    include the content in the state itself--see the 'contents' kwarg in the
    docs for file.managed. If you also want to update the hostname in
    /etc/hosts, see salt.states.host (
    http://docs.saltstack.com/en/latest/ref/states/all/salt.states.host.html).


    On Fri, May 8, 2015 at 8:04 AM, Alfredo Palhares wrote:

    Hello fellow salt-users,

    I am just migrating from a set of old bash scripts to salt-cloud, and after
    facing some difficulties[1], I got it running.

    I successfully set up a VM to test stuff with, but I would like to set the
    hostname and right after run state.highstate on the VM(s).

    But before I start adding another bootstrap script that warps around
    salt-bootstrap I would like to hear your opinions has this seems to me,
    that
    this should be a built-in feature.

    [1] https://github.com/saltstack/salt/issues/22749

    Regards,

    --
    Alfredo Palhares
    GPG/PGP Key Fingerprint
    68FC B06A 6C22 8B9B F110
    38D6 E8F7 4D1F 0763 CAAD

    --
    You received this message because you are subscribed to the Google Groups
    "Salt-users" group.
    To unsubscribe from this group and stop receiving emails from it, send an
    email to salt-users+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.


    --
    *--cro*
    C. R. Oldham, Platform Engineer, SaltStack
    cr@saltstack.com / 801-564-4673

    --
    You received this message because you are subscribed to the Google Groups "Salt-users" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to salt-users+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.
  • Alfredo Palhares at May 8, 2015 at 3:29 pm
    Hello Oldham,

    Excerpts from C. R. Oldham's message of 2015-05-08 08:51:19 -0600:
    Just do a file.managed on /etc/hostname. It's so short you can even
    include the content in the state itself--see the 'contents' kwarg in the
    docs for file.managed. If you also want to update the hostname in
    /etc/hosts, see salt.states.host (
    http://docs.saltstack.com/en/latest/ref/states/all/salt.states.host.html).
    Hmm, but how can I do this in a way that it takes the salt-cloud hostaname
    parameter ?


    --
    Alfredo Palhares
    GPG/PGP Key Fingerprint
    68FC B06A 6C22 8B9B F110
    38D6 E8F7 4D1F 0763 CAAD

    --
    You received this message because you are subscribed to the Google Groups "Salt-users" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to salt-users+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.
  • C. R. Oldham at May 8, 2015 at 4:02 pm
    That will be the minion id, so you can get at it through grains.
    On Fri, May 8, 2015 at 9:29 AM, Alfredo Palhares wrote:

    Hello Oldham,

    Excerpts from C. R. Oldham's message of 2015-05-08 08:51:19 -0600:
    Just do a file.managed on /etc/hostname. It's so short you can even
    include the content in the state itself--see the 'contents' kwarg in the
    docs for file.managed. If you also want to update the hostname in
    /etc/hosts, see salt.states.host (
    http://docs.saltstack.com/en/latest/ref/states/all/salt.states.host.html
    ).

    Hmm, but how can I do this in a way that it takes the salt-cloud hostaname
    parameter ?


    --
    Alfredo Palhares
    GPG/PGP Key Fingerprint
    68FC B06A 6C22 8B9B F110
    38D6 E8F7 4D1F 0763 CAAD

    --
    You received this message because you are subscribed to the Google Groups
    "Salt-users" group.
    To unsubscribe from this group and stop receiving emails from it, send an
    email to salt-users+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.


    --
    *--cro*
    C. R. Oldham, Platform Engineer, SaltStack
    cr@saltstack.com / 801-564-4673

    --
    You received this message because you are subscribed to the Google Groups "Salt-users" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to salt-users+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupsalt-users @
postedMay 8, '15 at 2:04p
activeMay 8, '15 at 4:02p
posts4
users2

2 users in discussion

Alfredo Palhares: 2 posts C. R. Oldham: 2 posts

People

Translate

site design / logo © 2022 Grokbase