Search code examples
mercurialyamlbitbucketsalt-project

Can saltstack update it self then highstate?


Salt stack is being used with bit bucket. There are 2-3 of us who push updates to it occasionaly. I was wondering is there a way where salt stack can get the latest changes from bit bucket then highstate? If so, how would you go about doing it?


Solution

  • What you are looking for is the hgfs backend. whenever a state.highstate is called, the master will pull from bitbucket and send it to the minion. A basic configuration would be the following:

    fileserver_backend:
      - hg
    
    hgfs_remotes:
      - https://self@bitbucket.org/self/salt
    
    hgfs_branch_method: branches
    

    There is unfortuntaley a lack of documentation about how to configure hgfs so doing anything more advance may require you to dig around. Good luck.

    Note for future readers: I am not sure whether the minion or the master pulls from bitbucket.