This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
os.environ["ANSIBLE_HOST_KEY_CHECKING"] = "False" | |
ansible.utils.VERBOSITY = 4 | |
hosts = [self.address] | |
webInventory = ansible.inventory.Inventory(hosts) | |
from ansible import callbacks | |
from ansible import utils | |
stats = callbacks.AggregateStats() | |
playbook_cb = callbacks.PlaybookCallbacks(verbose=utils.VERBOSITY) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from django.views.generic.base import RedirectView | |
class CustomRedirectView(RedirectView): | |
def get_redirect_url(self, *args, **kwargs): | |
return redirect("other/"+kwargs['extra_url']) | |
urlpatterns = patterns('', | |
... | |
url(r'^base/(?P<extra_url>.*)/$', CustomRedirectView.as_view(), name='redirect_view_name'), | |
url(r'^other/', include("otherapp.urls"), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(venv)Victors-MacBook-Air:aws_kingdom bracero$ ansible-playbook kingdom.yml | |
[WARNING]: provided hosts list is empty, only localhost is available | |
PLAY *************************************************************************** | |
TASK [setup] ******************************************************************* | |
ok: [127.0.0.1] | |
TASK [Create basic System Admin] *********************************************** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Basic user creation example | |
- hosts: 127.0.0.1 | |
connection: local | |
tasks: | |
- name: Create basic System Admin | |
iam: | |
iam_type: user | |
name: "{{ item }}" | |
state: present | |
password: "password" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
http://docs.puppetlabs.com/puppet_core_types_cheatsheet.pdf |