Inedo Community Forums Forums
    • Recent
    • Tags
    • Popular
    • Login

    Welcome to the Inedo Forums! Check out the Forums Guide for help getting started.

    If you are experiencing any issues with the forum software, please visit the Contact Form on our website and let us know!

    Variable scopes

    Scheduled Pinned Locked Moved Support
    ottervariables
    4 Posts 1 Posters 1 Views
    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.
    • ? This user is from outside of this forum
      Guest
      last edited by

      I am currently trying to create a "Web Server" role for Otter.

      My first step was to create a Sequence variable, @WebServerFeatures and then try to loop that collection and use PSEnsure to install the missing windows features.

      However, I am having some issues with this.

      Otter keeps telling me that @WebServerFeatures are not installed, however if I try and move the variable to the server it self, it works just fine.

      TL;DR; I am unable to use a variable on the Role, but it works just fine if its declared on the Server.

      Couple of screenshots.

      <img src="https://nsfpzw-bn1305.files.1drv.com/y3mwzOyhIcjbCexwBWJ8rP8-83YR7XyXoOIR2otIdbzP0fDX_Mq_sciF9zOHjjWfBJMqCXCvPjNQOCX1Lu2FOw6gl0MZz1JKucvjlm41nBeXuICoJ_vmNmR6660ACaFPxZ0uNIhwwgCeTpCf4Ov9V7VMBnVpcP-lTHMvuzQk096ypY/2016-05-23_16-27-55.png?psid=1" />

      <img src="https://jb5mag-bn1305.files.1drv.com/y3m_8yFsXqnCl1B0J7g5i-mZHCZjMKP3fN6qeR34cx8ElkzaY-cOUrbTXplBmFTA_oQ2aat7fKfUu5LKAgqC8K5wYrYpK_v1TFoGWG_2YzNMzbHr54VdFYXCjRuEzw1SGBXjf7ScjebdxViFk5NyokLdeCQPPg8AOnUkf5wVJrp0jE/2016-05-23_16-28-21.png?psid=1" />

      1 Reply Last reply Reply Quote 0
      • ? This user is from outside of this forum
        Guest
        last edited by

        You're definitely on the right track... but unfortunately this is a bug :(

        It will be fixed in Otter 1.1.2, which will ship pretty soon (along with Linux, Git, etc) support :)

        1 Reply Last reply Reply Quote 0
        • ? This user is from outside of this forum
          Guest
          last edited by

          Is there a workaround? Its making Otter pretty useless....

          1 Reply Last reply Reply Quote 0
          • ? This user is from outside of this forum
            Guest
            last edited by

            The easiest workaround is to declare the variable at the top of your plan.

            set @WebServerFeatures = @(...)
            

            Otherwise we will get this shipped by end of day!

            1 Reply Last reply Reply Quote 0

            Hello! It looks like you're interested in this conversation, but you don't have an account yet.

            Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

            With your input, this post could be even better 💗

            Register Login
            • 1 / 1
            • First post
              Last post
            Inedo Website Home • Support Home • Code of Conduct • Forums Guide • Documentation