Where does puppet pull the hostname info to name the certs in the ssl directory? Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern) The Ask Question Wizard is Live! Data science time! April 2019 and salary with experience Should we burninate the [wrap] tag?EC2 Ubuntu 11.10 Puppet Hostname name mistmatch errorIs it possible to duplicate an AWS EC2 instance without any downtime?Why do people use Puppet/Chef with Amazon Cloud Formation instead of just using CloudInit?puppet enterprise ssl cert errorHow do I set up cloud-init on custom AMIs in AWS? (CentOS)Puppet module install error - Directory /home/vagrant/.puppet/modules does not existhow to solve the certification issues in puppetpuppet only sees internal dns name instead of hostnamePuppet how is a certname determined?Preserve hostname in Ubuntu18 docker container

What is the longest distance a 13th-level monk can jump while attacking on the same turn?

Is above average number of years spent on PhD considered a red flag in future academia or industry positions?

How to assign captions for two tables in LaTeX?

Does surprise arrest existing movement?

How do I keep my slimes from escaping their pens?

How can whole tone melodies sound more interesting?

How widely used is the term Treppenwitz? Is it something that most Germans know?

How much radiation do nuclear physics experiments expose researchers to nowadays?

Is it possible to boil a liquid by just mixing many immiscible liquids together?

macOS-like app switching in Plasma 5

Gastric acid as a weapon

Sorting numerically

Is it true that "carbohydrates are of no use for the basal metabolic need"?

Is there a documented rationale why the House Ways and Means chairman can demand tax info?

What does '1 unit of lemon juice' mean in a grandma's drink recipe?

I am not a queen, who am I?

How to bypass password on Windows XP account?

Java 8 stream max() function argument type Comparator vs Comparable

Why is black pepper both grey and black?

How do I mention the quality of my school without bragging

What does the "x" in "x86" represent?

Bonus calculation: Am I making a mountain out of a molehill?

WAN encapsulation

Letter Boxed validator



Where does puppet pull the hostname info to name the certs in the ssl directory?



Announcing the arrival of Valued Associate #679: Cesar Manara
Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern)
The Ask Question Wizard is Live!
Data science time! April 2019 and salary with experience
Should we burninate the [wrap] tag?EC2 Ubuntu 11.10 Puppet Hostname name mistmatch errorIs it possible to duplicate an AWS EC2 instance without any downtime?Why do people use Puppet/Chef with Amazon Cloud Formation instead of just using CloudInit?puppet enterprise ssl cert errorHow do I set up cloud-init on custom AMIs in AWS? (CentOS)Puppet module install error - Directory /home/vagrant/.puppet/modules does not existhow to solve the certification issues in puppetpuppet only sees internal dns name instead of hostnamePuppet how is a certname determined?Preserve hostname in Ubuntu18 docker container



.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;








-1















When I spin up my AWS machine, the first thing I do is run hostnamectl set-hostname myhost.test.com but then when I install and run puppet, it is pulling standard-1-ami.test.com as the cert name. standard-1-ami is the name of my AMI.



Where is it getting this name from on the OS?










share|improve this question






















  • This instance hostname setting is happening how; a user_data argument in Terraform? A Puppet provisioner in Packer? Hostname setting on AWS can be finicky, and Puppet relies on the FQDN by default, but you can also configure it via the Puppet conf: puppet.com/docs/puppet/5.5/…

    – Matt Schuchard
    Mar 8 at 16:36











  • I say in the original post how I am setting the host name. I am not sure I understand what you are asking.

    – J. Tate
    Mar 8 at 17:06











  • My first guess would be that Puppet is using the hostname command to determine the hostname. Which result does that give?

    – John Bollinger
    Mar 8 at 18:21


















-1















When I spin up my AWS machine, the first thing I do is run hostnamectl set-hostname myhost.test.com but then when I install and run puppet, it is pulling standard-1-ami.test.com as the cert name. standard-1-ami is the name of my AMI.



Where is it getting this name from on the OS?










share|improve this question






















  • This instance hostname setting is happening how; a user_data argument in Terraform? A Puppet provisioner in Packer? Hostname setting on AWS can be finicky, and Puppet relies on the FQDN by default, but you can also configure it via the Puppet conf: puppet.com/docs/puppet/5.5/…

    – Matt Schuchard
    Mar 8 at 16:36











  • I say in the original post how I am setting the host name. I am not sure I understand what you are asking.

    – J. Tate
    Mar 8 at 17:06











  • My first guess would be that Puppet is using the hostname command to determine the hostname. Which result does that give?

    – John Bollinger
    Mar 8 at 18:21














-1












-1








-1








When I spin up my AWS machine, the first thing I do is run hostnamectl set-hostname myhost.test.com but then when I install and run puppet, it is pulling standard-1-ami.test.com as the cert name. standard-1-ami is the name of my AMI.



