Il giorno lunedì 9 giugno 2014 16:46:46 UTC+2, Michael DeHaan ha scritto: > > "I've tried using the commit hash as argument for version, but it doesn't > work: it has the same effect of version=master." > > By same effect you mean it does the pull every time, rather than it checks > out master, I'd assume? :) > > I'd like to see the "-v" output in that case. > > (Also note, in regard to the suggestion of using the SHA, I don't really > care for that approach as it's hard to remember SHAs, you could also use a > tag rather than the SHA) > > > --Michael >
The verbose output using the commit hash as version is the same one that I get with version=master: the one returned by this <https://github.com/ansible/ansible/blob/devel/library/source_control/git#L565> . And, looking at the source, this is what I think happens (starting from here <https://github.com/ansible/ansible/blob/devel/library/source_control/git#L554> ): 1. local_mods is True (there's the settings.py file with the production settings). 2. I have forced=True and I am not doing a dry run, so the reset --HARD is executed reverting the settings.py to the one in the repo (the devel one). 3. before == remote_head evaluates to true and the module exits with the message linked above. My problem is the 2. The reset is always executed, even when before == remote_head. Il giorno lunedì 9 giugno 2014 16:56:10 UTC+2, Greg Hurrell ha scritto: > > You could rename your development settings.py to settings.py.sample, > continue to keep it under version control, and add settings.py itself to > your .gitignore. This is what Rails does with things like database.yml, > which may contain passwords. > Nice idea. I could use a *settings.py* with generic and development settings kept under git, and a separate *production_settings.py*, excluded by *.gitignore*, with the production settings. To make everything work I just need to add something like: try: import production_settings except ImportError: pass at the end of the *settings.py *file. Thanks Best regards, EP -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/af8839ac-aae4-47cd-97c3-32467905ec93%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
