ansible-api

Null values passed to cloudformation module - ansible

徘徊边缘 提交于 2019-12-20 02:54:15
问题 Ansible cloudformation module uses these environment variables of shell: $ export AWS_PROFILE=djangoapp $ export AWS_DEFAULT_REGION=ca-central-1 $ aws configure list Name Value Type Location ---- ----- ---- -------- profile djangoapp manual --profile access_key ****************WKWG shared-credentials-file secret_key ****************/I4Z shared-credentials-file region ca-central-1 env AWS_DEFAULT_REGION ./site.yml --- - name: Todobackend deployment playbook hosts: localhost connection: local

How to run playbook api in Ansible v2 with vault

孤者浪人 提交于 2019-12-10 21:42:20
问题 Here is what I have, I know this works without encryption and I can run ansible-vault edit common.yml with ANSIBLE_VAULT_PASSWORD_FILE=~/.vault_pass.txt set in the env. from collections import namedtuple from ansible.parsing.dataloader import DataLoader from ansible.vars import VariableManager from ansible.inventory import Inventory from ansible.playbook import Playbook from ansible.executor.playbook_executor import PlaybookExecutor variable_manager = VariableManager() loader = DataLoader()