Where is it getting this name from on the OS?










share|improve this question














When I spin up my AWS machine, the first thing I do is run hostnamectl set-hostname myhost.test.com but then when I install and run puppet, it is pulling standard-1-ami.test.com as the cert name. standard-1-ami is the name of my AMI.



Where is it getting this name from on the OS?







amazon-web-services puppet hostname ami






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Mar 8 at 16:08









J. TateJ. Tate

1238




1238












  • This instance hostname setting is happening how; a user_data argument in Terraform? A Puppet provisioner in Packer? Hostname setting on AWS can be finicky, and Puppet relies on the FQDN by default, but you can also configure it via the Puppet conf: puppet.com/docs/puppet/5.5/…

    – Matt Schuchard
    Mar 8 at 16:36











  • I say in the original post how I am setting the host name. I am not sure I understand what you are asking.

    – J. Tate
    Mar 8 at 17:06











  • My first guess would be that Puppet is using the hostname command to determine the hostname. Which result does that give?

    – John Bollinger
    Mar 8 at 18:21


















  • This instance hostname setting is happening how; a user_data argument in Terraform? A Puppet provisioner in Packer? Hostname setting on AWS can be finicky, and Puppet relies on the FQDN by default, but you can also configure it via the Puppet conf: puppet.com/docs/puppet/5.5/…

    – Matt Schuchard
    Mar 8 at 16:36











  • I say in the original post how I am setting the host name. I am not sure I understand what you are asking.

    – J. Tate
    Mar 8 at 17:06











  • My first guess would be that Puppet is using the hostname command to determine the hostname. Which result does that give?

    – John Bollinger
    Mar 8 at 18:21

















This instance hostname setting is happening how; a user_data argument in Terraform? A Puppet provisioner in Packer? Hostname setting on AWS can be finicky, and Puppet relies on the FQDN by default, but you can also configure it via the Puppet conf: puppet.com/docs/puppet/5.5/…

– Matt Schuchard
Mar 8 at 16:36





This instance hostname setting is happening how; a user_data argument in Terraform? A Puppet provisioner in Packer? Hostname setting on AWS can be finicky, and Puppet relies on the FQDN by default, but you can also configure it via the Puppet conf: puppet.com/docs/puppet/5.5/…

– Matt Schuchard
Mar 8 at 16:36













I say in the original post how I am setting the host name. I am not sure I understand what you are asking.

– J. Tate
Mar 8 at 17:06





I say in the original post how I am setting the host name. I am not sure I understand what you are asking.

– J. Tate
Mar 8 at 17:06













My first guess would be that Puppet is using the hostname command to determine the hostname. Which result does that give?

– John Bollinger
Mar 8 at 18:21






My first guess would be that Puppet is using the hostname command to determine the hostname. Which result does that give?

– John Bollinger
Mar 8 at 18:21













1 Answer
1






active

oldest

votes


















0














I have this issue as well. Every time I make a new machine, without setting the hostname in a userdata script, I have this issue. I have noticed that the initial hostname is cached somewhere in memory.


Here's how I fix it:

Hostname: new_host ; IP: 192.168.10.50 ; DomainName: inside.myhouse.com

hostnamectl set-hostname new_host
echo "192.168.10.50 new_host.inside.myhouse.com new_host" >> /etc/hosts
echo "new_host" > /etc/hostname
service network restart

These 3 places are where the hostname "lives" or "can be retrieved.

To validate my configs, I run these 3 commands:
$ hostname
new_host
$ hostname -f
new_host.inside.myhouse.com
hostname -i
192.168.10.50


Note that, if your prompt is set to have your hostname displayed, your prompt may not change until you log back in. If the hostname & hostname -f commands work, you can run puppet and it should use the correct hostname.


BTW: I use Red Hat. YMMV.






