dmahler / ansible-template Goto Github PK
View Code? Open in Web Editor NEWExample for using Ansible for Network Configuration Templates
Example for using Ansible for Network Configuration Templates
Hi
I watched your Video and rand it on my Linux setup running Ansible 2.5 but it failed - see below errors.
FYI, I just copied all the files without any modifications.
Any help to spot the changes needed to run on Ansible 2.5 is much appropriated.
Please let me know.
Mathew
mathew@Web-SRV:/python-ansible/test_global_vars$ ansible --version/python-ansible/test_global_vars$
ansible 2.5.0
config file = /home/mathew/python-ansible/test_global_vars/ansible.cfg
configured module search path = ['/usr/share/ansible']
ansible python module location = /usr/local/lib/python3.5/dist-packages/ansible
executable location = /usr/local/bin/ansible
python version = 3.5.2 (default, Nov 23 2017, 16:37:01) [GCC 5.4.0 20160609]
mathew@Web-SRV:
mathew@Web-SRV:~/python-ansible/test_global_vars$ ansible-playbook templates.yml
[DEPRECATION WARNING]: [defaults]hostfile option, The key is misleading as it can also be a list of hosts, a directory or a list of paths , use [defaults] inventory=/path/to/file|dir instead. This feature will be
removed in version 2.8. Deprecation warnings can be disabled by setting deprecation_warnings=False in ansible.cfg.
[DEPRECATION WARNING]: DEFAULT_SUDO_EXE option, In favor of Ansible Become, which is a generic framework. See become_exe. , use become instead. This feature will be removed in version 2.8. Deprecation warnings can be
disabled by setting deprecation_warnings=False in ansible.cfg.
[DEPRECATION WARNING]: DEFAULT_SUDO_USER option, In favor of Ansible Become, which is a generic framework. See become_user. , use become instead. This feature will be removed in version 2.8. Deprecation warnings can
be disabled by setting deprecation_warnings=False in ansible.cfg.
[WARNING]: provided hosts list is empty, only localhost is available. Note that the implicit localhost does not match 'all'
PLAY [Apply tor role] ***************************************************************************************************************************************************************************************************
TASK [tor : Generate configuration files] *******************************************************************************************************************************************************************************
fatal: [localhost]: FAILED! => {"msg": "The task includes an option with an undefined variable. The error was: 'ansible.utils.unsafe_proxy.AnsibleUnsafeText object' has no attribute 'profile'\n\nThe error appears to have been in '/home/mathew/python-ansible/test_global_vars/roles/tor/tasks/main.yml': line 2, column 3, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n---\n- name: Generate configuration files\n ^ here\n"}
to retry, use: --limit @/home/mathew/python-ansible/test_global_vars/templates.retry
PLAY RECAP **************************************************************************************************************************************************************************************************************
localhost : ok=0 changed=0 unreachable=0 failed=1
mathew@Web-SRV:~/python-ansible/test_global_vars$ tree
.
├── ansible.cfg
├── group_vars
│ └── all
├── hosts
├── README.md
├── roles
│ └── tor
│ ├── tasks
│ │ └── main.yml
│ ├── templates
│ │ └── leaf.j2
│ └── vars
│ └── main.yml
├── templates.retry
└── templates.yml
6 directories, 9 files
mathew@Web-SRV:~/python-ansible/test_global_vars$
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.