share|improve this answer























    Your Answer






    StackExchange.ifUsing("editor", function ()
    StackExchange.using("externalEditor", function ()
    StackExchange.using("snippets", function ()
    StackExchange.snippets.init();
    );
    );
    , "code-snippets");

    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "1"
    ;
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function()
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled)
    StackExchange.using("snippets", function()
    createEditor();
    );

    else
    createEditor();

    );

    function createEditor()
    StackExchange.prepareEditor(
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader:
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    ,
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    );



    );













    draft saved

    draft discarded


















    StackExchange.ready(
    function ()
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55066929%2fwhere-does-puppet-pull-the-hostname-info-to-name-the-certs-in-the-ssl-directory%23new-answer', 'question_page');

    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    0














    I have this issue as well. Every time I make a new machine, without setting the hostname in a userdata script, I have this issue. I have noticed that the initial hostname is cached somewhere in memory.


    Here's how I fix it:

    Hostname: new_host ; IP: 192.168.10.50 ; DomainName: inside.myhouse.com

    hostnamectl set-hostname new_host
    echo "192.168.10.50 new_host.inside.myhouse.com new_host" >> /etc/hosts
    echo "new_host" > /etc/hostname
    service network restart

    These 3 places are where the hostname "lives" or "can be retrieved.

    To validate my configs, I run these 3 commands:
    $ hostname
    new_host
    $ hostname -f
    new_host.inside.myhouse.com
    hostname -i
    192.168.10.50


    Note that, if your prompt is set to have your hostname displayed, your prompt may not change until you log back in. If the hostname & hostname -f commands work, you can run puppet and it should use the correct hostname.


    BTW: I use Red Hat. YMMV.






    share|improve this answer



























      0














      I have this issue as well. Every time I make a new machine, without setting the hostname in a userdata script, I have this issue. I have noticed that the initial hostname is cached somewhere in memory.


      Here's how I fix it:

      Hostname: new_host ; IP: 192.168.10.50 ; DomainName: inside.myhouse.com

      hostnamectl set-hostname new_host
      echo "192.168.10.50 new_host.inside.myhouse.com new_host" >> /etc/hosts
      echo "new_host" > /etc/hostname
      service network restart

      These 3 places are where the hostname "lives" or "can be retrieved.

      To validate my configs, I run these 3 commands:
      $ hostname
      new_host
      $ hostname -f
      new_host.inside.myhouse.com
      hostname -i
      192.168.10.50


      Note that, if your prompt is set to have your hostname displayed, your prompt may not change until you log back in. If the hostname & hostname -f commands work, you can run puppet and it should use the correct hostname.


      BTW: I use Red Hat. YMMV.






      share|improve this answer

























        0












        0








        0







        I have this issue as well. Every time I make a new machine, without setting the hostname in a userdata script, I have this issue. I have noticed that the initial hostname is cached somewhere in memory.


        Here's how I fix it:

        Hostname: new_host ; IP: 192.168.10.50 ; DomainName: inside.myhouse.com

        hostnamectl set-hostname new_host
        echo "192.168.10.50 new_host.inside.myhouse.com new_host" >> /etc/hosts
        echo "new_host" > /etc/hostname
        service network restart

        These 3 places are where the hostname "lives" or "can be retrieved.

        To validate my configs, I run these 3 commands:
        $ hostname
        new_host
        $ hostname -f
        new_host.inside.myhouse.com
        hostname -i
        192.168.10.50


        Note that, if your prompt is set to have your hostname displayed, your prompt may not change until you log back in. If the hostname & hostname -f commands work, you can run puppet and it should use the correct hostname.


        BTW: I use Red Hat. YMMV.






        share|improve this answer













        I have this issue as well. Every time I make a new machine, without setting the hostname in a userdata script, I have this issue. I have noticed that the initial hostname is cached somewhere in memory.


        Here's how I fix it:

        Hostname: new_host ; IP: 192.168.10.50 ; DomainName: inside.myhouse.com

        hostnamectl set-hostname new_host
        echo "192.168.10.50 new_host.inside.myhouse.com new_host" >> /etc/hosts
        echo "new_host" > /etc/hostname
        service network restart

        These 3 places are where the hostname "lives" or "can be retrieved.

        To validate my configs, I run these 3 commands:
        $ hostname
        new_host
        $ hostname -f
        new_host.inside.myhouse.com
        hostname -i
        192.168.10.50


        Note that, if your prompt is set to have your hostname displayed, your prompt may not change until you log back in. If the hostname & hostname -f commands work, you can run puppet and it should use the correct hostname.


        BTW: I use Red Hat. YMMV.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Mar 22 at 0:48









        Scottie HScottie H

        265




        265





























            draft saved

            draft discarded
















































            Thanks for contributing an answer to Stack Overflow!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid


            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.

            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55066929%2fwhere-does-puppet-pull-the-hostname-info-to-name-the-certs-in-the-ssl-directory%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            AWS Lex not identifying response if by a variable The 2019 Stack Overflow Developer Survey Results Are In Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern) The Ask Question Wizard is Live! Data science time! April 2019 and salary with experienceEnforcing custom enumeration in AWS LEX for slot valuesHow to give response based on user response in Amazon Lex?Intercepting AWS Lambda Response to a AWS Lex QueryLex chat bot error: Reached second execution of fulfillment lambda on the same utteranceamazon lex showing invalid responseLambda response send back to Lex slot?Response card in Amazon lexAmazon Lex - Lambda response return HTML to botHow can I solve 424 (Failed Dependency) (python) obtained from Amazon lex?

            Алба-Юлія

            Захаров Федір Захарович