├── docsite ├── .nojekyll ├── rst │ ├── modules │ │ └── .gitdir │ ├── quickstart.rst │ ├── guides.rst │ ├── developing.rst │ └── intro.rst ├── favicon.ico ├── _static │ ├── file.png │ ├── minus.png │ ├── plus.png │ ├── favicon.ico │ ├── subtle_dots.png │ ├── ansible-local.css │ └── bootstrap-sphinx.css ├── modules.js ├── _themes │ └── srtd │ │ ├── static │ │ ├── images │ │ │ └── logo_invert.png │ │ ├── font │ │ │ ├── fontawesome_webfont.eot │ │ │ ├── fontawesome_webfont.ttf │ │ │ └── fontawesome_webfont.woff │ │ └── js │ │ │ └── theme.js │ │ ├── theme.conf │ │ ├── __init__.py │ │ └── breadcrumbs.html ├── .gitignore └── rst_common │ └── ansible_ssh_changes_note.rst ├── bin ├── ansible-doc ├── ansible-pull ├── ansible-console ├── ansible-galaxy ├── ansible-playbook └── ansible-vault ├── docs └── man │ ├── man3 │ └── .gitdir │ └── .gitignore ├── VERSION ├── examples ├── hosts.yml └── playbooks │ └── README.md ├── test ├── units │ ├── cli │ │ └── __init__.py │ ├── utils │ │ └── __init__.py │ ├── contrib │ │ ├── __init__.py │ │ └── inventory │ │ │ └── __init__.py │ ├── modules │ │ ├── __init__.py │ │ └── core │ │ │ ├── __init__.py │ │ │ └── test_docker.py │ ├── parsing │ │ └── yaml │ │ │ └── __init__.py │ ├── module_utils │ │ ├── basic │ │ │ └── __init__.py │ │ └── ec2 │ │ │ └── __init__.py │ ├── inventory_test_data │ │ └── group_vars │ │ │ ├── parse │ │ │ └── all.yml │ │ │ └── noparse │ │ │ ├── all.yml~ │ │ │ └── file.txt │ ├── mock │ │ └── path.py │ ├── __init__.py │ └── plugins │ │ └── action │ │ └── fixtures │ │ └── synchronize │ │ ├── basic │ │ ├── task_args_out.json │ │ └── meta.yaml │ │ ├── delegate_remote │ │ ├── task_args_out.json │ │ └── meta.yaml │ │ ├── basic_become │ │ └── task_args_out.json │ │ ├── delegate_remote_su │ │ └── task_args_out.json │ │ ├── basic_become_cli │ │ └── task_args_out.json │ │ ├── basic_vagrant │ │ └── task_args_out.json │ │ ├── basic_vagrant_sudo │ │ └── task_args_out.json │ │ └── basic_vagrant_become_cli │ │ └── task_args_out.json ├── integration │ ├── cleanup_azure.py │ ├── library │ │ └── .gitignore │ ├── roles │ │ ├── test_file │ │ │ ├── files │ │ │ │ ├── foobar │ │ │ │ │ ├── fileA │ │ │ │ │ ├── fileB │ │ │ │ │ └── directory │ │ │ │ │ │ ├── fileC │ │ │ │ │ │ └── fileD │ │ │ │ └── foo.txt │ │ │ └── meta │ │ │ │ └── main.yml │ │ ├── test_includes │ │ │ ├── tasks │ │ │ │ ├── empty.yml │ │ │ │ ├── not_a_role_task.yml │ │ │ │ └── included_task1.yml │ │ │ └── handlers │ │ │ │ ├── main.yml │ │ │ │ └── more_handlers.yml │ │ ├── test_uri │ │ │ ├── files │ │ │ │ ├── fail28.json │ │ │ │ ├── fail15.json │ │ │ │ ├── fail29.json │ │ │ │ ├── fail30.json │ │ │ │ ├── fail0.json │ │ │ │ ├── fail1.json │ │ │ │ ├── fail23.json │ │ │ │ ├── fail26.json │ │ │ │ ├── fail27.json │ │ │ │ ├── fail3.json │ │ │ │ ├── fail7.json │ │ │ │ ├── fail18.json │ │ │ │ ├── fail19.json │ │ │ │ ├── fail22.json │ │ │ │ ├── fail4.json │ │ │ │ ├── fail8.json │ │ │ │ ├── fail10.json │ │ │ │ ├── fail24.json │ │ │ │ ├── fail5.json │ │ │ │ ├── fail6.json │ │ │ │ ├── fail11.json │ │ │ │ ├── fail13.json │ │ │ │ ├── fail14.json │ │ │ │ ├── fail16.json │ │ │ │ ├── fail20.json │ │ │ │ ├── fail21.json │ │ │ │ ├── fail2.json │ │ │ │ ├── fail25.json │ │ │ │ ├── fail12.json │ │ │ │ ├── fail17.json │ │ │ │ ├── pass4.json │ │ │ │ ├── pass1.json │ │ │ │ ├── fail9.json │ │ │ │ ├── pass3.json │ │ │ │ ├── pass2.json │ │ │ │ ├── testserver.py │ │ │ │ └── README │ │ │ ├── meta │ │ │ │ └── main.yml │ │ │ └── vars │ │ │ │ └── main.yml │ │ ├── test_win_copy │ │ │ ├── files │ │ │ │ ├── empty.txt │ │ │ │ ├── foo.txt │ │ │ │ └── subdir │ │ │ │ │ ├── bar.txt │ │ │ │ │ └── subdir2 │ │ │ │ │ ├── baz.txt │ │ │ │ │ └── subdir3 │ │ │ │ │ └── subdir4 │ │ │ │ │ └── qux.txt │ │ │ └── meta │ │ │ │ └── main.yml │ │ ├── test_copy │ │ │ ├── files │ │ │ │ ├── foo.txt │ │ │ │ └── subdir │ │ │ │ │ ├── bar.txt │ │ │ │ │ └── subdir2 │ │ │ │ │ ├── baz.txt │ │ │ │ │ └── subdir3 │ │ │ │ │ └── subdir4 │ │ │ │ │ └── qux.txt │ │ │ └── meta │ │ │ │ └── main.yml │ │ ├── test_lineinfile │ │ │ └── files │ │ │ │ ├── testempty.txt │ │ │ │ ├── testnoeof.txt │ │ │ │ └── test.txt │ │ ├── test_service │ │ │ ├── templates │ │ │ │ └── main.yml │ │ │ ├── files │ │ │ │ ├── ansible.upstart │ │ │ │ ├── ansible-broken.upstart │ │ │ │ └── ansible.systemd │ │ │ └── tasks │ │ │ │ ├── sysv_cleanup.yml │ │ │ │ ├── sysv_setup.yml │ │ │ │ └── upstart_cleanup.yml │ │ ├── test_special_vars │ │ │ ├── vars │ │ │ │ └── main.yml │ │ │ ├── meta │ │ │ │ └── main.yml │ │ │ └── templates │ │ │ │ └── foo.j2 │ │ ├── test_win_file │ │ │ ├── files │ │ │ │ ├── foobar │ │ │ │ │ ├── fileB │ │ │ │ │ ├── directory │ │ │ │ │ │ ├── fileC │ │ │ │ │ │ └── fileD │ │ │ │ │ └── fileA │ │ │ │ └── foo.txt │ │ │ └── meta │ │ │ │ └── main.yml │ │ ├── test_binary │ │ │ ├── files │ │ │ │ ├── b64_utf8 │ │ │ │ ├── b64_latin1 │ │ │ │ └── from_playbook │ │ │ ├── meta │ │ │ │ └── main.yml │ │ │ ├── templates │ │ │ │ ├── from_playbook_template.j2 │ │ │ │ ├── b64_utf8_template.j2 │ │ │ │ └── b64_latin1_template.j2 │ │ │ └── vars │ │ │ │ └── main.yml │ │ ├── test_unarchive │ │ │ ├── files │ │ │ │ ├── foo.txt │ │ │ │ └── test-unarchive-nonascii-くらとみ.tar.gz │ │ │ └── meta │ │ │ │ └── main.yml │ │ ├── test_win_lineinfile │ │ │ ├── files │ │ │ │ ├── testempty.txt │ │ │ │ ├── test_quoting.txt │ │ │ │ ├── testnoeof.txt │ │ │ │ └── test.txt │ │ │ └── meta │ │ │ │ └── main.yml │ │ ├── test_ec2_elb │ │ │ ├── meta │ │ │ │ └── main.yml │ │ │ └── defaults │ │ │ │ └── main.yml │ │ ├── test_stat │ │ │ ├── files │ │ │ │ └── foo.txt │ │ │ └── meta │ │ │ │ └── main.yml │ │ ├── test_su │ │ │ ├── templates │ │ │ │ └── bar.j2 │ │ │ ├── vars │ │ │ │ └── default.yml │ │ │ └── files │ │ │ │ └── baz.txt │ │ ├── test_assemble │ │ │ └── files │ │ │ │ ├── fragment1 │ │ │ │ ├── fragment2 │ │ │ │ ├── fragment3 │ │ │ │ ├── fragment4 │ │ │ │ └── fragment5 │ │ ├── test_become │ │ │ ├── templates │ │ │ │ └── bar.j2 │ │ │ ├── files │ │ │ │ └── baz.txt │ │ │ └── vars │ │ │ │ └── default.yml │ │ ├── test_check_mode │ │ │ ├── files │ │ │ │ └── foo.txt │ │ │ ├── templates │ │ │ │ └── foo.j2 │ │ │ ├── vars │ │ │ │ └── main.yml │ │ │ └── meta │ │ │ │ └── main.yml │ │ ├── test_docker │ │ │ ├── files │ │ │ │ ├── devdockerCA.srl │ │ │ │ └── docker-registry.htpasswd │ │ │ └── tasks │ │ │ │ ├── docker-setup-debian.yml │ │ │ │ └── docker-setup-rht.yml │ │ ├── test_handlers │ │ │ ├── meta │ │ │ │ └── main.yml │ │ │ └── handlers │ │ │ │ └── main.yml │ │ ├── test_sudo │ │ │ ├── templates │ │ │ │ └── bar.j2 │ │ │ ├── vars │ │ │ │ └── default.yml │ │ │ └── files │ │ │ │ └── baz.txt │ │ ├── test_synchronize │ │ │ ├── files │ │ │ │ ├── bar.txt │ │ │ │ └── foo.txt │ │ │ └── meta │ │ │ │ └── main.yml │ │ ├── ec2_elb_instance_setup │ │ │ ├── meta │ │ │ │ └── main.yml │ │ │ ├── defaults │ │ │ │ └── main.yml │ │ │ ├── files │ │ │ │ └── index.html │ │ │ └── tasks │ │ │ │ └── main.yml │ │ ├── test_ec2 │ │ │ ├── vars │ │ │ │ └── main.yml │ │ │ ├── tasks │ │ │ │ └── main.yml │ │ │ ├── defaults │ │ │ │ └── main.yml │ │ │ ├── handlers │ │ │ │ └── main.yml │ │ │ └── meta │ │ │ │ └── main.yml │ │ ├── test_template │ │ │ ├── templates │ │ │ │ ├── short.j2 │ │ │ │ └── foo.j2 │ │ │ ├── meta │ │ │ │ └── main.yml │ │ │ ├── files │ │ │ │ ├── foo-py26.txt │ │ │ │ └── foo.txt │ │ │ └── vars │ │ │ │ └── main.yml │ │ ├── test_win_template │ │ │ ├── files │ │ │ │ └── foo.txt │ │ │ ├── templates │ │ │ │ └── foo.j2 │ │ │ ├── vars │ │ │ │ └── main.yml │ │ │ └── meta │ │ │ │ └── main.yml │ │ ├── test_apt │ │ │ └── meta │ │ │ │ └── main.yml │ │ ├── test_rax_scaling_group │ │ │ ├── files │ │ │ │ └── test.txt │ │ │ └── meta │ │ │ │ └── main.yml │ │ ├── test_yum │ │ │ └── meta │ │ │ │ └── main.yml │ │ ├── test_zypper │ │ │ ├── meta │ │ │ │ └── main.yml │ │ │ └── files │ │ │ │ └── empty.spec │ │ ├── prepare_win_tests │ │ │ └── meta │ │ │ │ └── main.yml │ │ ├── test_async │ │ │ └── meta │ │ │ │ └── main.yml │ │ ├── test_ec2_ami │ │ │ ├── tasks │ │ │ │ └── main.yml │ │ │ ├── vars │ │ │ │ └── main.yml │ │ │ ├── defaults │ │ │ │ └── main.yml │ │ │ └── meta │ │ │ │ └── main.yml │ │ ├── test_ec2_eip │ │ │ ├── vars │ │ │ │ └── main.yml │ │ │ ├── meta │ │ │ │ └── main.yml │ │ │ └── defaults │ │ │ │ └── main.yml │ │ ├── test_ec2_tag │ │ │ ├── tasks │ │ │ │ └── main.yml │ │ │ ├── vars │ │ │ │ └── main.yml │ │ │ ├── defaults │ │ │ │ └── main.yml │ │ │ └── meta │ │ │ │ └── main.yml │ │ ├── test_ec2_vol │ │ │ ├── tasks │ │ │ │ └── main.yml │ │ │ ├── vars │ │ │ │ └── main.yml │ │ │ ├── defaults │ │ │ │ └── main.yml │ │ │ └── meta │ │ │ │ └── main.yml │ │ ├── test_ec2_vpc │ │ │ ├── tasks │ │ │ │ └── main.yml │ │ │ ├── vars │ │ │ │ └── main.yml │ │ │ ├── defaults │ │ │ │ └── main.yml │ │ │ └── meta │ │ │ │ └── main.yml │ │ ├── test_fetch │ │ │ └── meta │ │ │ │ └── main.yml │ │ ├── test_filters │ │ │ ├── files │ │ │ │ └── 9851.txt │ │ │ ├── meta │ │ │ │ └── main.yml │ │ │ ├── templates │ │ │ │ └── py26json.j2 │ │ │ └── vars │ │ │ │ └── main.yml │ │ ├── test_gem │ │ │ └── meta │ │ │ │ └── main.yml │ │ ├── test_git │ │ │ └── meta │ │ │ │ └── main.yml │ │ ├── test_hg │ │ │ └── meta │ │ │ │ └── main.yml │ │ ├── test_mysql_db │ │ │ ├── meta │ │ │ │ └── main.yml │ │ │ └── defaults │ │ │ │ └── main.yml │ │ ├── test_mysql_user │ │ │ ├── meta │ │ │ │ └── main.yml │ │ │ └── defaults │ │ │ │ └── main.yml │ │ ├── test_pip │ │ │ └── meta │ │ │ │ └── main.yml │ │ ├── test_script │ │ │ ├── files │ │ │ │ ├── remove_afile.sh │ │ │ │ ├── test.sh │ │ │ │ └── create_afile.sh │ │ │ └── meta │ │ │ │ └── main.yml │ │ ├── setup_ec2 │ │ │ └── defaults │ │ │ │ └── main.yml │ │ ├── test_apt_repository │ │ │ ├── meta │ │ │ │ └── main.yml │ │ │ └── tasks │ │ │ │ └── cleanup.yml │ │ ├── test_authorized_key │ │ │ ├── meta │ │ │ │ └── main.yml │ │ │ └── defaults │ │ │ │ └── main.yml │ │ ├── test_command_shell │ │ │ ├── files │ │ │ │ ├── test.sh │ │ │ │ ├── remove_afile.sh │ │ │ │ └── create_afile.sh │ │ │ └── meta │ │ │ │ └── main.yml │ │ ├── test_cs_common │ │ │ └── defaults │ │ │ │ └── main.yml │ │ ├── test_cs_iso │ │ │ └── meta │ │ │ │ └── main.yml │ │ ├── test_cs_pod │ │ │ └── meta │ │ │ │ └── main.yml │ │ ├── test_cs_user │ │ │ └── meta │ │ │ │ └── main.yml │ │ ├── test_ec2_elb_lb │ │ │ ├── vars │ │ │ │ └── main.yml │ │ │ ├── meta │ │ │ │ └── main.yml │ │ │ └── defaults │ │ │ │ └── main.yml │ │ ├── test_ec2_facts │ │ │ ├── tasks │ │ │ │ └── main.yml │ │ │ ├── vars │ │ │ │ └── main.yml │ │ │ ├── defaults │ │ │ │ └── main.yml │ │ │ └── meta │ │ │ │ └── main.yml │ │ ├── test_facts_d │ │ │ └── meta │ │ │ │ └── main.yml │ │ ├── test_good_parsing │ │ │ ├── vars │ │ │ │ └── main.yml │ │ │ └── tasks │ │ │ │ ├── test_include.yml │ │ │ │ ├── test_include_conditional.yml │ │ │ │ └── test_include_nested.yml │ │ ├── test_iterators │ │ │ ├── meta │ │ │ │ └── main.yml │ │ │ └── vars │ │ │ │ └── main.yml │ │ ├── test_mysql_variables │ │ │ ├── meta │ │ │ │ └── main.yml │ │ │ └── defaults │ │ │ │ └── main.yml │ │ ├── test_subversion │ │ │ └── meta │ │ │ │ └── main.yml │ │ ├── test_win_regmerge │ │ │ ├── vars │ │ │ │ └── main.yml │ │ │ ├── meta │ │ │ │ └── main.yml │ │ │ ├── files │ │ │ │ ├── settings1.reg │ │ │ │ ├── settings2.reg │ │ │ │ └── settings3.reg │ │ │ └── templates │ │ │ │ └── win_line_ending.j2 │ │ ├── test_apache2_module │ │ │ ├── meta │ │ │ │ └── main.yml │ │ │ └── tasks │ │ │ │ └── main.yml │ │ ├── test_bad_parsing │ │ │ ├── meta │ │ │ │ └── main.yml │ │ │ └── tasks │ │ │ │ ├── scenario3.yml │ │ │ │ ├── scenario4.yml │ │ │ │ ├── scenario1.yml │ │ │ │ └── scenario2.yml │ │ ├── test_changed_when │ │ │ └── meta │ │ │ │ └── main.yml │ │ ├── test_cs_account │ │ │ └── meta │ │ │ │ └── main.yml │ │ ├── test_cs_cluster │ │ │ └── meta │ │ │ │ └── main.yml │ │ ├── test_cs_domain │ │ │ └── meta │ │ │ │ └── main.yml │ │ ├── test_cs_firewall │ │ │ ├── meta │ │ │ │ └── main.yml │ │ │ └── defaults │ │ │ │ └── main.yml │ │ ├── test_cs_instance │ │ │ ├── meta │ │ │ │ └── main.yml │ │ │ ├── defaults │ │ │ │ └── main.yml │ │ │ └── tasks │ │ │ │ ├── main.yml │ │ │ │ └── setup.yml │ │ ├── test_cs_project │ │ │ └── meta │ │ │ │ └── main.yml │ │ ├── test_cs_volume │ │ │ ├── meta │ │ │ │ └── main.yml │ │ │ └── defaults │ │ │ │ └── main.yml │ │ ├── test_handlers_meta │ │ │ ├── meta │ │ │ │ └── main.yml │ │ │ └── handlers │ │ │ │ └── main.yml │ │ ├── test_ignore_errors │ │ │ └── meta │ │ │ │ └── main.yml │ │ ├── test_include_vars │ │ │ ├── vars │ │ │ │ ├── all │ │ │ │ │ └── all.yml │ │ │ │ ├── services │ │ │ │ │ └── webapp.yml │ │ │ │ └── environments │ │ │ │ │ └── development │ │ │ │ │ ├── all.yml │ │ │ │ │ └── services │ │ │ │ │ └── webapp.yml │ │ │ └── defaults │ │ │ │ └── main.yml │ │ ├── test_var_blending │ │ │ ├── meta │ │ │ │ └── main.yml │ │ │ ├── vars │ │ │ │ ├── more_vars.yml │ │ │ │ └── main.yml │ │ │ └── defaults │ │ │ │ └── main.yml │ │ ├── test_win_regedit │ │ │ └── meta │ │ │ │ └── main.yml │ │ ├── test_zypper_repository │ │ │ └── meta │ │ │ │ └── main.yml │ │ ├── test_cs_affinitygroup │ │ │ └── meta │ │ │ │ └── main.yml │ │ ├── test_cs_configuration │ │ │ ├── meta │ │ │ │ └── main.yml │ │ │ └── defaults │ │ │ │ └── main.yml │ │ ├── test_cs_instance_facts │ │ │ ├── meta │ │ │ │ └── main.yml │ │ │ └── defaults │ │ │ │ └── main.yml │ │ ├── test_cs_instancegroup │ │ │ └── meta │ │ │ │ └── main.yml │ │ ├── test_cs_portforward │ │ │ ├── meta │ │ │ │ └── main.yml │ │ │ └── defaults │ │ │ │ └── main.yml │ │ ├── test_cs_resourcelimit │ │ │ └── meta │ │ │ │ └── main.yml │ │ ├── test_cs_securitygroup │ │ │ └── meta │ │ │ │ └── main.yml │ │ ├── test_cs_sshkeypair │ │ │ └── meta │ │ │ │ └── main.yml │ │ ├── test_cs_vmsnapshot │ │ │ ├── meta │ │ │ │ └── main.yml │ │ │ └── defaults │ │ │ │ └── main.yml │ │ ├── test_ec2_key │ │ │ ├── meta │ │ │ │ └── main.yml │ │ │ └── defaults │ │ │ │ └── main.yml │ │ ├── test_lookups │ │ │ ├── vars │ │ │ │ └── main.yml │ │ │ └── meta │ │ │ │ └── main.yml │ │ ├── test_postgresql │ │ │ ├── meta │ │ │ │ └── main.yml │ │ │ └── defaults │ │ │ │ └── main.yml │ │ ├── test_cs_loadbalancer_rule │ │ │ ├── meta │ │ │ │ └── main.yml │ │ │ └── defaults │ │ │ │ └── main.yml │ │ ├── test_cs_securitygroup_rule │ │ │ ├── meta │ │ │ │ └── main.yml │ │ │ └── tasks │ │ │ │ ├── main.yml │ │ │ │ └── cleanup.yml │ │ ├── test_ec2_group │ │ │ ├── meta │ │ │ │ └── main.yml │ │ │ └── defaults │ │ │ │ └── main.yml │ │ ├── test_rax │ │ │ └── meta │ │ │ │ └── main.yml │ │ ├── test_var_precedence_role1 │ │ │ ├── meta │ │ │ │ └── main.yml │ │ │ ├── defaults │ │ │ │ └── main.yml │ │ │ ├── vars │ │ │ │ └── main.yml │ │ │ └── tasks │ │ │ │ └── main.yml │ │ ├── test_win_script │ │ │ ├── files │ │ │ │ ├── test_script.bat │ │ │ │ ├── test_script.cmd │ │ │ │ ├── test_script_creates_file.ps1 │ │ │ │ ├── test_script_removes_file.ps1 │ │ │ │ ├── test_script_bool.ps1 │ │ │ │ ├── test_script.ps1 │ │ │ │ ├── test_script_with_args.ps1 │ │ │ │ ├── test_script_with_errors.ps1 │ │ │ │ └── test_script_with_splatting.ps1 │ │ │ └── defaults │ │ │ │ └── main.yml │ │ ├── ec2_provision_instances │ │ │ ├── meta │ │ │ │ └── main.yml │ │ │ └── defaults │ │ │ │ └── main.yml │ │ ├── test_rax_cbs │ │ │ └── meta │ │ │ │ └── main.yml │ │ ├── test_rax_cdb │ │ │ └── meta │ │ │ │ └── main.yml │ │ ├── test_rax_clb │ │ │ └── meta │ │ │ │ └── main.yml │ │ ├── test_rax_facts │ │ │ └── meta │ │ │ │ └── main.yml │ │ ├── test_rax_meta │ │ │ └── meta │ │ │ │ └── main.yml │ │ ├── test_get_url │ │ │ └── meta │ │ │ │ └── main.yml │ │ ├── test_rax_clb_nodes │ │ │ └── meta │ │ │ │ └── main.yml │ │ ├── test_rax_identity │ │ │ └── meta │ │ │ │ └── main.yml │ │ ├── test_rax_keypair │ │ │ └── meta │ │ │ │ └── main.yml │ │ ├── test_rax_network │ │ │ └── meta │ │ │ │ └── main.yml │ │ ├── test_cloudflare_dns │ │ │ └── defaults │ │ │ │ └── main.yml │ │ ├── test_rax_cbs_attachments │ │ │ └── meta │ │ │ │ └── main.yml │ │ ├── test_rax_cdb_database │ │ │ └── meta │ │ │ │ └── main.yml │ │ ├── test_force_handlers │ │ │ ├── handlers │ │ │ │ └── main.yml │ │ │ └── tasks │ │ │ │ └── main.yml │ │ ├── test_var_precedence_inven_override │ │ │ └── tasks │ │ │ │ └── main.yml │ │ ├── test_win_feature │ │ │ └── defaults │ │ │ │ └── main.yml │ │ ├── test_win_group │ │ │ └── defaults │ │ │ │ └── main.yml │ │ ├── setup_mysql_db │ │ │ ├── vars │ │ │ │ ├── RedHat.yml │ │ │ │ ├── Suse.yml │ │ │ │ ├── Debian.yml │ │ │ │ ├── Fedora.yml │ │ │ │ └── RedHat-7.yml │ │ │ └── defaults │ │ │ │ └── main.yml │ │ ├── test_exoscale_dns │ │ │ └── defaults │ │ │ │ └── main.yml │ │ ├── test_embedded_module │ │ │ ├── library │ │ │ │ └── test_integration_module │ │ │ └── tasks │ │ │ │ └── main.yml │ │ ├── setup_postgresql_db │ │ │ ├── defaults │ │ │ │ └── main.yml │ │ │ ├── vars │ │ │ │ ├── default.yml │ │ │ │ ├── Debian-8.yml │ │ │ │ ├── Ubuntu-14.yml │ │ │ │ ├── Ubuntu-16.yml │ │ │ │ └── Ubuntu-12.yml │ │ │ └── files │ │ │ │ └── pg_hba.conf │ │ ├── test_jenkins_job │ │ │ └── defaults │ │ │ │ └── main.yml │ │ ├── test_vault │ │ │ ├── tasks │ │ │ │ └── main.yml │ │ │ └── vars │ │ │ │ └── main.yml │ │ ├── test_var_precedence_role3 │ │ │ ├── vars │ │ │ │ └── main.yml │ │ │ ├── defaults │ │ │ │ └── main.yml │ │ │ └── tasks │ │ │ │ └── main.yml │ │ ├── test_win_user │ │ │ ├── defaults │ │ │ │ └── main.yml │ │ │ └── files │ │ │ │ └── lockout_user.ps1 │ │ ├── prepare_http_tests │ │ │ ├── defaults │ │ │ │ └── main.yml │ │ │ └── vars │ │ │ │ └── httptester.yml │ │ ├── test_win_service │ │ │ └── defaults │ │ │ │ └── main.yml │ │ ├── test_var_precedence_role2 │ │ │ ├── defaults │ │ │ │ └── main.yml │ │ │ ├── vars │ │ │ │ └── main.yml │ │ │ └── tasks │ │ │ │ └── main.yml │ │ ├── test_var_precedence_dep │ │ │ ├── defaults │ │ │ │ └── main.yml │ │ │ ├── vars │ │ │ │ └── main.yml │ │ │ └── tasks │ │ │ │ └── main.yml │ │ ├── test_gce │ │ │ └── defaults │ │ │ │ └── main.yml │ │ ├── test_gce_pd │ │ │ └── defaults │ │ │ │ └── main.yml │ │ ├── test_var_precedence │ │ │ ├── meta │ │ │ │ └── main.yml │ │ │ └── tasks │ │ │ │ └── main.yml │ │ ├── test_win_get_url │ │ │ └── defaults │ │ │ │ └── main.yml │ │ ├── test_win_msi │ │ │ └── defaults │ │ │ │ └── main.yml │ │ ├── test_win_package │ │ │ └── defaults │ │ │ │ └── main.yml │ │ ├── test_conditionals │ │ │ └── vars │ │ │ │ └── main.yml │ │ ├── test_task_ordering │ │ │ └── tasks │ │ │ │ ├── main.yml │ │ │ │ └── taskorder-include.yml │ │ ├── test_azure │ │ │ └── defaults │ │ │ │ └── main.yml │ │ ├── test_vault_embedded │ │ │ └── tasks │ │ │ │ └── main.yml │ │ ├── test_loops │ │ │ └── tasks │ │ │ │ └── main.yml │ │ ├── test_always_run │ │ │ └── meta │ │ │ │ └── main.yml │ │ └── test_hash_behavior │ │ │ └── meta │ │ │ └── main.yml │ ├── vault-password │ ├── test_includes4.yml │ ├── inventory.local │ ├── inventory.handlers │ ├── test_blocks │ │ ├── fail.yml │ │ ├── nested_fail.yml │ │ └── nested_nested_fail.yml │ ├── group_vars │ │ ├── amazon │ │ ├── local │ │ └── all │ ├── vars │ │ ├── test_hash_vars.yml │ │ ├── test_var_precedence.yml │ │ └── test_var_encrypted.yml │ ├── test_setup.yml │ ├── galaxy_playbook_git.yml │ ├── test_includes.yml │ ├── test_vault.yml │ ├── inventory.group_by │ ├── test_filters.yml │ ├── test_include_vars.yml │ ├── lookup_paths │ │ ├── roles │ │ │ └── showfile │ │ │ │ └── tasks │ │ │ │ └── main.yml │ │ └── testplay.yml │ ├── unicode-test-script │ ├── exoscale.yml │ ├── test_vault_embedded.yml │ ├── azure.yml │ ├── galaxy_playbook.yml │ ├── jenkins.yml │ ├── check_mode.yml │ ├── test_binary_modules.yml │ ├── lookup.properties │ ├── test_includes3.yml │ ├── all.yml │ ├── gce.yml │ ├── inventory.remote.template │ ├── integration_config.yml │ ├── host_vars │ │ └── testhost │ ├── good_parsing.yml │ ├── test_async.yml │ ├── consul_running.py │ ├── test_win_group3.yml │ ├── vars_file.yml │ ├── galaxy_rolesfile │ ├── bad_parsing.yml │ ├── test_tags.yml │ ├── vault-secret.txt │ ├── test_templating_settings.yml │ ├── lookup.ini │ ├── galaxy_roles.yml │ ├── cloudflare.yml │ ├── test_win_group1.yml │ ├── test_win_group2.yml │ ├── test_includes2.yml │ ├── test_test_infra.yml │ ├── credentials.template │ ├── test_handlers.yml │ ├── consul_inventory.yml │ ├── inventory.winrm.template │ ├── test_hash.yml │ ├── test_force_handlers.yml │ └── download_binary_modules.yml ├── samples │ ├── testing │ │ ├── frag1 │ │ ├── frag2 │ │ ├── frag3 │ │ ├── extra_vars.yml │ │ └── vars.yml │ ├── roles │ │ ├── common │ │ │ ├── meta │ │ │ │ └── main.yml │ │ │ └── tasks │ │ │ │ └── main.yml │ │ ├── role_a │ │ │ ├── meta │ │ │ │ └── main.yml │ │ │ └── tasks │ │ │ │ └── main.yml │ │ ├── role_b │ │ │ ├── meta │ │ │ │ └── main.yml │ │ │ └── tasks │ │ │ │ └── main.yml │ │ ├── test_become_r1 │ │ │ ├── meta │ │ │ │ └── main.yml │ │ │ └── tasks │ │ │ │ └── main.yml │ │ ├── test_become_r2 │ │ │ ├── tasks │ │ │ │ └── main.yml │ │ │ └── meta │ │ │ │ └── main.yml │ │ ├── test_role │ │ │ ├── meta │ │ │ │ └── main.yml │ │ │ └── tasks │ │ │ │ └── main.yml │ │ └── test_role_dep │ │ │ └── tasks │ │ │ └── main.yml │ ├── template.j2 │ ├── common_include.yml │ ├── README.md │ ├── test_playbook.include │ ├── l1_include.yml │ ├── test_big_debug.yml │ ├── hosts │ ├── src │ ├── localhost_include.yml │ ├── test_big_ping.yml │ ├── localhosts │ ├── l2_include.yml │ ├── test_run_once.yml │ ├── lookup_pipe.yml │ ├── with_lines.yml │ ├── included_playbook.yml │ ├── l3_include.yml │ ├── with_env.yml │ ├── lookup_file.yml │ ├── test_sudo.yml │ ├── with_fileglob.yml │ ├── test_roles_complex.yml │ ├── test_fact_gather.yml │ ├── lookup_template.yml │ ├── test_play_failure.yml │ ├── test_role.yml │ ├── include.yml │ ├── with_items.yml │ ├── with_first_found.yml │ ├── ignore_errors.yml │ ├── with_random_choice.yml │ ├── with_flattened.yml │ ├── with_indexed_items.yml │ ├── with_together.yml │ ├── test_free.yml │ ├── lookup_password.yml │ ├── with_nested.yml │ ├── test_become.yml │ ├── with_dict.yml │ ├── with_sequence.yml │ ├── with_subelements.yml │ ├── test_blocks_of_blocks.yml │ ├── test_include.yml │ ├── test_block.yml │ └── test_tags.yml ├── utils │ ├── shippable │ │ ├── code-smell-requirements.txt │ │ ├── integration-requirements.txt │ │ ├── python3-test-target-blacklist.txt │ │ ├── modules │ │ │ └── generate-tests-requirements.txt │ │ ├── sanity-requirements.txt │ │ ├── remote-requirements.txt │ │ ├── python3-test-tag-blacklist.txt │ │ ├── ci.sh │ │ └── code-smell.sh │ ├── ansible-playbook_integration_runner │ │ ├── inventory │ │ ├── ansible.cfg │ │ └── roles │ │ │ └── ansible_test_deps │ │ │ ├── vars │ │ │ └── main.yml │ │ │ ├── defaults │ │ │ └── main.yml │ │ │ ├── handlers │ │ │ └── main.yml │ │ │ ├── test │ │ │ ├── inventory │ │ │ ├── roles │ │ │ │ └── ansible_test_deps │ │ │ └── requirements.yml │ │ │ ├── meta │ │ │ ├── .galaxy_install_info │ │ │ └── main.yml │ │ │ └── README.md │ ├── docker │ │ ├── httptester │ │ │ └── services.sh │ │ ├── ubuntu1204 │ │ │ └── init-fake.conf │ │ └── ubuntu1404 │ │ │ └── init-fake.conf │ └── tox │ │ ├── requirements-py3.txt │ │ └── requirements.txt └── code-smell │ ├── required-and-default-attributes.sh │ ├── use-compat-six.sh │ ├── replace-urlopen.sh │ ├── no-basestring.sh │ └── inappropriately-private.sh ├── packaging ├── debian │ ├── compat │ ├── pycompat │ ├── docs │ ├── ansible.dirs │ ├── ansible.install │ └── rules ├── macports │ └── .gitignore ├── gentoo │ └── README.md ├── port │ └── sysutils │ │ └── ansible │ │ └── pkg-descr ├── arch │ └── README.md └── release │ └── templates │ └── RELEASES.tmpl ├── .gitattributes ├── lib └── ansible │ ├── utils │ └── module_docs_fragments │ │ └── __init__.py │ ├── galaxy │ └── data │ │ ├── test_playbook.j2 │ │ └── travis.j2 │ ├── plugins │ ├── test │ │ └── __init__.py │ └── filter │ │ └── __init__.py │ ├── inventory │ └── vars_plugins │ │ └── __init__.py │ └── test-requirements.txt ├── .coveragerc ├── hacking ├── update.sh ├── yamlcheck.py ├── authors.sh └── templates │ └── playbooks_directives.rst.j2 ├── docs-api ├── modules.rst ├── docs-requirements.txt └── index.rst ├── contrib ├── inventory │ ├── cloudstack.ini │ ├── zabbix.ini │ ├── libcloud.ini │ ├── nagios_ndo.ini │ ├── nsot.yaml │ ├── linode.ini │ ├── spacewalk.ini │ └── cobbler.ini └── README.md ├── .gitmodules ├── ticket_stubs ├── wider_discussion.md ├── README.md ├── bug_is_really_a_question.md ├── proposal.md ├── change_applied.md ├── pr_merged.md ├── bug_misunderstanding.md ├── file_under_another_project.md └── bug_confirmed_p1_or_p2.md ├── .yamllint ├── MANIFEST.in └── .github └── PULL_REQUEST_TEMPLATE.md /docsite/.nojekyll: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /bin/ansible-doc: -------------------------------------------------------------------------------- 1 | ansible -------------------------------------------------------------------------------- /bin/ansible-pull: -------------------------------------------------------------------------------- 1 | ansible -------------------------------------------------------------------------------- /docs/man/man3/.gitdir: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /VERSION: -------------------------------------------------------------------------------- 1 | 2.2.0 0.0.devel 2 | -------------------------------------------------------------------------------- /bin/ansible-console: -------------------------------------------------------------------------------- 1 | ansible -------------------------------------------------------------------------------- /bin/ansible-galaxy: -------------------------------------------------------------------------------- 1 | ansible -------------------------------------------------------------------------------- /bin/ansible-playbook: -------------------------------------------------------------------------------- 1 | ansible -------------------------------------------------------------------------------- /bin/ansible-vault: -------------------------------------------------------------------------------- 1 | ansible -------------------------------------------------------------------------------- /docsite/rst/modules/.gitdir: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /examples/hosts.yml: -------------------------------------------------------------------------------- 1 | hosts.yaml -------------------------------------------------------------------------------- /test/units/cli/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/units/utils/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packaging/debian/compat: -------------------------------------------------------------------------------- 1 | 5 2 | -------------------------------------------------------------------------------- /packaging/debian/pycompat: -------------------------------------------------------------------------------- 1 | 2 2 | -------------------------------------------------------------------------------- /test/units/contrib/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/units/modules/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packaging/debian/docs: -------------------------------------------------------------------------------- 1 | README.md 2 | -------------------------------------------------------------------------------- /test/integration/cleanup_azure.py: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /test/samples/testing/frag1: -------------------------------------------------------------------------------- 1 | frag 1 2 | -------------------------------------------------------------------------------- /test/samples/testing/frag2: -------------------------------------------------------------------------------- 1 | frag 2 2 | -------------------------------------------------------------------------------- /test/samples/testing/frag3: -------------------------------------------------------------------------------- 1 | frag 3 2 | -------------------------------------------------------------------------------- /test/units/modules/core/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/units/parsing/yaml/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | CHANGELOG.md merge=union 2 | -------------------------------------------------------------------------------- /test/samples/roles/common/meta/main.yml: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/units/contrib/inventory/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/units/module_utils/basic/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/units/module_utils/ec2/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /docs/man/.gitignore: -------------------------------------------------------------------------------- 1 | *.xml 2 | *.asciidoc 3 | -------------------------------------------------------------------------------- /lib/ansible/utils/module_docs_fragments/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/integration/library/.gitignore: -------------------------------------------------------------------------------- 1 | helloworld_* 2 | -------------------------------------------------------------------------------- /test/integration/roles/test_file/files/foobar/fileA: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/integration/roles/test_file/files/foobar/fileB: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/integration/roles/test_includes/tasks/empty.yml: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/integration/roles/test_uri/files/fail28.json: -------------------------------------------------------------------------------- 1 | [0e] -------------------------------------------------------------------------------- /test/integration/roles/test_win_copy/files/empty.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/integration/roles/test_copy/files/foo.txt: -------------------------------------------------------------------------------- 1 | foo.txt 2 | -------------------------------------------------------------------------------- /test/integration/roles/test_file/files/foo.txt: -------------------------------------------------------------------------------- 1 | foo.txt 2 | -------------------------------------------------------------------------------- /test/integration/roles/test_lineinfile/files/testempty.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/integration/roles/test_service/templates/main.yml: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/integration/roles/test_special_vars/vars/main.yml: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/integration/roles/test_uri/files/fail15.json: -------------------------------------------------------------------------------- 1 | [\naked] -------------------------------------------------------------------------------- /test/integration/roles/test_uri/files/fail29.json: -------------------------------------------------------------------------------- 1 | [0e+] -------------------------------------------------------------------------------- /test/integration/roles/test_uri/files/fail30.json: -------------------------------------------------------------------------------- 1 | [0e+-1] -------------------------------------------------------------------------------- /test/integration/roles/test_win_file/files/foobar/fileB: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/integration/vault-password: -------------------------------------------------------------------------------- 1 | test-vault-password 2 | -------------------------------------------------------------------------------- /test/samples/template.j2: -------------------------------------------------------------------------------- 1 | the variable is {{my_var}} 2 | -------------------------------------------------------------------------------- /test/samples/testing/extra_vars.yml: -------------------------------------------------------------------------------- 1 | num_retries: 2 2 | -------------------------------------------------------------------------------- /packaging/macports/.gitignore: -------------------------------------------------------------------------------- 1 | PortIndex 2 | PortIndex.quick 3 | -------------------------------------------------------------------------------- /test/integration/roles/test_binary/files/b64_utf8: -------------------------------------------------------------------------------- 1 | Café Eñe 2 | -------------------------------------------------------------------------------- /test/integration/roles/test_copy/files/subdir/bar.txt: -------------------------------------------------------------------------------- 1 | baz 2 | -------------------------------------------------------------------------------- /test/integration/roles/test_file/files/foobar/directory/fileC: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/integration/roles/test_file/files/foobar/directory/fileD: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/integration/roles/test_unarchive/files/foo.txt: -------------------------------------------------------------------------------- 1 | foo.txt 2 | -------------------------------------------------------------------------------- /test/integration/roles/test_uri/files/fail0.json: -------------------------------------------------------------------------------- 1 | ["mismatch"} -------------------------------------------------------------------------------- /test/integration/roles/test_win_copy/files/foo.txt: -------------------------------------------------------------------------------- 1 | foo.txt 2 | -------------------------------------------------------------------------------- /test/integration/roles/test_win_file/files/foo.txt: -------------------------------------------------------------------------------- 1 | foo.txt 2 | -------------------------------------------------------------------------------- /test/integration/roles/test_win_lineinfile/files/testempty.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/utils/shippable/code-smell-requirements.txt: -------------------------------------------------------------------------------- 1 | yamllint 2 | -------------------------------------------------------------------------------- /test/utils/shippable/integration-requirements.txt: -------------------------------------------------------------------------------- 1 | jmespath 2 | -------------------------------------------------------------------------------- /test/integration/roles/test_binary/files/b64_latin1: -------------------------------------------------------------------------------- 1 | Café Eñe 2 | -------------------------------------------------------------------------------- /test/integration/roles/test_binary/files/from_playbook: -------------------------------------------------------------------------------- 1 | Café Eñe 2 | -------------------------------------------------------------------------------- /test/integration/roles/test_uri/files/fail1.json: -------------------------------------------------------------------------------- 1 | ["Unclosed array" -------------------------------------------------------------------------------- /test/integration/roles/test_uri/files/fail23.json: -------------------------------------------------------------------------------- 1 | ['single quote'] -------------------------------------------------------------------------------- /test/integration/roles/test_uri/files/fail26.json: -------------------------------------------------------------------------------- 1 | ["line 2 | break"] -------------------------------------------------------------------------------- /test/integration/roles/test_uri/files/fail27.json: -------------------------------------------------------------------------------- 1 | ["line\ 2 | break"] -------------------------------------------------------------------------------- /test/integration/roles/test_uri/files/fail3.json: -------------------------------------------------------------------------------- 1 | ["extra comma",] -------------------------------------------------------------------------------- /test/integration/roles/test_uri/files/fail7.json: -------------------------------------------------------------------------------- 1 | ["Extra close"]] -------------------------------------------------------------------------------- /test/integration/roles/test_win_copy/files/subdir/bar.txt: -------------------------------------------------------------------------------- 1 | baz 2 | -------------------------------------------------------------------------------- /test/integration/roles/test_win_file/files/foobar/directory/fileC: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/integration/roles/test_win_file/files/foobar/directory/fileD: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/integration/roles/test_win_file/files/foobar/fileA: -------------------------------------------------------------------------------- 1 | fileA 2 | -------------------------------------------------------------------------------- /test/integration/roles/test_win_lineinfile/files/test_quoting.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/integration/test_includes4.yml: -------------------------------------------------------------------------------- 1 | - set_fact: 2 | p: 1 3 | -------------------------------------------------------------------------------- /test/integration/roles/test_copy/files/subdir/subdir2/baz.txt: -------------------------------------------------------------------------------- 1 | baz 2 | -------------------------------------------------------------------------------- /test/integration/roles/test_ec2_elb/meta/main.yml: -------------------------------------------------------------------------------- 1 | dependencies: [] 2 | -------------------------------------------------------------------------------- /test/integration/roles/test_stat/files/foo.txt: -------------------------------------------------------------------------------- 1 | templated_var_loaded 2 | -------------------------------------------------------------------------------- /test/integration/roles/test_su/templates/bar.j2: -------------------------------------------------------------------------------- 1 | {{ su_test_user }} 2 | -------------------------------------------------------------------------------- /test/integration/roles/test_uri/files/fail18.json: -------------------------------------------------------------------------------- 1 | {"Missing colon" null} -------------------------------------------------------------------------------- /test/integration/roles/test_uri/files/fail19.json: -------------------------------------------------------------------------------- 1 | {"Double colon":: null} -------------------------------------------------------------------------------- /test/integration/roles/test_uri/files/fail22.json: -------------------------------------------------------------------------------- 1 | ["Bad value", truth] -------------------------------------------------------------------------------- /test/integration/roles/test_uri/files/fail4.json: -------------------------------------------------------------------------------- 1 | ["double extra comma",,] -------------------------------------------------------------------------------- /test/integration/roles/test_uri/files/fail8.json: -------------------------------------------------------------------------------- 1 | {"Extra comma": true,} -------------------------------------------------------------------------------- /test/integration/roles/test_win_copy/files/subdir/subdir2/baz.txt: -------------------------------------------------------------------------------- 1 | baz 2 | -------------------------------------------------------------------------------- /test/samples/roles/role_a/meta/main.yml: -------------------------------------------------------------------------------- 1 | dependencies: 2 | - common 3 | -------------------------------------------------------------------------------- /test/samples/roles/role_b/meta/main.yml: -------------------------------------------------------------------------------- 1 | dependencies: 2 | - common 3 | -------------------------------------------------------------------------------- /test/samples/roles/test_become_r1/meta/main.yml: -------------------------------------------------------------------------------- 1 | allow_duplicates: yes 2 | -------------------------------------------------------------------------------- /test/samples/roles/test_become_r1/tasks/main.yml: -------------------------------------------------------------------------------- 1 | - command: whoami 2 | -------------------------------------------------------------------------------- /test/samples/roles/test_become_r2/tasks/main.yml: -------------------------------------------------------------------------------- 1 | - command: whoami 2 | -------------------------------------------------------------------------------- /test/samples/testing/vars.yml: -------------------------------------------------------------------------------- 1 | vars_file_var: "this is in a vars file" 2 | -------------------------------------------------------------------------------- /test/utils/shippable/python3-test-target-blacklist.txt: -------------------------------------------------------------------------------- 1 | s/ pull / / 2 | -------------------------------------------------------------------------------- /test/integration/inventory.local: -------------------------------------------------------------------------------- 1 | testhost ansible_connection=local 2 | 3 | -------------------------------------------------------------------------------- /test/integration/roles/test_assemble/files/fragment1: -------------------------------------------------------------------------------- 1 | this is fragment 1 2 | -------------------------------------------------------------------------------- /test/integration/roles/test_assemble/files/fragment2: -------------------------------------------------------------------------------- 1 | this is fragment 2 2 | -------------------------------------------------------------------------------- /test/integration/roles/test_assemble/files/fragment3: -------------------------------------------------------------------------------- 1 | this is fragment 3 2 | -------------------------------------------------------------------------------- /test/integration/roles/test_assemble/files/fragment4: -------------------------------------------------------------------------------- 1 | this is fragment 4 2 | -------------------------------------------------------------------------------- /test/integration/roles/test_assemble/files/fragment5: -------------------------------------------------------------------------------- 1 | this is fragment 5 2 | -------------------------------------------------------------------------------- /test/integration/roles/test_become/templates/bar.j2: -------------------------------------------------------------------------------- 1 | {{ become_test_user }} 2 | -------------------------------------------------------------------------------- /test/integration/roles/test_check_mode/files/foo.txt: -------------------------------------------------------------------------------- 1 | templated_var_loaded 2 | -------------------------------------------------------------------------------- /test/integration/roles/test_docker/files/devdockerCA.srl: -------------------------------------------------------------------------------- 1 | D96F3E552F279F46 2 | -------------------------------------------------------------------------------- /test/integration/roles/test_handlers/meta/main.yml: -------------------------------------------------------------------------------- 1 | dependencies: [] 2 | 3 | -------------------------------------------------------------------------------- /test/integration/roles/test_su/vars/default.yml: -------------------------------------------------------------------------------- 1 | su_test_user: ansibletest1 2 | -------------------------------------------------------------------------------- /test/integration/roles/test_sudo/templates/bar.j2: -------------------------------------------------------------------------------- 1 | {{ sudo_test_user }} 2 | -------------------------------------------------------------------------------- /test/integration/roles/test_synchronize/files/bar.txt: -------------------------------------------------------------------------------- 1 | templated_var_loaded 2 | -------------------------------------------------------------------------------- /test/integration/roles/test_synchronize/files/foo.txt: -------------------------------------------------------------------------------- 1 | templated_var_loaded 2 | -------------------------------------------------------------------------------- /test/integration/roles/test_uri/files/fail10.json: -------------------------------------------------------------------------------- 1 | {"Illegal expression": 1 + 2} -------------------------------------------------------------------------------- /test/integration/roles/test_uri/files/fail24.json: -------------------------------------------------------------------------------- 1 | [" tab character in string "] -------------------------------------------------------------------------------- /test/integration/roles/test_uri/files/fail5.json: -------------------------------------------------------------------------------- 1 | [ , "<-- missing value"] -------------------------------------------------------------------------------- /test/integration/roles/test_uri/files/fail6.json: -------------------------------------------------------------------------------- 1 | ["Comma after the close"], -------------------------------------------------------------------------------- /test/samples/common_include.yml: -------------------------------------------------------------------------------- 1 | - debug: msg="this is the common include" 2 | -------------------------------------------------------------------------------- /test/integration/inventory.handlers: -------------------------------------------------------------------------------- 1 | [testgroup] 2 | A 3 | B 4 | C 5 | D 6 | E 7 | -------------------------------------------------------------------------------- /test/integration/roles/ec2_elb_instance_setup/meta/main.yml: -------------------------------------------------------------------------------- 1 | dependencies: [] 2 | -------------------------------------------------------------------------------- /test/integration/roles/test_check_mode/templates/foo.j2: -------------------------------------------------------------------------------- 1 | {{ templated_var }} 2 | -------------------------------------------------------------------------------- /test/integration/roles/test_copy/files/subdir/subdir2/subdir3/subdir4/qux.txt: -------------------------------------------------------------------------------- 1 | qux -------------------------------------------------------------------------------- /test/integration/roles/test_ec2/vars/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # vars file for test_ec2 3 | -------------------------------------------------------------------------------- /test/integration/roles/test_su/files/baz.txt: -------------------------------------------------------------------------------- 1 | testing tilde expansion with su 2 | -------------------------------------------------------------------------------- /test/integration/roles/test_sudo/vars/default.yml: -------------------------------------------------------------------------------- 1 | sudo_test_user: ansibletest1 2 | -------------------------------------------------------------------------------- /test/integration/roles/test_template/templates/short.j2: -------------------------------------------------------------------------------- 1 | {{ templated_var }} 2 | -------------------------------------------------------------------------------- /test/integration/roles/test_uri/files/fail11.json: -------------------------------------------------------------------------------- 1 | {"Illegal invocation": alert()} -------------------------------------------------------------------------------- /test/integration/roles/test_uri/files/fail13.json: -------------------------------------------------------------------------------- 1 | {"Numbers cannot be hex": 0x14} -------------------------------------------------------------------------------- /test/integration/roles/test_uri/files/fail14.json: -------------------------------------------------------------------------------- 1 | ["Illegal backslash escape: \x15"] -------------------------------------------------------------------------------- /test/integration/roles/test_uri/files/fail16.json: -------------------------------------------------------------------------------- 1 | ["Illegal backslash escape: \017"] -------------------------------------------------------------------------------- /test/integration/roles/test_uri/files/fail20.json: -------------------------------------------------------------------------------- 1 | {"Comma instead of colon", null} -------------------------------------------------------------------------------- /test/integration/roles/test_uri/files/fail21.json: -------------------------------------------------------------------------------- 1 | ["Colon instead of comma": false] -------------------------------------------------------------------------------- /test/integration/roles/test_win_template/files/foo.txt: -------------------------------------------------------------------------------- 1 | templated_var_loaded 2 | -------------------------------------------------------------------------------- /test/integration/roles/test_win_template/templates/foo.j2: -------------------------------------------------------------------------------- 1 | {{ templated_var }} 2 | -------------------------------------------------------------------------------- /test/samples/roles/test_role/meta/main.yml: -------------------------------------------------------------------------------- 1 | dependencies: 2 | - test_role_dep 3 | -------------------------------------------------------------------------------- /test/utils/shippable/modules/generate-tests-requirements.txt: -------------------------------------------------------------------------------- 1 | jinja2 2 | pyyaml 3 | -------------------------------------------------------------------------------- /.coveragerc: -------------------------------------------------------------------------------- 1 | [report] 2 | omit = 3 | */python?.?/* 4 | */site-packages/nose/* 5 | -------------------------------------------------------------------------------- /docsite/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tes/ansible/devel/docsite/favicon.ico -------------------------------------------------------------------------------- /test/integration/roles/test_apt/meta/main.yml: -------------------------------------------------------------------------------- 1 | dependencies: 2 | - prepare_tests 3 | -------------------------------------------------------------------------------- /test/integration/roles/test_become/files/baz.txt: -------------------------------------------------------------------------------- 1 | testing tilde expansion with become 2 | -------------------------------------------------------------------------------- /test/integration/roles/test_become/vars/default.yml: -------------------------------------------------------------------------------- 1 | become_test_user: ansibletest1 2 | -------------------------------------------------------------------------------- /test/integration/roles/test_ec2/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # tasks file for test_ec2 3 | -------------------------------------------------------------------------------- /test/integration/roles/test_rax_scaling_group/files/test.txt: -------------------------------------------------------------------------------- 1 | this is a test file 2 | -------------------------------------------------------------------------------- /test/integration/roles/test_sudo/files/baz.txt: -------------------------------------------------------------------------------- 1 | testing tilde expansion with sudo 2 | -------------------------------------------------------------------------------- /test/integration/roles/test_uri/files/fail2.json: -------------------------------------------------------------------------------- 1 | {unquoted_key: "keys must be quoted"} -------------------------------------------------------------------------------- /test/integration/roles/test_uri/files/fail25.json: -------------------------------------------------------------------------------- 1 | ["tab\ character\ in\ string\ "] -------------------------------------------------------------------------------- /test/integration/roles/test_win_copy/files/subdir/subdir2/subdir3/subdir4/qux.txt: -------------------------------------------------------------------------------- 1 | qux -------------------------------------------------------------------------------- /test/integration/roles/test_yum/meta/main.yml: -------------------------------------------------------------------------------- 1 | dependencies: 2 | - prepare_tests 3 | -------------------------------------------------------------------------------- /test/integration/roles/test_zypper/meta/main.yml: -------------------------------------------------------------------------------- 1 | dependencies: 2 | - prepare_tests 3 | -------------------------------------------------------------------------------- /test/samples/README.md: -------------------------------------------------------------------------------- 1 | This is a small set of samples used for testing the v2 code. 2 | -------------------------------------------------------------------------------- /test/samples/roles/role_a/tasks/main.yml: -------------------------------------------------------------------------------- 1 | - debug: msg="this is a task from role A" 2 | -------------------------------------------------------------------------------- /test/samples/roles/role_b/tasks/main.yml: -------------------------------------------------------------------------------- 1 | - debug: msg="this is a task from role B" 2 | -------------------------------------------------------------------------------- /test/integration/roles/prepare_win_tests/meta/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | 3 | allow_duplicates: yes 4 | -------------------------------------------------------------------------------- /test/integration/roles/test_async/meta/main.yml: -------------------------------------------------------------------------------- 1 | dependencies: 2 | - prepare_tests 3 | 4 | -------------------------------------------------------------------------------- /test/integration/roles/test_check_mode/vars/main.yml: -------------------------------------------------------------------------------- 1 | templated_var: templated_var_loaded 2 | -------------------------------------------------------------------------------- /test/integration/roles/test_copy/meta/main.yml: -------------------------------------------------------------------------------- 1 | dependencies: 2 | - prepare_tests 3 | 4 | -------------------------------------------------------------------------------- /test/integration/roles/test_ec2/defaults/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # defaults file for test_ec2 3 | -------------------------------------------------------------------------------- /test/integration/roles/test_ec2/handlers/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # handlers file for test_ec2 3 | -------------------------------------------------------------------------------- /test/integration/roles/test_ec2_ami/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # tasks file for test_ec2_ami 3 | -------------------------------------------------------------------------------- /test/integration/roles/test_ec2_ami/vars/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # vars file for test_ec2_ami 3 | -------------------------------------------------------------------------------- /test/integration/roles/test_ec2_eip/vars/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # vars file for test_ec2_eip 3 | -------------------------------------------------------------------------------- /test/integration/roles/test_ec2_tag/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # tasks file for test_ec2_tag 3 | -------------------------------------------------------------------------------- /test/integration/roles/test_ec2_tag/vars/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # vars file for test_ec2_tag 3 | -------------------------------------------------------------------------------- /test/integration/roles/test_ec2_vol/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # tasks file for test_ec2_vol 3 | -------------------------------------------------------------------------------- /test/integration/roles/test_ec2_vol/vars/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # vars file for test_ec2_vol 3 | -------------------------------------------------------------------------------- /test/integration/roles/test_ec2_vpc/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # tasks file for test_ec2_vpc 3 | -------------------------------------------------------------------------------- /test/integration/roles/test_ec2_vpc/vars/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # vars file for test_ec2_vpc 3 | -------------------------------------------------------------------------------- /test/integration/roles/test_fetch/meta/main.yml: -------------------------------------------------------------------------------- 1 | dependencies: 2 | - prepare_tests 3 | 4 | -------------------------------------------------------------------------------- /test/integration/roles/test_file/meta/main.yml: -------------------------------------------------------------------------------- 1 | dependencies: 2 | - prepare_tests 3 | 4 | -------------------------------------------------------------------------------- /test/integration/roles/test_filters/files/9851.txt: -------------------------------------------------------------------------------- 1 | [{ 2 | "k": "Quotes \"'\n" 3 | }] 4 | -------------------------------------------------------------------------------- /test/integration/roles/test_gem/meta/main.yml: -------------------------------------------------------------------------------- 1 | dependencies: 2 | - prepare_tests 3 | 4 | -------------------------------------------------------------------------------- /test/integration/roles/test_git/meta/main.yml: -------------------------------------------------------------------------------- 1 | dependencies: 2 | - prepare_tests 3 | 4 | -------------------------------------------------------------------------------- /test/integration/roles/test_hg/meta/main.yml: -------------------------------------------------------------------------------- 1 | dependencies: 2 | - prepare_tests 3 | 4 | -------------------------------------------------------------------------------- /test/integration/roles/test_includes/handlers/main.yml: -------------------------------------------------------------------------------- 1 | - include: more_handlers.yml 2 | 3 | -------------------------------------------------------------------------------- /test/integration/roles/test_lineinfile/files/testnoeof.txt: -------------------------------------------------------------------------------- 1 | This is line 1 2 | This is line 2 -------------------------------------------------------------------------------- /test/integration/roles/test_mysql_db/meta/main.yml: -------------------------------------------------------------------------------- 1 | dependencies: 2 | - setup_mysql_db 3 | -------------------------------------------------------------------------------- /test/integration/roles/test_mysql_user/meta/main.yml: -------------------------------------------------------------------------------- 1 | dependencies: 2 | - setup_mysql_db 3 | -------------------------------------------------------------------------------- /test/integration/roles/test_pip/meta/main.yml: -------------------------------------------------------------------------------- 1 | dependencies: 2 | - prepare_tests 3 | 4 | -------------------------------------------------------------------------------- /test/integration/roles/test_script/files/remove_afile.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | rm "$1" -------------------------------------------------------------------------------- /test/integration/roles/test_script/files/test.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | echo -n "win" -------------------------------------------------------------------------------- /test/integration/roles/test_stat/meta/main.yml: -------------------------------------------------------------------------------- 1 | dependencies: 2 | - prepare_tests 3 | 4 | -------------------------------------------------------------------------------- /test/integration/roles/test_uri/files/fail12.json: -------------------------------------------------------------------------------- 1 | {"Numbers cannot have leading zeroes": 013} -------------------------------------------------------------------------------- /test/integration/roles/test_uri/files/fail17.json: -------------------------------------------------------------------------------- 1 | {"Comma instead if closing brace": true, -------------------------------------------------------------------------------- /test/integration/test_blocks/fail.yml: -------------------------------------------------------------------------------- 1 | - name: EXPECTED FAILURE 2 | fail: msg="{{msg}}" 3 | -------------------------------------------------------------------------------- /test/utils/shippable/sanity-requirements.txt: -------------------------------------------------------------------------------- 1 | tox 2 | pyyaml 3 | jinja2 4 | setuptools 5 | -------------------------------------------------------------------------------- /docsite/_static/file.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tes/ansible/devel/docsite/_static/file.png -------------------------------------------------------------------------------- /docsite/_static/minus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tes/ansible/devel/docsite/_static/minus.png -------------------------------------------------------------------------------- /docsite/_static/plus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tes/ansible/devel/docsite/_static/plus.png -------------------------------------------------------------------------------- /hacking/update.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | git pull --rebase 3 | git submodule update --init --recursive 4 | -------------------------------------------------------------------------------- /test/integration/roles/setup_ec2/defaults/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | resource_prefix: 'ansible-testing-' 3 | -------------------------------------------------------------------------------- /test/integration/roles/test_apt_repository/meta/main.yml: -------------------------------------------------------------------------------- 1 | dependencies: 2 | - prepare_tests 3 | -------------------------------------------------------------------------------- /test/integration/roles/test_authorized_key/meta/main.yml: -------------------------------------------------------------------------------- 1 | dependencies: 2 | - prepare_tests 3 | -------------------------------------------------------------------------------- /test/integration/roles/test_binary/meta/main.yml: -------------------------------------------------------------------------------- 1 | dependencies: 2 | - prepare_tests 3 | 4 | -------------------------------------------------------------------------------- /test/integration/roles/test_binary/templates/from_playbook_template.j2: -------------------------------------------------------------------------------- 1 | {{ simple_accents }} 2 | -------------------------------------------------------------------------------- /test/integration/roles/test_check_mode/meta/main.yml: -------------------------------------------------------------------------------- 1 | dependencies: 2 | - prepare_tests 3 | 4 | -------------------------------------------------------------------------------- /test/integration/roles/test_command_shell/files/test.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | echo -n "win" -------------------------------------------------------------------------------- /test/integration/roles/test_cs_common/defaults/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | cs_resource_prefix: cloudstack 3 | -------------------------------------------------------------------------------- /test/integration/roles/test_cs_iso/meta/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | dependencies: 3 | - test_cs_common 4 | -------------------------------------------------------------------------------- /test/integration/roles/test_cs_pod/meta/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | dependencies: 3 | - test_cs_common 4 | -------------------------------------------------------------------------------- /test/integration/roles/test_cs_user/meta/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | dependencies: 3 | - test_cs_common 4 | -------------------------------------------------------------------------------- /test/integration/roles/test_ec2_ami/defaults/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # defaults file for test_ec2_ami 3 | -------------------------------------------------------------------------------- /test/integration/roles/test_ec2_elb/defaults/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # defaults file for test_ec2_elb 3 | -------------------------------------------------------------------------------- /test/integration/roles/test_ec2_elb_lb/vars/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # vars file for test_ec2_elb_lb 3 | -------------------------------------------------------------------------------- /test/integration/roles/test_ec2_facts/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # tasks file for test_ec2_facts 3 | -------------------------------------------------------------------------------- /test/integration/roles/test_ec2_facts/vars/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # vars file for test_ec2_facts 3 | -------------------------------------------------------------------------------- /test/integration/roles/test_ec2_tag/defaults/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # defaults file for test_ec2_tag 3 | -------------------------------------------------------------------------------- /test/integration/roles/test_ec2_vol/defaults/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # defaults file for test_ec2_vol 3 | -------------------------------------------------------------------------------- /test/integration/roles/test_ec2_vpc/defaults/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # defaults file for test_ec2_vpc 3 | -------------------------------------------------------------------------------- /test/integration/roles/test_facts_d/meta/main.yml: -------------------------------------------------------------------------------- 1 | dependencies: 2 | - prepare_tests 3 | 4 | -------------------------------------------------------------------------------- /test/integration/roles/test_filters/meta/main.yml: -------------------------------------------------------------------------------- 1 | dependencies: 2 | - prepare_tests 3 | 4 | -------------------------------------------------------------------------------- /test/integration/roles/test_good_parsing/vars/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | variable_module_name: debug 3 | -------------------------------------------------------------------------------- /test/integration/roles/test_iterators/meta/main.yml: -------------------------------------------------------------------------------- 1 | dependencies: 2 | - prepare_tests 3 | 4 | -------------------------------------------------------------------------------- /test/integration/roles/test_mysql_variables/meta/main.yml: -------------------------------------------------------------------------------- 1 | dependencies: 2 | - setup_mysql_db 3 | -------------------------------------------------------------------------------- /test/integration/roles/test_script/meta/main.yml: -------------------------------------------------------------------------------- 1 | dependencies: 2 | - prepare_tests 3 | 4 | -------------------------------------------------------------------------------- /test/integration/roles/test_subversion/meta/main.yml: -------------------------------------------------------------------------------- 1 | dependencies: 2 | - prepare_tests 3 | 4 | -------------------------------------------------------------------------------- /test/integration/roles/test_template/meta/main.yml: -------------------------------------------------------------------------------- 1 | dependencies: 2 | - prepare_tests 3 | 4 | -------------------------------------------------------------------------------- /test/integration/roles/test_unarchive/meta/main.yml: -------------------------------------------------------------------------------- 1 | dependencies: 2 | - prepare_tests 3 | 4 | -------------------------------------------------------------------------------- /test/integration/roles/test_uri/files/pass4.json: -------------------------------------------------------------------------------- 1 | [[[[[[[[[[[[[[[[[[[["Too deep"]]]]]]]]]]]]]]]]]]]] -------------------------------------------------------------------------------- /test/integration/roles/test_win_lineinfile/files/testnoeof.txt: -------------------------------------------------------------------------------- 1 | This is line 1 2 | This is line 2 -------------------------------------------------------------------------------- /test/integration/roles/test_win_regmerge/vars/main.yml: -------------------------------------------------------------------------------- 1 | templated_var: templated_var_loaded 2 | -------------------------------------------------------------------------------- /test/integration/roles/test_win_template/vars/main.yml: -------------------------------------------------------------------------------- 1 | templated_var: templated_var_loaded 2 | -------------------------------------------------------------------------------- /test/samples/roles/common/tasks/main.yml: -------------------------------------------------------------------------------- 1 | - debug: msg="this is a task from the common role" 2 | -------------------------------------------------------------------------------- /test/samples/test_playbook.include: -------------------------------------------------------------------------------- 1 | - include: included_playbook.yml a=1 2 | tags: include 3 | -------------------------------------------------------------------------------- /test/utils/ansible-playbook_integration_runner/inventory: -------------------------------------------------------------------------------- 1 | localhost ansible_connection=local 2 | -------------------------------------------------------------------------------- /docsite/_static/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tes/ansible/devel/docsite/_static/favicon.ico -------------------------------------------------------------------------------- /packaging/gentoo/README.md: -------------------------------------------------------------------------------- 1 | Gentoo ebuilds are available in the main tree: 2 | 3 | emerge ansible 4 | -------------------------------------------------------------------------------- /test/integration/group_vars/amazon: -------------------------------------------------------------------------------- 1 | --- 2 | ec2_url: ec2.amazonaws.com 3 | ec2_region: us-east-1 4 | -------------------------------------------------------------------------------- /test/integration/roles/test_apache2_module/meta/main.yml: -------------------------------------------------------------------------------- 1 | dependencies: 2 | - prepare_tests 3 | 4 | -------------------------------------------------------------------------------- /test/integration/roles/test_bad_parsing/meta/main.yml: -------------------------------------------------------------------------------- 1 | dependencies: 2 | - { role: prepare_tests } 3 | -------------------------------------------------------------------------------- /test/integration/roles/test_changed_when/meta/main.yml: -------------------------------------------------------------------------------- 1 | dependencies: 2 | - prepare_tests 3 | 4 | -------------------------------------------------------------------------------- /test/integration/roles/test_command_shell/files/remove_afile.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | rm "$1" -------------------------------------------------------------------------------- /test/integration/roles/test_command_shell/meta/main.yml: -------------------------------------------------------------------------------- 1 | dependencies: 2 | - prepare_tests 3 | 4 | -------------------------------------------------------------------------------- /test/integration/roles/test_cs_account/meta/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | dependencies: 3 | - test_cs_common 4 | -------------------------------------------------------------------------------- /test/integration/roles/test_cs_cluster/meta/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | dependencies: 3 | - test_cs_common 4 | -------------------------------------------------------------------------------- /test/integration/roles/test_cs_domain/meta/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | dependencies: 3 | - test_cs_common 4 | -------------------------------------------------------------------------------- /test/integration/roles/test_cs_firewall/meta/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | dependencies: 3 | - test_cs_common 4 | -------------------------------------------------------------------------------- /test/integration/roles/test_cs_instance/meta/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | dependencies: 3 | - test_cs_common 4 | -------------------------------------------------------------------------------- /test/integration/roles/test_cs_project/meta/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | dependencies: 3 | - test_cs_common 4 | -------------------------------------------------------------------------------- /test/integration/roles/test_cs_volume/meta/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | dependencies: 3 | - test_cs_common 4 | -------------------------------------------------------------------------------- /test/integration/roles/test_ec2/meta/main.yml: -------------------------------------------------------------------------------- 1 | dependencies: 2 | - prepare_tests 3 | - setup_ec2 4 | -------------------------------------------------------------------------------- /test/integration/roles/test_ec2_facts/defaults/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # defaults file for test_ec2_facts 3 | -------------------------------------------------------------------------------- /test/integration/roles/test_handlers_meta/meta/main.yml: -------------------------------------------------------------------------------- 1 | dependencies: 2 | - prepare_tests 3 | 4 | -------------------------------------------------------------------------------- /test/integration/roles/test_ignore_errors/meta/main.yml: -------------------------------------------------------------------------------- 1 | dependencies: 2 | - prepare_tests 3 | 4 | -------------------------------------------------------------------------------- /test/integration/roles/test_include_vars/vars/all/all.yml: -------------------------------------------------------------------------------- 1 | --- 2 | testing: 123 3 | base_dir: all 4 | -------------------------------------------------------------------------------- /test/integration/roles/test_script/files/create_afile.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | echo "win" > "$1" -------------------------------------------------------------------------------- /test/integration/roles/test_special_vars/meta/main.yml: -------------------------------------------------------------------------------- 1 | dependencies: 2 | - prepare_tests 3 | 4 | -------------------------------------------------------------------------------- /test/integration/roles/test_synchronize/meta/main.yml: -------------------------------------------------------------------------------- 1 | dependencies: 2 | - prepare_tests 3 | 4 | -------------------------------------------------------------------------------- /test/integration/roles/test_uri/files/pass1.json: -------------------------------------------------------------------------------- 1 | [[[[[[[[[[[[[[[[[[["Not too deep"]]]]]]]]]]]]]]]]]]] -------------------------------------------------------------------------------- /test/integration/roles/test_var_blending/meta/main.yml: -------------------------------------------------------------------------------- 1 | dependencies: 2 | - prepare_tests 3 | 4 | -------------------------------------------------------------------------------- /test/integration/roles/test_win_copy/meta/main.yml: -------------------------------------------------------------------------------- 1 | dependencies: 2 | - prepare_win_tests 3 | 4 | -------------------------------------------------------------------------------- /test/integration/roles/test_win_file/meta/main.yml: -------------------------------------------------------------------------------- 1 | dependencies: 2 | - prepare_win_tests 3 | 4 | -------------------------------------------------------------------------------- /test/integration/roles/test_win_regedit/meta/main.yml: -------------------------------------------------------------------------------- 1 | dependencies: 2 | - prepare_win_tests 3 | 4 | -------------------------------------------------------------------------------- /test/integration/roles/test_zypper_repository/meta/main.yml: -------------------------------------------------------------------------------- 1 | dependencies: 2 | - prepare_tests 3 | -------------------------------------------------------------------------------- /test/samples/roles/test_role_dep/tasks/main.yml: -------------------------------------------------------------------------------- 1 | - debug: msg="here we are in the role dependency" 2 | -------------------------------------------------------------------------------- /test/units/inventory_test_data/group_vars/parse/all.yml: -------------------------------------------------------------------------------- 1 | --- 2 | YAML_FILENAME_EXTENSIONS_TEST: True 3 | -------------------------------------------------------------------------------- /test/utils/ansible-playbook_integration_runner/ansible.cfg: -------------------------------------------------------------------------------- 1 | [defaults] 2 | host_key_checking = False 3 | -------------------------------------------------------------------------------- /test/integration/roles/ec2_elb_instance_setup/defaults/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # defaults for ec2_elb_setup 3 | -------------------------------------------------------------------------------- /test/integration/roles/test_binary/templates/b64_utf8_template.j2: -------------------------------------------------------------------------------- 1 | {{ utf8_simple_accents|b64decode }} 2 | -------------------------------------------------------------------------------- /test/integration/roles/test_cs_affinitygroup/meta/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | dependencies: 3 | - test_cs_common 4 | -------------------------------------------------------------------------------- /test/integration/roles/test_cs_configuration/meta/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | dependencies: 3 | - test_cs_common 4 | -------------------------------------------------------------------------------- /test/integration/roles/test_cs_instance_facts/meta/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | dependencies: 3 | - test_cs_common 4 | -------------------------------------------------------------------------------- /test/integration/roles/test_cs_instancegroup/meta/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | dependencies: 3 | - test_cs_common 4 | -------------------------------------------------------------------------------- /test/integration/roles/test_cs_portforward/meta/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | dependencies: 3 | - test_cs_common 4 | -------------------------------------------------------------------------------- /test/integration/roles/test_cs_resourcelimit/meta/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | dependencies: 3 | - test_cs_common 4 | -------------------------------------------------------------------------------- /test/integration/roles/test_cs_securitygroup/meta/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | dependencies: 3 | - test_cs_common 4 | -------------------------------------------------------------------------------- /test/integration/roles/test_cs_sshkeypair/meta/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | dependencies: 3 | - test_cs_common 4 | -------------------------------------------------------------------------------- /test/integration/roles/test_cs_vmsnapshot/meta/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | dependencies: 3 | - test_cs_common 4 | -------------------------------------------------------------------------------- /test/integration/roles/test_ec2_ami/meta/main.yml: -------------------------------------------------------------------------------- 1 | dependencies: 2 | - prepare_tests 3 | - setup_ec2 4 | -------------------------------------------------------------------------------- /test/integration/roles/test_ec2_eip/meta/main.yml: -------------------------------------------------------------------------------- 1 | dependencies: 2 | - prepare_tests 3 | - setup_ec2 4 | -------------------------------------------------------------------------------- /test/integration/roles/test_ec2_key/meta/main.yml: -------------------------------------------------------------------------------- 1 | dependencies: 2 | - prepare_tests 3 | - setup_ec2 4 | -------------------------------------------------------------------------------- /test/integration/roles/test_ec2_tag/meta/main.yml: -------------------------------------------------------------------------------- 1 | dependencies: 2 | - prepare_tests 3 | - setup_ec2 4 | -------------------------------------------------------------------------------- /test/integration/roles/test_ec2_vol/meta/main.yml: -------------------------------------------------------------------------------- 1 | dependencies: 2 | - prepare_tests 3 | - setup_ec2 4 | -------------------------------------------------------------------------------- /test/integration/roles/test_ec2_vpc/meta/main.yml: -------------------------------------------------------------------------------- 1 | dependencies: 2 | - prepare_tests 3 | - setup_ec2 4 | -------------------------------------------------------------------------------- /test/integration/roles/test_good_parsing/tasks/test_include.yml: -------------------------------------------------------------------------------- 1 | - set_fact: "{{fact_name}}='{{param}}'" 2 | -------------------------------------------------------------------------------- /test/integration/roles/test_include_vars/defaults/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | testing: 1 3 | base_dir: defaults 4 | -------------------------------------------------------------------------------- /test/integration/roles/test_lookups/vars/main.yml: -------------------------------------------------------------------------------- 1 | mydict: 2 | mykey1: myval1 3 | mykey2: myval2 4 | -------------------------------------------------------------------------------- /test/integration/roles/test_postgresql/meta/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | dependencies: 3 | - setup_postgresql_db 4 | -------------------------------------------------------------------------------- /test/integration/roles/test_uri/files/fail9.json: -------------------------------------------------------------------------------- 1 | {"Extra value after close": true} "misplaced quoted value" -------------------------------------------------------------------------------- /test/integration/roles/test_uri/files/pass3.json: -------------------------------------------------------------------------------- 1 | "A JSON payload should be an object or array, not a string." -------------------------------------------------------------------------------- /test/integration/roles/test_win_lineinfile/meta/main.yml: -------------------------------------------------------------------------------- 1 | dependencies: 2 | - prepare_win_tests 3 | 4 | -------------------------------------------------------------------------------- /test/integration/roles/test_win_regmerge/meta/main.yml: -------------------------------------------------------------------------------- 1 | dependencies: 2 | - prepare_win_tests 3 | 4 | -------------------------------------------------------------------------------- /test/integration/roles/test_win_template/meta/main.yml: -------------------------------------------------------------------------------- 1 | dependencies: 2 | - prepare_win_tests 3 | 4 | -------------------------------------------------------------------------------- /test/integration/vars/test_hash_vars.yml: -------------------------------------------------------------------------------- 1 | --- 2 | test_hash: 3 | vars_file: "this is in a vars_file" 4 | -------------------------------------------------------------------------------- /test/samples/l1_include.yml: -------------------------------------------------------------------------------- 1 | - debug: msg="this is the l1 include" 2 | - include: common_include.yml 3 | 4 | -------------------------------------------------------------------------------- /test/samples/test_big_debug.yml: -------------------------------------------------------------------------------- 1 | - hosts: all 2 | gather_facts: no 3 | tasks: 4 | - debug: msg="hi" 5 | -------------------------------------------------------------------------------- /test/units/inventory_test_data/group_vars/noparse/all.yml~: -------------------------------------------------------------------------------- 1 | --- 2 | YAML_FILENAME_EXTENSIONS_TEST: False 3 | -------------------------------------------------------------------------------- /test/units/inventory_test_data/group_vars/noparse/file.txt: -------------------------------------------------------------------------------- 1 | --- 2 | YAML_FILENAME_EXTENSIONS_TEST: False 3 | -------------------------------------------------------------------------------- /docsite/_static/subtle_dots.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tes/ansible/devel/docsite/_static/subtle_dots.png -------------------------------------------------------------------------------- /test/integration/roles/test_binary/templates/b64_latin1_template.j2: -------------------------------------------------------------------------------- 1 | {{ latin1_simple_accents|b64decode }} 2 | -------------------------------------------------------------------------------- /test/integration/roles/test_command_shell/files/create_afile.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | echo "win" > "$1" -------------------------------------------------------------------------------- /test/integration/roles/test_cs_loadbalancer_rule/meta/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | dependencies: 3 | - test_cs_common 4 | -------------------------------------------------------------------------------- /test/integration/roles/test_cs_securitygroup_rule/meta/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | dependencies: 3 | - test_cs_common 4 | -------------------------------------------------------------------------------- /test/integration/roles/test_ec2_elb_lb/meta/main.yml: -------------------------------------------------------------------------------- 1 | dependencies: 2 | - prepare_tests 3 | - setup_ec2 4 | -------------------------------------------------------------------------------- /test/integration/roles/test_ec2_facts/meta/main.yml: -------------------------------------------------------------------------------- 1 | dependencies: 2 | - prepare_tests 3 | - setup_ec2 4 | -------------------------------------------------------------------------------- /test/integration/roles/test_ec2_group/meta/main.yml: -------------------------------------------------------------------------------- 1 | dependencies: 2 | - prepare_tests 3 | - setup_ec2 4 | -------------------------------------------------------------------------------- /test/integration/roles/test_rax/meta/main.yml: -------------------------------------------------------------------------------- 1 | dependencies: 2 | - prepare_tests 3 | - prepare_rax_tests 4 | -------------------------------------------------------------------------------- /test/integration/roles/test_uri/meta/main.yml: -------------------------------------------------------------------------------- 1 | dependencies: 2 | - prepare_tests 3 | - prepare_http_tests 4 | -------------------------------------------------------------------------------- /test/integration/roles/test_var_precedence_role1/meta/main.yml: -------------------------------------------------------------------------------- 1 | dependencies: 2 | - test_var_precedence_dep 3 | -------------------------------------------------------------------------------- /test/integration/roles/test_win_script/files/test_script.bat: -------------------------------------------------------------------------------- 1 | @ECHO OFF 2 | ECHO We can even run a batch file! 3 | -------------------------------------------------------------------------------- /test/integration/test_blocks/nested_fail.yml: -------------------------------------------------------------------------------- 1 | - include: fail.yml 2 | args: 3 | msg: "nested {{msg}}" 4 | -------------------------------------------------------------------------------- /test/samples/hosts: -------------------------------------------------------------------------------- 1 | testing ansible_connection=local ansible_ssh_host=192.168.122.100 ansible_ssh_user=testing 2 | -------------------------------------------------------------------------------- /test/samples/src: -------------------------------------------------------------------------------- 1 | num_retries: 2 2 | frag 1 3 | frag 2 4 | frag 3 5 | vars_file_var: "this is in a vars file" 6 | -------------------------------------------------------------------------------- /test/utils/docker/httptester/services.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | gunicorn -D httpbin:app 3 | nginx -g "daemon off;" 4 | -------------------------------------------------------------------------------- /docs-api/modules.rst: -------------------------------------------------------------------------------- 1 | Ansible api 2 | =========== 3 | 4 | .. toctree:: 5 | :maxdepth: 7 6 | 7 | ansible 8 | -------------------------------------------------------------------------------- /test/integration/roles/ec2_provision_instances/meta/main.yml: -------------------------------------------------------------------------------- 1 | dependencies: 2 | - prepare_tests 3 | - setup_ec2 4 | -------------------------------------------------------------------------------- /test/integration/roles/test_docker/files/docker-registry.htpasswd: -------------------------------------------------------------------------------- 1 | testdocker:$apr1$6cYd3tA9$4Dc9/I5Z.bl8/br8O/6B41 2 | -------------------------------------------------------------------------------- /test/integration/roles/test_good_parsing/tasks/test_include_conditional.yml: -------------------------------------------------------------------------------- 1 | - include: test_include_nested.yml 2 | -------------------------------------------------------------------------------- /test/integration/roles/test_rax_cbs/meta/main.yml: -------------------------------------------------------------------------------- 1 | dependencies: 2 | - prepare_tests 3 | - prepare_rax_tests 4 | -------------------------------------------------------------------------------- /test/integration/roles/test_rax_cdb/meta/main.yml: -------------------------------------------------------------------------------- 1 | dependencies: 2 | - prepare_tests 3 | - prepare_rax_tests 4 | -------------------------------------------------------------------------------- /test/integration/roles/test_rax_clb/meta/main.yml: -------------------------------------------------------------------------------- 1 | dependencies: 2 | - prepare_tests 3 | - prepare_rax_tests 4 | -------------------------------------------------------------------------------- /test/integration/roles/test_rax_facts/meta/main.yml: -------------------------------------------------------------------------------- 1 | dependencies: 2 | - prepare_tests 3 | - prepare_rax_tests 4 | -------------------------------------------------------------------------------- /test/integration/roles/test_rax_meta/meta/main.yml: -------------------------------------------------------------------------------- 1 | dependencies: 2 | - prepare_tests 3 | - prepare_rax_tests 4 | -------------------------------------------------------------------------------- /test/integration/test_setup.yml: -------------------------------------------------------------------------------- 1 | - hosts: testhost 2 | gather_facts: False 3 | roles: 4 | - test_setup 5 | 6 | -------------------------------------------------------------------------------- /test/samples/roles/test_become_r2/meta/main.yml: -------------------------------------------------------------------------------- 1 | allow_duplicates: yes 2 | dependencies: 3 | - test_become_r1 4 | -------------------------------------------------------------------------------- /test/utils/ansible-playbook_integration_runner/roles/ansible_test_deps/vars/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # vars file for . 3 | -------------------------------------------------------------------------------- /test/integration/group_vars/local: -------------------------------------------------------------------------------- 1 | tres: 'three' 2 | hash_test: 3 | group_vars_local: "this is in group_vars/local" 4 | -------------------------------------------------------------------------------- /test/integration/roles/test_get_url/meta/main.yml: -------------------------------------------------------------------------------- 1 | dependencies: 2 | - prepare_tests 3 | - prepare_http_tests 4 | 5 | -------------------------------------------------------------------------------- /test/integration/roles/test_lookups/meta/main.yml: -------------------------------------------------------------------------------- 1 | dependencies: 2 | - prepare_tests 3 | - prepare_http_tests 4 | 5 | -------------------------------------------------------------------------------- /test/integration/roles/test_rax_clb_nodes/meta/main.yml: -------------------------------------------------------------------------------- 1 | dependencies: 2 | - prepare_tests 3 | - prepare_rax_tests 4 | -------------------------------------------------------------------------------- /test/integration/roles/test_rax_identity/meta/main.yml: -------------------------------------------------------------------------------- 1 | dependencies: 2 | - prepare_tests 3 | - prepare_rax_tests 4 | -------------------------------------------------------------------------------- /test/integration/roles/test_rax_keypair/meta/main.yml: -------------------------------------------------------------------------------- 1 | dependencies: 2 | - prepare_tests 3 | - prepare_rax_tests 4 | -------------------------------------------------------------------------------- /test/integration/roles/test_rax_network/meta/main.yml: -------------------------------------------------------------------------------- 1 | dependencies: 2 | - prepare_tests 3 | - prepare_rax_tests 4 | -------------------------------------------------------------------------------- /test/integration/roles/test_template/templates/foo.j2: -------------------------------------------------------------------------------- 1 | {{ templated_var }} 2 | 3 | {{ templated_dict | to_nice_json }} 4 | -------------------------------------------------------------------------------- /test/samples/localhost_include.yml: -------------------------------------------------------------------------------- 1 | - debug: msg="this is the localhost include" 2 | - include: common_include.yml 3 | 4 | -------------------------------------------------------------------------------- /test/samples/test_big_ping.yml: -------------------------------------------------------------------------------- 1 | - hosts: all 2 | gather_facts: no 3 | tasks: 4 | #- debug: msg="hi" 5 | - ping: 6 | -------------------------------------------------------------------------------- /test/utils/ansible-playbook_integration_runner/roles/ansible_test_deps/defaults/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # defaults file for . 3 | -------------------------------------------------------------------------------- /test/utils/ansible-playbook_integration_runner/roles/ansible_test_deps/handlers/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # handlers file for . 3 | -------------------------------------------------------------------------------- /docsite/modules.js: -------------------------------------------------------------------------------- 1 | function AnsibleModules($scope) { 2 | $scope.modules = []; 3 | 4 | $scope.orderProp = "module"; 5 | } -------------------------------------------------------------------------------- /packaging/debian/ansible.dirs: -------------------------------------------------------------------------------- 1 | etc/ansible 2 | etc/ansible/roles 3 | usr/lib/python2.7/site-packages 4 | usr/share/ansible 5 | -------------------------------------------------------------------------------- /test/integration/roles/test_cloudflare_dns/defaults/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | cloudflare_dns_record: "{{ resource_prefix|lower }}" 3 | -------------------------------------------------------------------------------- /test/integration/roles/test_rax_cbs_attachments/meta/main.yml: -------------------------------------------------------------------------------- 1 | dependencies: 2 | - prepare_tests 3 | - prepare_rax_tests 4 | -------------------------------------------------------------------------------- /test/integration/roles/test_rax_cdb_database/meta/main.yml: -------------------------------------------------------------------------------- 1 | dependencies: 2 | - prepare_tests 3 | - prepare_rax_tests 4 | -------------------------------------------------------------------------------- /test/integration/roles/test_rax_scaling_group/meta/main.yml: -------------------------------------------------------------------------------- 1 | dependencies: 2 | - prepare_tests 3 | - prepare_rax_tests 4 | -------------------------------------------------------------------------------- /test/integration/test_blocks/nested_nested_fail.yml: -------------------------------------------------------------------------------- 1 | - include: nested_fail.yml 2 | args: 3 | msg: "nested {{msg}}" 4 | -------------------------------------------------------------------------------- /test/samples/localhosts: -------------------------------------------------------------------------------- 1 | l1 ansible_ssh_host=127.0.0.1 2 | l2 ansible_ssh_host=127.0.0.2 3 | l3 ansible_ssh_host=127.0.0.3 4 | -------------------------------------------------------------------------------- /test/utils/ansible-playbook_integration_runner/roles/ansible_test_deps/test/inventory: -------------------------------------------------------------------------------- 1 | localhost ansible_connection=local 2 | -------------------------------------------------------------------------------- /test/utils/ansible-playbook_integration_runner/roles/ansible_test_deps/test/roles/ansible_test_deps: -------------------------------------------------------------------------------- 1 | ../../../ansible_test_deps -------------------------------------------------------------------------------- /lib/ansible/galaxy/data/test_playbook.j2: -------------------------------------------------------------------------------- 1 | --- 2 | - hosts: localhost 3 | remote_user: root 4 | roles: 5 | - {{ role_name }} -------------------------------------------------------------------------------- /test/integration/roles/ec2_provision_instances/defaults/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # defaults file for ec2_provision_isntances 3 | count: 1 4 | -------------------------------------------------------------------------------- /test/integration/roles/test_includes/tasks/not_a_role_task.yml: -------------------------------------------------------------------------------- 1 | - set_fact: 2 | ca: 33000 3 | cb: 33001 4 | cc: 33002 5 | -------------------------------------------------------------------------------- /test/integration/roles/test_win_script/files/test_script.cmd: -------------------------------------------------------------------------------- 1 | @ECHO OFF 2 | ECHO We can even run a batch file with cmd extension! 3 | -------------------------------------------------------------------------------- /test/integration/galaxy_playbook_git.yml: -------------------------------------------------------------------------------- 1 | - hosts: localhost 2 | connection: local 3 | 4 | roles: 5 | - "git-ansible-galaxy" 6 | -------------------------------------------------------------------------------- /test/integration/roles/test_cs_firewall/defaults/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | cs_firewall_ip_address: 10.100.212.5 3 | cs_firewall_network: test 4 | -------------------------------------------------------------------------------- /test/integration/roles/test_ec2_eip/defaults/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # defaults file for test_ec2_eip 3 | tag_prefix: '{{resource_prefix}}' 4 | -------------------------------------------------------------------------------- /test/integration/roles/test_ec2_key/defaults/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # defaults file for test_ec2_key 3 | ec2_key_name: '{{resource_prefix}}' 4 | -------------------------------------------------------------------------------- /test/integration/test_includes.yml: -------------------------------------------------------------------------------- 1 | - include: test_includes2.yml parameter1=asdf parameter2=jkl 2 | 3 | - include: test_includes3.yml 4 | -------------------------------------------------------------------------------- /test/samples/roles/test_role/tasks/main.yml: -------------------------------------------------------------------------------- 1 | - debug: msg="here we are in the role, foo={{foo}}" 2 | - fail: 3 | when: foo != "bar" 4 | -------------------------------------------------------------------------------- /test/integration/roles/ec2_elb_instance_setup/files/index.html: -------------------------------------------------------------------------------- 1 | 2 | Hi! 3 | 4 | Hello! 5 | 6 | 7 | -------------------------------------------------------------------------------- /test/integration/roles/test_ec2_elb_lb/defaults/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # defaults file for test_ec2_eip 3 | tag_prefix: '{{resource_prefix}}' 4 | -------------------------------------------------------------------------------- /test/integration/roles/test_force_handlers/handlers/main.yml: -------------------------------------------------------------------------------- 1 | - name: echoing handler 2 | command: echo CALLED_HANDLER_{{ inventory_hostname }} -------------------------------------------------------------------------------- /test/integration/roles/test_include_vars/vars/services/webapp.yml: -------------------------------------------------------------------------------- 1 | --- 2 | testing: 456 3 | base_dir: services 4 | webapp_containers: 10 5 | -------------------------------------------------------------------------------- /test/integration/roles/test_win_script/files/test_script_creates_file.ps1: -------------------------------------------------------------------------------- 1 | # Test script to create a file. 2 | 3 | echo $null > $args[0] 4 | -------------------------------------------------------------------------------- /test/integration/test_vault.yml: -------------------------------------------------------------------------------- 1 | - hosts: testhost 2 | gather_facts: False 3 | roles: 4 | - { role: test_vault, tags: test_vault} 5 | -------------------------------------------------------------------------------- /docsite/_themes/srtd/static/images/logo_invert.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tes/ansible/devel/docsite/_themes/srtd/static/images/logo_invert.png -------------------------------------------------------------------------------- /test/integration/inventory.group_by: -------------------------------------------------------------------------------- 1 | [lamini] 2 | alpaca genus=vicugna 3 | llama genus=lama 4 | 5 | [lamini:vars] 6 | ansible_connection=local 7 | -------------------------------------------------------------------------------- /test/integration/roles/test_filters/templates/py26json.j2: -------------------------------------------------------------------------------- 1 | Provoke a python2.6 json bug 2 | {{ hostvars[inventory_hostname] | to_nice_json }} 3 | -------------------------------------------------------------------------------- /test/integration/roles/test_good_parsing/tasks/test_include_nested.yml: -------------------------------------------------------------------------------- 1 | - name: set the nested include fact 2 | set_fact: nested_include_var=1 3 | -------------------------------------------------------------------------------- /test/integration/roles/test_include_vars/vars/environments/development/all.yml: -------------------------------------------------------------------------------- 1 | --- 2 | testing: 789 3 | base_dir: 'environments/development' 4 | -------------------------------------------------------------------------------- /test/integration/roles/test_var_blending/vars/more_vars.yml: -------------------------------------------------------------------------------- 1 | badwolf: badwolf 2 | 3 | same_value_as_var_name_var: "same_value_as_var_name_var" 4 | -------------------------------------------------------------------------------- /test/integration/roles/test_win_script/files/test_script_removes_file.ps1: -------------------------------------------------------------------------------- 1 | # Test script to remove a file. 2 | 3 | Remove-Item $args[0] -Force 4 | -------------------------------------------------------------------------------- /test/integration/test_filters.yml: -------------------------------------------------------------------------------- 1 | - hosts: testhost 2 | connection: local 3 | gather_facts: yes 4 | roles: 5 | - { role: test_filters } 6 | -------------------------------------------------------------------------------- /test/integration/test_include_vars.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - hosts: 127.0.0.1 3 | gather_facts: False 4 | roles: 5 | - { role: test_include_vars } 6 | -------------------------------------------------------------------------------- /test/samples/l2_include.yml: -------------------------------------------------------------------------------- 1 | - debug: msg="this is the l2 include" 2 | - debug: msg="a second task for l2" 3 | - include: common_include.yml 4 | 5 | -------------------------------------------------------------------------------- /test/samples/test_run_once.yml: -------------------------------------------------------------------------------- 1 | - hosts: all 2 | gather_facts: no 3 | tasks: 4 | - ping: 5 | run_once: yes 6 | - add_host: name=foo 7 | -------------------------------------------------------------------------------- /test/integration/lookup_paths/roles/showfile/tasks/main.yml: -------------------------------------------------------------------------------- 1 | - name: relative to role 2 | set_fact: role_result="{{lookup('file', 'testfile')}}" 3 | -------------------------------------------------------------------------------- /test/integration/unicode-test-script: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | echo "Non-ascii arguments:" 4 | echo $@ 5 | 6 | echo "Non-ascii Env var:" 7 | echo $option 8 | -------------------------------------------------------------------------------- /test/samples/lookup_pipe.yml: -------------------------------------------------------------------------------- 1 | - hosts: localhost 2 | gather_facts: no 3 | tasks: 4 | - debug: msg="the date is {{ lookup('pipe', 'date') }}" 5 | -------------------------------------------------------------------------------- /test/units/mock/path.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | def mock_unfrackpath_noop(path): 4 | ''' Do not expand the path ''' 5 | return path 6 | -------------------------------------------------------------------------------- /test/integration/roles/test_var_precedence_inven_override/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - debug: var=foo 3 | - assert: 4 | that: 5 | - 'foo == "bar"' 6 | -------------------------------------------------------------------------------- /docs-api/docs-requirements.txt: -------------------------------------------------------------------------------- 1 | sphinx 2 | 3 | # extensions 4 | sphinxcontrib-napoleon 5 | sphinxcontrib-inheritance 6 | 7 | sphinx-rtd-theme 8 | alabaster 9 | -------------------------------------------------------------------------------- /docsite/_themes/srtd/static/font/fontawesome_webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tes/ansible/devel/docsite/_themes/srtd/static/font/fontawesome_webfont.eot -------------------------------------------------------------------------------- /docsite/_themes/srtd/static/font/fontawesome_webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tes/ansible/devel/docsite/_themes/srtd/static/font/fontawesome_webfont.ttf -------------------------------------------------------------------------------- /docsite/_themes/srtd/static/font/fontawesome_webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tes/ansible/devel/docsite/_themes/srtd/static/font/fontawesome_webfont.woff -------------------------------------------------------------------------------- /docsite/_themes/srtd/theme.conf: -------------------------------------------------------------------------------- 1 | [theme] 2 | inherit = basic 3 | stylesheet = css/theme.min.css 4 | 5 | [options] 6 | typekit_id = hiw1hhg 7 | analytics_id = 8 | -------------------------------------------------------------------------------- /packaging/debian/ansible.install: -------------------------------------------------------------------------------- 1 | examples/hosts etc/ansible 2 | docs/man/man1/*.1 usr/share/man/man1 3 | bin/* usr/bin 4 | examples/ansible.cfg etc/ansible 5 | -------------------------------------------------------------------------------- /test/integration/exoscale.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - hosts: localhost 3 | gather_facts: no 4 | roles: 5 | - { role: test_exoscale_dns, tags: test_exoscale_dns } 6 | -------------------------------------------------------------------------------- /test/integration/roles/test_mysql_variables/defaults/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # defaults file for test_mysql_variables 3 | user: 'user1' 4 | password: 'password1' 5 | 6 | -------------------------------------------------------------------------------- /test/integration/roles/test_win_feature/defaults/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | 3 | # Feature not normally installed by default. 4 | test_win_feature_name: Telnet-Client 5 | -------------------------------------------------------------------------------- /test/integration/roles/test_win_group/defaults/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | 3 | test_win_group_name: Ansiblings 4 | test_win_group_description: Test group for Ansible 5 | -------------------------------------------------------------------------------- /test/units/__init__.py: -------------------------------------------------------------------------------- 1 | 2 | # Make coding more python3-ish 3 | from __future__ import (absolute_import, division, print_function) 4 | __metaclass__ = type 5 | 6 | -------------------------------------------------------------------------------- /test/utils/ansible-playbook_integration_runner/roles/ansible_test_deps/meta/.galaxy_install_info: -------------------------------------------------------------------------------- 1 | {install_date: 'Tue Dec 8 15:06:28 2015', version: master} 2 | -------------------------------------------------------------------------------- /test/utils/shippable/remote-requirements.txt: -------------------------------------------------------------------------------- 1 | cryptography 2 | junit-xml 3 | ndg-httpsclient 4 | pyasn1 5 | pyopenssl 6 | requests 7 | pywinrm 8 | xmltodict 9 | -------------------------------------------------------------------------------- /docsite/_static/ansible-local.css: -------------------------------------------------------------------------------- 1 | /* Local CSS tweaks for ansible */ 2 | .dropdown-menu { 3 | overflow-y: auto; 4 | } 5 | 6 | h2 { 7 | padding-top: 40px; 8 | } -------------------------------------------------------------------------------- /lib/ansible/plugins/test/__init__.py: -------------------------------------------------------------------------------- 1 | # Make coding more python3-ish 2 | from __future__ import (absolute_import, division, print_function) 3 | __metaclass__ = type 4 | -------------------------------------------------------------------------------- /test/integration/roles/setup_mysql_db/vars/RedHat.yml: -------------------------------------------------------------------------------- 1 | mysql_service: 'mysqld' 2 | 3 | mysql_packages: 4 | - mysql-server 5 | - MySQL-python 6 | - bzip2 -------------------------------------------------------------------------------- /test/integration/roles/setup_mysql_db/vars/Suse.yml: -------------------------------------------------------------------------------- 1 | mysql_service: 'mysql' 2 | 3 | mysql_packages: 4 | - mariadb 5 | - python-MySQL-python 6 | - bzip2 7 | -------------------------------------------------------------------------------- /test/integration/roles/test_binary/vars/main.yml: -------------------------------------------------------------------------------- 1 | simple_accents: 'Café Eñe' 2 | utf8_simple_accents: 'Q2Fmw6kgRcOxZQ==' 3 | latin1_simple_accents: 'Q2Fm6SBF8WU=' 4 | -------------------------------------------------------------------------------- /test/integration/roles/test_cs_portforward/defaults/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | cs_portforward_public_ip: "10.100.212.5" 3 | cs_portforward_vm: "{{ cs_resource_prefix }}-vm" 4 | -------------------------------------------------------------------------------- /test/integration/roles/test_exoscale_dns/defaults/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | exo_dns_domain_name: example.com 3 | exo_dns_record_name_web: web 4 | exo_dns_record_name_mx: mx 5 | -------------------------------------------------------------------------------- /test/integration/roles/test_win_regmerge/files/settings1.reg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tes/ansible/devel/test/integration/roles/test_win_regmerge/files/settings1.reg -------------------------------------------------------------------------------- /test/integration/roles/test_win_regmerge/files/settings2.reg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tes/ansible/devel/test/integration/roles/test_win_regmerge/files/settings2.reg -------------------------------------------------------------------------------- /test/integration/roles/test_win_regmerge/files/settings3.reg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tes/ansible/devel/test/integration/roles/test_win_regmerge/files/settings3.reg -------------------------------------------------------------------------------- /test/integration/test_vault_embedded.yml: -------------------------------------------------------------------------------- 1 | - hosts: testhost 2 | gather_facts: False 3 | roles: 4 | - { role: test_vault_embedded, tags: test_vault_embedded} 5 | -------------------------------------------------------------------------------- /test/utils/ansible-playbook_integration_runner/roles/ansible_test_deps/test/requirements.yml: -------------------------------------------------------------------------------- 1 | - src: chrismeyersfsu.provision_docker 2 | name: provision_docker 3 | -------------------------------------------------------------------------------- /test/integration/azure.yml: -------------------------------------------------------------------------------- 1 | - hosts: localhost 2 | connection: local 3 | gather_facts: no 4 | tags: 5 | - test_azure 6 | roles: 7 | - { role: test_azure } 8 | -------------------------------------------------------------------------------- /test/integration/roles/setup_mysql_db/defaults/main.yml: -------------------------------------------------------------------------------- 1 | mysql_service: mysqld 2 | 3 | mysql_packages: 4 | - mysql-server 5 | - MySQL-python 6 | - bzip2 7 | -------------------------------------------------------------------------------- /test/integration/roles/setup_mysql_db/vars/Debian.yml: -------------------------------------------------------------------------------- 1 | mysql_service: 'mysql' 2 | 3 | mysql_packages: 4 | - mysql-server 5 | - python-mysqldb 6 | - bzip2 7 | -------------------------------------------------------------------------------- /test/integration/roles/setup_mysql_db/vars/Fedora.yml: -------------------------------------------------------------------------------- 1 | mysql_service: 'mariadb' 2 | 3 | mysql_packages: 4 | - mariadb-server 5 | - MySQL-python 6 | - bzip2 7 | -------------------------------------------------------------------------------- /test/integration/roles/setup_mysql_db/vars/RedHat-7.yml: -------------------------------------------------------------------------------- 1 | mysql_service: 'mariadb' 2 | 3 | mysql_packages: 4 | - mariadb-server 5 | - MySQL-python 6 | - bzip2 7 | -------------------------------------------------------------------------------- /test/integration/roles/test_cs_securitygroup_rule/tasks/main.yml: -------------------------------------------------------------------------------- 1 | - include: setup.yml 2 | - include: present.yml 3 | - include: absent.yml 4 | - include: cleanup.yml 5 | -------------------------------------------------------------------------------- /test/integration/roles/test_lineinfile/files/test.txt: -------------------------------------------------------------------------------- 1 | This is line 1 2 | This is line 2 3 | REF this is a line for backrefs REF 4 | This is line 4 5 | This is line 5 6 | -------------------------------------------------------------------------------- /test/integration/roles/test_win_lineinfile/files/test.txt: -------------------------------------------------------------------------------- 1 | This is line 1 2 | This is line 2 3 | REF this is a line for backrefs REF 4 | This is line 4 5 | This is line 5 6 | -------------------------------------------------------------------------------- /test/samples/with_lines.yml: -------------------------------------------------------------------------------- 1 | - hosts: localhost 2 | gather_facts: no 3 | tasks: 4 | - debug: msg="line is {{item}}" 5 | with_lines: 6 | - "cat /etc/hosts" 7 | -------------------------------------------------------------------------------- /test/integration/galaxy_playbook.yml: -------------------------------------------------------------------------------- 1 | - hosts: localhost 2 | connection: local 3 | 4 | roles: 5 | - "git-ansible-galaxy" 6 | - "http-role" 7 | - "hg-ansible-galaxy" 8 | -------------------------------------------------------------------------------- /test/integration/jenkins.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - hosts: localhost 3 | connection: local 4 | gather_facts: no 5 | tags: 6 | - jenkins 7 | roles: 8 | - test_jenkins_job 9 | -------------------------------------------------------------------------------- /test/integration/roles/test_embedded_module/library/test_integration_module: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | print('{"changed":false, "msg":"this is the embedded module"}') 4 | -------------------------------------------------------------------------------- /lib/ansible/inventory/vars_plugins/__init__.py: -------------------------------------------------------------------------------- 1 | # Make coding more python3-ish 2 | from __future__ import (absolute_import, division, print_function) 3 | __metaclass__ = type 4 | 5 | -------------------------------------------------------------------------------- /lib/ansible/plugins/filter/__init__.py: -------------------------------------------------------------------------------- 1 | # Make coding more python3-ish 2 | from __future__ import (absolute_import, division, print_function) 3 | __metaclass__ = type 4 | 5 | 6 | -------------------------------------------------------------------------------- /test/integration/check_mode.yml: -------------------------------------------------------------------------------- 1 | - hosts: testhost 2 | roles: 3 | - { role: test_always_run, tags: test_always_run } 4 | - { role: test_check_mode, tags: test_check_mode } 5 | -------------------------------------------------------------------------------- /test/integration/roles/setup_postgresql_db/defaults/main.yml: -------------------------------------------------------------------------------- 1 | postgresql_service: postgresql 2 | 3 | postgresql_packages: 4 | - postgresql-server 5 | - python-psycopg2 6 | -------------------------------------------------------------------------------- /test/integration/roles/test_include_vars/vars/environments/development/services/webapp.yml: -------------------------------------------------------------------------------- 1 | --- 2 | testing: 101112 3 | base_dir: 'development/services' 4 | webapp_containers: 20 5 | -------------------------------------------------------------------------------- /test/integration/roles/test_jenkins_job/defaults/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | jenkins_url: http://localhost:8080 3 | jenkins_user: admin 4 | jenkins_password: "" 5 | jenkins_days_to_keep: 20 6 | -------------------------------------------------------------------------------- /test/integration/roles/test_win_regmerge/templates/win_line_ending.j2: -------------------------------------------------------------------------------- 1 | #jinja2: newline_sequence:'\r\n' 2 | {{ templated_var }} 3 | {{ templated_var }} 4 | {{ templated_var }} 5 | -------------------------------------------------------------------------------- /test/integration/roles/test_win_script/files/test_script_bool.ps1: -------------------------------------------------------------------------------- 1 | Param( 2 | [bool]$boolvariable 3 | ) 4 | 5 | Write-Host $boolvariable.GetType() 6 | Write-Host $boolvariable 7 | -------------------------------------------------------------------------------- /test/integration/test_binary_modules.yml: -------------------------------------------------------------------------------- 1 | - hosts: testhost_binary_modules 2 | roles: 3 | - role: test_binary_modules 4 | tags: 5 | - test_binary_modules 6 | 7 | -------------------------------------------------------------------------------- /test/samples/included_playbook.yml: -------------------------------------------------------------------------------- 1 | - hosts: localhost 2 | gather_facts: no 3 | tags: 4 | - included 5 | tasks: 6 | - debug: msg="incuded playbook, variable is {{a}}" 7 | -------------------------------------------------------------------------------- /test/samples/l3_include.yml: -------------------------------------------------------------------------------- 1 | - debug: msg="this is the l3 include" 2 | - debug: msg="a second task for l3" 3 | - debug: msg="a third task for l3" 4 | - include: common_include.yml 5 | -------------------------------------------------------------------------------- /test/samples/with_env.yml: -------------------------------------------------------------------------------- 1 | - hosts: localhost 2 | connection: local 3 | gather_facts: no 4 | tasks: 5 | - debug: msg="{{ lookup('env','HOME') }} is an environment variable" 6 | -------------------------------------------------------------------------------- /test/integration/lookup.properties: -------------------------------------------------------------------------------- 1 | # A comment 2 | value1=Text associated with value1 3 | value2=Same for value2 4 | value.dot=Properties with dot 5 | field.with.space = another space 6 | -------------------------------------------------------------------------------- /test/integration/roles/test_cs_instance_facts/defaults/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | test_cs_instance_template: CentOS 5.3(64-bit) no GUI (Simulator) 3 | test_cs_instance_offering_1: Small Instance 4 | -------------------------------------------------------------------------------- /test/integration/roles/test_cs_vmsnapshot/defaults/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | test_cs_instance_template: CentOS 5.3(64-bit) no GUI (Simulator) 3 | test_cs_instance_offering_1: Small Instance 4 | -------------------------------------------------------------------------------- /test/integration/roles/test_handlers/handlers/main.yml: -------------------------------------------------------------------------------- 1 | - name: set handler fact 2 | set_fact: 3 | handler_called: True 4 | - name: test handler 5 | debug: msg="handler called" 6 | -------------------------------------------------------------------------------- /test/samples/lookup_file.yml: -------------------------------------------------------------------------------- 1 | - hosts: localhost 2 | connection: local 3 | gather_facts: no 4 | tasks: 5 | - debug: msg="the pubkey is {{lookup('file', '~/.ssh/id_rsa.pub')}}" 6 | -------------------------------------------------------------------------------- /test/samples/test_sudo.yml: -------------------------------------------------------------------------------- 1 | - hosts: ubuntu1404 2 | gather_facts: no 3 | remote_user: testing 4 | tasks: 5 | - command: whoami 6 | - apt: update_cache=yes 7 | sudo: yes 8 | -------------------------------------------------------------------------------- /test/integration/roles/test_vault/tasks/main.yml: -------------------------------------------------------------------------------- 1 | 2 | - assert: 3 | that: 4 | - 'secret_var == "secret"' 5 | 6 | 7 | - copy: src=vault-secret.txt dest={{output_dir}}/secret.txt 8 | -------------------------------------------------------------------------------- /test/integration/roles/test_win_script/files/test_script.ps1: -------------------------------------------------------------------------------- 1 | # Test script to make sure the Ansible script module works. 2 | Write-Host "Woohoo! We can run a PowerShell script via Ansible!" 3 | -------------------------------------------------------------------------------- /test/integration/test_includes3.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - hosts: localhost 3 | tasks: 4 | - include: test_includes4.yml 5 | with_items: ["a"] 6 | loop_control: 7 | loop_var: r 8 | -------------------------------------------------------------------------------- /test/integration/vars/test_var_precedence.yml: -------------------------------------------------------------------------------- 1 | --- 2 | extra_var: "BAD!" 3 | role_var: "BAD!" 4 | vars_files_var: "vars_files_var" 5 | vars_files_var_role: "should be overridden by roles" 6 | -------------------------------------------------------------------------------- /test/samples/with_fileglob.yml: -------------------------------------------------------------------------------- 1 | - hosts: localhost 2 | connection: local 3 | gather_facts: no 4 | tasks: 5 | - debug: msg="file is {{item}}" 6 | with_fileglob: 7 | - "*.yml" 8 | -------------------------------------------------------------------------------- /test/units/plugins/action/fixtures/synchronize/basic/task_args_out.json: -------------------------------------------------------------------------------- 1 | { 2 | "dest": "root@el6host:/tmp/deleteme", 3 | "src": "/tmp/deleteme", 4 | "_local_rsync_path": "rsync" 5 | } -------------------------------------------------------------------------------- /test/integration/roles/test_var_precedence_role3/vars/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # should override the global vars_files_var since it's local to the role 3 | vars_files_var_role: "vars_files_var_role3" 4 | -------------------------------------------------------------------------------- /test/units/plugins/action/fixtures/synchronize/delegate_remote/task_args_out.json: -------------------------------------------------------------------------------- 1 | { 2 | "dest": "el6host:/tmp/deleteme", 3 | "src": "/tmp/deleteme", 4 | "_local_rsync_path": "rsync" 5 | } -------------------------------------------------------------------------------- /examples/playbooks/README.md: -------------------------------------------------------------------------------- 1 | Playbook Examples 2 | ================= 3 | 4 | Playbook examples have moved. 5 | 6 | See [the Ansible-Examples repo](https://github.com/ansible/ansible-examples). 7 | 8 | -------------------------------------------------------------------------------- /test/integration/roles/test_mysql_db/defaults/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # defaults file for test_mysql_db 3 | db_name: 'data' 4 | db_user1: 'datauser1' 5 | db_user2: 'datauser2' 6 | 7 | tmp_dir: '/tmp' 8 | 9 | -------------------------------------------------------------------------------- /test/integration/roles/test_var_blending/vars/main.yml: -------------------------------------------------------------------------------- 1 | winter: coming 2 | etest: 'from role vars' 3 | role_var_beats_inventory: 'chevron 5 encoded' 4 | role_var_beats_default: 'chevron 6 encoded' 5 | -------------------------------------------------------------------------------- /test/integration/roles/test_win_user/defaults/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | 3 | test_win_user_name: test_win_user 4 | test_win_user_password: "T35Tus3rP@ssW0rd" 5 | test_win_user_password2: "pa55wOrd4te5tU53R!" 6 | -------------------------------------------------------------------------------- /test/integration/all.yml: -------------------------------------------------------------------------------- 1 | - include: test_setup.yml 2 | - include: non_destructive.yml 3 | - include: destructive.yml 4 | - include: rackspace.yml 5 | - include: amazon.yml 6 | - include: good_parsing.yml 7 | -------------------------------------------------------------------------------- /test/integration/roles/prepare_http_tests/defaults/main.yml: -------------------------------------------------------------------------------- 1 | badssl_host: wrong.host.badssl.com 2 | httpbin_host: httpbin.org 3 | sni_host: sni.velox.ch 4 | badssl_host_substring: wrong.host.badssl.com 5 | -------------------------------------------------------------------------------- /test/integration/roles/test_bad_parsing/tasks/scenario3.yml: -------------------------------------------------------------------------------- 1 | - name: test that we can't do this for the shell module 2 | shell: echo hi {{ chdir }} 3 | failed_when: False 4 | tags: scenario3 5 | 6 | -------------------------------------------------------------------------------- /test/integration/roles/test_unarchive/files/test-unarchive-nonascii-くらとみ.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tes/ansible/devel/test/integration/roles/test_unarchive/files/test-unarchive-nonascii-くらとみ.tar.gz -------------------------------------------------------------------------------- /test/samples/test_roles_complex.yml: -------------------------------------------------------------------------------- 1 | - hosts: localhost 2 | gather_facts: no 3 | roles: 4 | - { role: role_a, tags: A, when: skip != "A" } 5 | - { role: role_b, tags: B, when: skip != "B" } 6 | 7 | -------------------------------------------------------------------------------- /contrib/inventory/cloudstack.ini: -------------------------------------------------------------------------------- 1 | [cloudstack] 2 | #endpoint = https://api.exoscale.ch/compute 3 | endpoint = https://cloud.example.com/client/api 4 | key = cloudstack api key 5 | secret = cloudstack api secret 6 | -------------------------------------------------------------------------------- /test/integration/roles/test_ec2_group/defaults/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # defaults file for test_ec2_group 3 | ec2_group_name: '{{resource_prefix}}' 4 | ec2_group_description: 'Created by ansible integration tests' 5 | 6 | -------------------------------------------------------------------------------- /test/integration/roles/test_win_script/defaults/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | 3 | # Parameters to pass to test scripts. 4 | test_win_script_value: VaLuE 5 | test_win_script_splat: "@{This='THIS'; That='THAT'; Other='OTHER'}" 6 | -------------------------------------------------------------------------------- /test/samples/test_fact_gather.yml: -------------------------------------------------------------------------------- 1 | - hosts: localhost 2 | tasks: 3 | - debug: msg="this is play 1" 4 | 5 | - hosts: localhost 6 | tasks: 7 | - debug: msg="this is play 2, facts should not have gathered" 8 | -------------------------------------------------------------------------------- /test/integration/roles/test_handlers_meta/handlers/main.yml: -------------------------------------------------------------------------------- 1 | - name: set_handler_fact_1 2 | set_fact: 3 | handler1_called: True 4 | 5 | - name: set_handler_fact_2 6 | set_fact: 7 | handler2_called: True 8 | -------------------------------------------------------------------------------- /test/integration/roles/test_uri/files/pass2.json: -------------------------------------------------------------------------------- 1 | { 2 | "JSON Test Pattern pass3": { 3 | "The outermost value": "must be an object or array.", 4 | "In this test": "It is an object." 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /test/samples/lookup_template.yml: -------------------------------------------------------------------------------- 1 | - hosts: localhost 2 | gather_facts: no 3 | vars: 4 | my_var: "Bazinga!" 5 | tasks: 6 | - debug: msg="the rendered template is {{ lookup('template', 'template.j2') }}" 7 | 8 | -------------------------------------------------------------------------------- /packaging/port/sysutils/ansible/pkg-descr: -------------------------------------------------------------------------------- 1 | Ansible is a radically simple model-driven configuration management, deployment, and command execution framework. 2 | 3 | Author: Michael DeHaan 4 | WWW: http://ansible.github.com/ 5 | -------------------------------------------------------------------------------- /test/samples/test_play_failure.yml: -------------------------------------------------------------------------------- 1 | - hosts: localhost 2 | gather_facts: no 3 | tasks: 4 | - fail: 5 | 6 | - hosts: localhost 7 | gather_facts: no 8 | tasks: 9 | - debug: msg="you should not see me..." 10 | -------------------------------------------------------------------------------- /test/integration/roles/test_postgresql/defaults/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # defaults file for test_postgresql_db 3 | db_name: 'ansible_db' 4 | db_user1: 'ansible_db_user1' 5 | db_user2: 'ansible_db_user2' 6 | 7 | tmp_dir: '/tmp' 8 | 9 | -------------------------------------------------------------------------------- /test/integration/roles/test_service/files/ansible.upstart: -------------------------------------------------------------------------------- 1 | description "ansible test daemon" 2 | 3 | start on runlevel [345] 4 | stop on runlevel [!345] 5 | 6 | expect daemon 7 | 8 | exec ansible_test_service 9 | 10 | -------------------------------------------------------------------------------- /test/integration/roles/test_template/files/foo-py26.txt: -------------------------------------------------------------------------------- 1 | templated_var_loaded 2 | 3 | { 4 | "bool": true, 5 | "multi_part": "1Foo", 6 | "null_type": null, 7 | "number": 5, 8 | "string_num": "5" 9 | } 10 | -------------------------------------------------------------------------------- /test/integration/roles/test_template/files/foo.txt: -------------------------------------------------------------------------------- 1 | templated_var_loaded 2 | 3 | { 4 | "bool": true, 5 | "multi_part": "1Foo", 6 | "null_type": null, 7 | "number": 5, 8 | "string_num": "5" 9 | } 10 | -------------------------------------------------------------------------------- /test/samples/test_role.yml: -------------------------------------------------------------------------------- 1 | - hosts: localhost 2 | connection: local 3 | gather_facts: no 4 | vars: 5 | foo: "BAD!!" 6 | roles: 7 | - { role: test_role, foo: bar } 8 | tasks: 9 | - debug: msg="done" 10 | -------------------------------------------------------------------------------- /test/integration/gce.yml: -------------------------------------------------------------------------------- 1 | - hosts: testhost 2 | gather_facts: true 3 | roles: 4 | - { role: test_gce, tags: test_gce } 5 | - { role: test_gce_pd, tags: test_gce_pd } 6 | # TODO: tests for gce_lb, gce_net, gc_storage 7 | -------------------------------------------------------------------------------- /test/integration/roles/test_bad_parsing/tasks/scenario4.yml: -------------------------------------------------------------------------------- 1 | - name: test that we can't go all Little Bobby Droptables on a quoted var to add more 2 | file: "name={{ bad_var }}" 3 | failed_when: False 4 | tags: scenario4 5 | 6 | -------------------------------------------------------------------------------- /test/integration/roles/test_cs_configuration/defaults/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | test_cs_configuration_storage: PS0 3 | test_cs_configuration_cluster: C0 4 | test_cs_configuration_account: admin 5 | test_cs_configuration_zone: Sandbox-simulator 6 | -------------------------------------------------------------------------------- /test/integration/roles/test_win_service/defaults/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | 3 | # Service is commonly available and usually disabled/stopped by default. 4 | test_win_service_name: SSDPSRV 5 | test_win_service_display_name: "SSDP Discovery" 6 | -------------------------------------------------------------------------------- /test/units/plugins/action/fixtures/synchronize/basic_become/task_args_out.json: -------------------------------------------------------------------------------- 1 | { 2 | "dest": "root@el6host:/tmp/deleteme", 3 | "src": "/tmp/deleteme", 4 | "rsync_path": "\"sudo rsync\"", 5 | "_local_rsync_path": "rsync" 6 | } -------------------------------------------------------------------------------- /test/units/plugins/action/fixtures/synchronize/delegate_remote_su/task_args_out.json: -------------------------------------------------------------------------------- 1 | { 2 | "dest": "el6host:/tmp/deleteme", 3 | "src": "/tmp/deleteme", 4 | "rsync_path": "\"sudo rsync\"", 5 | "_local_rsync_path": "rsync" 6 | } -------------------------------------------------------------------------------- /test/integration/roles/test_var_blending/defaults/main.yml: -------------------------------------------------------------------------------- 1 | etest: "from role defaults" 2 | role_var_beats_default: "shouldn't see this" 3 | parameterized_beats_default: "shouldn't see this" 4 | inventory_beats_default: "shouldn't see this" 5 | -------------------------------------------------------------------------------- /test/units/plugins/action/fixtures/synchronize/basic_become_cli/task_args_out.json: -------------------------------------------------------------------------------- 1 | { 2 | "dest": "root@el6host:/tmp/deleteme", 3 | "src": "/tmp/deleteme", 4 | "rsync_path": "\"sudo rsync\"", 5 | "_local_rsync_path": "rsync" 6 | } -------------------------------------------------------------------------------- /test/integration/roles/test_var_precedence_role2/defaults/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # should be overridden by vars_files in the main play 3 | vars_files_var: "BAD!" 4 | # should be overridden by the vars file in role2 5 | defaults_file_var_role2: "BAD!" 6 | -------------------------------------------------------------------------------- /test/integration/roles/test_win_script/files/test_script_with_args.ps1: -------------------------------------------------------------------------------- 1 | # Test script to make sure the Ansible script module works when arguments are 2 | # passed to the script. 3 | 4 | foreach ($i in $args) 5 | { 6 | Write-Host $i; 7 | } 8 | -------------------------------------------------------------------------------- /test/samples/include.yml: -------------------------------------------------------------------------------- 1 | - debug: msg="this is the include, a=={{a}}" 2 | tags: 3 | - included 4 | #- debug: msg="this is the second debug in the include" 5 | - debug: msg="this is the third debug in the include, and a is still {{a}}" 6 | 7 | -------------------------------------------------------------------------------- /contrib/inventory/zabbix.ini: -------------------------------------------------------------------------------- 1 | # Ansible Zabbix external inventory script settings 2 | # 3 | 4 | [zabbix] 5 | 6 | # Server location 7 | server = http://zabbix.example.com/zabbix 8 | 9 | # Login 10 | username = admin 11 | password = zabbix 12 | -------------------------------------------------------------------------------- /test/integration/roles/test_apache2_module/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | 3 | - name: include only on supported systems 4 | include: actualtest.yml 5 | when: ansible_os_family in ['Debian', 'Suse'] 6 | # centos/RHEL does not have a2enmod/a2dismod 7 | -------------------------------------------------------------------------------- /test/integration/roles/test_bad_parsing/tasks/scenario1.yml: -------------------------------------------------------------------------------- 1 | - name: test that we cannot insert arguments 2 | file: path={{ test_file }} {{ test_input }} 3 | failed_when: False # ignore the module, just test the parser 4 | tags: scenario1 5 | 6 | -------------------------------------------------------------------------------- /test/integration/roles/test_includes/tasks/included_task1.yml: -------------------------------------------------------------------------------- 1 | - set_fact: 2 | ca: "{{ a }}" 3 | - debug: var=ca 4 | - set_fact: 5 | cb: "{{b}}" 6 | - debug: var=cb 7 | - set_fact: 8 | cc: "{{ c }}" 9 | - debug: var=cc 10 | 11 | -------------------------------------------------------------------------------- /test/integration/roles/test_service/files/ansible-broken.upstart: -------------------------------------------------------------------------------- 1 | description "ansible test daemon" 2 | 3 | start on runlevel [345] 4 | stop on runlevel [!345] 5 | 6 | expect daemon 7 | 8 | exec ansible_test_service 9 | 10 | manual 11 | -------------------------------------------------------------------------------- /test/integration/roles/test_uri/files/testserver.py: -------------------------------------------------------------------------------- 1 | import mimetypes 2 | 3 | if __name__ == '__main__': 4 | mimetypes.init() 5 | mimetypes.add_type('application/json', '.json') 6 | import SimpleHTTPServer 7 | SimpleHTTPServer.test() 8 | -------------------------------------------------------------------------------- /test/samples/with_items.yml: -------------------------------------------------------------------------------- 1 | - hosts: localhost 2 | connection: local 3 | vars: 4 | my_list: 5 | - a 6 | - b 7 | - c 8 | gather_facts: no 9 | tasks: 10 | - debug: msg="item is {{item}}" 11 | with_items: my_list 12 | -------------------------------------------------------------------------------- /test/utils/tox/requirements-py3.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Test requirements 3 | # 4 | 5 | nose 6 | mock >= 1.0.1, < 1.1 7 | passlib 8 | coverage 9 | coveralls 10 | unittest2 11 | redis 12 | python3-memcached 13 | python-systemd 14 | botocore 15 | boto3 16 | -------------------------------------------------------------------------------- /test/code-smell/required-and-default-attributes.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | BASEDIR=${1-"lib/ansible"} 4 | cd "$BASEDIR" 5 | grep -r FieldAttribute . |grep 'default' | grep 'required' 6 | if test $? -eq 0 ; then 7 | exit 1 8 | fi 9 | exit 0 10 | 11 | -------------------------------------------------------------------------------- /test/integration/roles/test_cs_instance/defaults/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | instance_number: 1 3 | test_cs_instance_template: CentOS 5.3(64-bit) no GUI (Simulator) 4 | test_cs_instance_offering_1: Small Instance 5 | test_cs_instance_offering_2: Medium Instance 6 | -------------------------------------------------------------------------------- /test/integration/roles/test_docker/tasks/docker-setup-debian.yml: -------------------------------------------------------------------------------- 1 | - name: Install docker packages (apt) 2 | apt: 3 | state: present 4 | # Note: add docker-registry when available 5 | name: docker.io,python-docker,netcat-openbsd,nginx 6 | 7 | -------------------------------------------------------------------------------- /test/integration/roles/test_var_precedence_dep/defaults/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # should be overridden by vars_files in the main play 3 | vars_files_var: "BAD!" 4 | # should be seen in role1 (no override) 5 | defaults_file_var_role1: "defaults_file_var_role1" 6 | -------------------------------------------------------------------------------- /test/integration/roles/test_var_precedence_role1/defaults/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # should be overridden by vars_files in the main play 3 | vars_files_var: "BAD!" 4 | # should be seen in role1 (no override) 5 | defaults_file_var_role1: "defaults_file_var_role1" 6 | -------------------------------------------------------------------------------- /test/integration/roles/test_win_script/files/test_script_with_errors.ps1: -------------------------------------------------------------------------------- 1 | # Test script to make sure we handle non-zero exit codes. 2 | 3 | trap 4 | { 5 | Write-Error -ErrorRecord $_ 6 | exit 1; 7 | } 8 | 9 | throw "Oh noes I has an error" 10 | -------------------------------------------------------------------------------- /test/utils/tox/requirements.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Test requirements 3 | # 4 | 5 | nose 6 | mock >= 1.0.1, < 1.1 7 | passlib 8 | coverage 9 | coveralls 10 | unittest2 11 | redis 12 | python-memcached 13 | python-systemd 14 | pycrypto 15 | botocore 16 | boto3 17 | -------------------------------------------------------------------------------- /test/integration/roles/test_bad_parsing/tasks/scenario2.yml: -------------------------------------------------------------------------------- 1 | - name: test that we cannot duplicate arguments 2 | file: path={{ test_file }} owner=test2 {{ test_input }} 3 | failed_when: False # ignore the module, just test the parser 4 | tags: scenario2 5 | 6 | -------------------------------------------------------------------------------- /test/integration/inventory.remote.template: -------------------------------------------------------------------------------- 1 | [posix] 2 | remote 3 | 4 | [posix:vars] 5 | ansible_connection=ssh 6 | ansible_host=@ansible_host 7 | ansible_port=@ansible_port 8 | ansible_user=@ansible_user 9 | ansible_python_interpreter=/usr/local/bin/python2 10 | -------------------------------------------------------------------------------- /test/integration/roles/test_cs_securitygroup_rule/tasks/cleanup.yml: -------------------------------------------------------------------------------- 1 | - name: cleanup custom security group 2 | cs_securitygroup: name={{ cs_resource_prefix }}_sg state=absent 3 | register: sg 4 | - name: verify setup 5 | assert: 6 | that: 7 | - sg|success 8 | -------------------------------------------------------------------------------- /test/integration/roles/test_var_precedence_dep/vars/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # should override the global vars_files_var since it's local to the role 3 | # but will be set to the value in the last role included which defines it 4 | vars_files_var_role: "vars_files_var_dep" 5 | -------------------------------------------------------------------------------- /test/integration/roles/test_var_precedence_role1/vars/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # should override the global vars_files_var since it's local to the role 3 | # but will be set to the value in the last role included which defines it 4 | vars_files_var_role: "vars_files_var_role1" 5 | -------------------------------------------------------------------------------- /test/samples/with_first_found.yml: -------------------------------------------------------------------------------- 1 | - hosts: localhost 2 | connection: local 3 | gather_facts: no 4 | tasks: 5 | - debug: msg="file is {{item}}" 6 | with_first_found: 7 | - /etc/foo 8 | - /etc/bar 9 | - /etc/passwd 10 | - /etc/shadow 11 | -------------------------------------------------------------------------------- /test/integration/roles/setup_postgresql_db/vars/default.yml: -------------------------------------------------------------------------------- 1 | postgresql_service: "postgresql" 2 | 3 | postgresql_packages: 4 | - "postgresql-server" 5 | - "python-psycopg2" 6 | 7 | pg_hba_location: "/var/lib/pgsql/data/pg_hba.conf" 8 | pg_dir: "/var/lib/pgsql/data" 9 | -------------------------------------------------------------------------------- /test/integration/roles/test_gce/defaults/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # defaults file for test_gce 3 | instance_name: "{{ resource_prefix|lower }}" 4 | service_account_email: "{{ gce_service_account_email }}" 5 | pem_file: "{{ gce_pem_file }}" 6 | project_id: "{{ gce_project_id }}" 7 | -------------------------------------------------------------------------------- /test/integration/roles/test_gce_pd/defaults/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # defaults file for test_gce 3 | instance_name: "{{ resource_prefix|lower }}" 4 | service_account_email: "{{ gce_service_account_email }}" 5 | pem_file: "{{ gce_pem_file }}" 6 | project_id: "{{ gce_project_id }}" 7 | -------------------------------------------------------------------------------- /test/integration/roles/test_zypper/files/empty.spec: -------------------------------------------------------------------------------- 1 | Summary: Empty RPM 2 | Name: empty 3 | Version: 1 4 | Release: 0 5 | License: GPLv3 6 | Group: Applications/System 7 | BuildArch: noarch 8 | 9 | %description 10 | Empty RPM 11 | 12 | %files 13 | -------------------------------------------------------------------------------- /test/samples/ignore_errors.yml: -------------------------------------------------------------------------------- 1 | - hosts: localhost 2 | connection: local 3 | gather_facts: no 4 | tasks: 5 | - fail: 6 | ignore_errors: yes 7 | - debug: msg="you should still see this" 8 | - fail: 9 | - debug: msg="you should NOT see this" 10 | 11 | -------------------------------------------------------------------------------- /test/integration/integration_config.yml: -------------------------------------------------------------------------------- 1 | --- 2 | win_output_dir: 'C:\ansible_testing' 3 | output_dir: ~/ansible_testing 4 | non_root_test_user: ansible 5 | pip_test_package: epdb 6 | 7 | # variables used in precedence tests, here passed to -e 8 | etest: 'from -e' 9 | 10 | 11 | -------------------------------------------------------------------------------- /test/integration/roles/test_cs_loadbalancer_rule/defaults/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | test_cs_lb_public_ip: "1.2.3.4" 3 | test_cs_instance_template: CentOS 5.3(64-bit) no GUI (Simulator) 4 | test_cs_instance_offering_1: Small Instance 5 | test_cs_lb_member: "{{ cs_resource_prefix }}_member1" 6 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "lib/ansible/modules/core"] 2 | path = lib/ansible/modules/core 3 | url = https://github.com/ansible/ansible-modules-core 4 | [submodule "lib/ansible/modules/extras"] 5 | path = lib/ansible/modules/extras 6 | url = https://github.com/ansible/ansible-modules-extras 7 | -------------------------------------------------------------------------------- /docsite/_static/bootstrap-sphinx.css: -------------------------------------------------------------------------------- 1 | /* 2 | * bootstrap-sphinx.css 3 | * ~~~~~~~~~~~~~~~~~~~~ 4 | * 5 | * Sphinx stylesheet -- Twitter Bootstrap theme. 6 | */ 7 | 8 | body { 9 | padding-top: 42px; 10 | } 11 | 12 | div.documentwrapper { 13 | float: left; 14 | width: 100%; 15 | } -------------------------------------------------------------------------------- /lib/ansible/test-requirements.txt: -------------------------------------------------------------------------------- 1 | # Ansible requirementss 2 | paramiko 3 | PyYAML 4 | jinja2 5 | httplib2 6 | passlib 7 | six 8 | 9 | # These are needed for various optional features 10 | #python-memcached 11 | #redis 12 | 13 | # Test requirements 14 | unittest2 15 | mock 16 | nose 17 | -------------------------------------------------------------------------------- /test/integration/host_vars/testhost: -------------------------------------------------------------------------------- 1 | a: 1 2 | b: 2 3 | c: 3 4 | d: 4 5 | role_var_beats_inventory: 'should_not_see_this' 6 | test_hash: 7 | host_vars_testhost: "this is in host_vars/testhost" 8 | 9 | # Var precedence testing 10 | defaults_file_var_role3: "overridden from inventory" 11 | -------------------------------------------------------------------------------- /test/integration/roles/test_var_precedence/meta/main.yml: -------------------------------------------------------------------------------- 1 | dependencies: 2 | - { role: test_var_precedence_role1, param_var: "param_var_role1" } 3 | - { role: test_var_precedence_role2, param_var: "param_var_role2" } 4 | - { role: test_var_precedence_role3, param_var: "param_var_role3" } 5 | -------------------------------------------------------------------------------- /docsite/.gitignore: -------------------------------------------------------------------------------- 1 | # Old compiled python stuff 2 | *.py[co] 3 | # package building stuff 4 | build 5 | # Emacs backup files... 6 | *~ 7 | .\#* 8 | .doctrees 9 | # Generated docs stuff 10 | ansible*.xml 11 | .buildinfo 12 | objects.inv 13 | .doctrees 14 | rst/modules/*.rst 15 | *.min.css 16 | -------------------------------------------------------------------------------- /test/utils/shippable/python3-test-tag-blacklist.txt: -------------------------------------------------------------------------------- 1 | test_apache2_module 2 | test_assemble 3 | test_authorized_key 4 | test_filters 5 | test_gem 6 | test_git 7 | test_hg 8 | test_lookups 9 | test_pip 10 | test_service 11 | test_subversion 12 | test_synchronize 13 | test_unarchive 14 | test_uri 15 | -------------------------------------------------------------------------------- /test/integration/roles/test_service/files/ansible.systemd: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Ansible Test Service 3 | 4 | [Service] 5 | ExecStart=/usr/sbin/ansible_test_service "Test\nthat newlines in scripts\nwork" 6 | ExecReload=/bin/true 7 | Type=forking 8 | 9 | [Install] 10 | WantedBy=multi-user.target 11 | -------------------------------------------------------------------------------- /test/samples/with_random_choice.yml: -------------------------------------------------------------------------------- 1 | - hosts: localhost 2 | connection: local 3 | gather_facts: no 4 | tasks: 5 | - debug: msg={{ item }} 6 | with_random_choice: 7 | - "go through the door" 8 | - "drink from the goblet" 9 | - "press the red button" 10 | - "do nothing" 11 | -------------------------------------------------------------------------------- /contrib/inventory/libcloud.ini: -------------------------------------------------------------------------------- 1 | # Ansible Apache Libcloud Generic inventory script 2 | 3 | [driver] 4 | provider = CLOUDSTACK 5 | host = 6 | path = 7 | secure = True 8 | verify_ssl_cert = True 9 | 10 | key = 11 | secret = 12 | 13 | [cache] 14 | cache_path=/path/to/your/cache 15 | cache_max_age=60 16 | -------------------------------------------------------------------------------- /test/integration/good_parsing.yml: -------------------------------------------------------------------------------- 1 | - hosts: testhost 2 | 3 | # the following commands should all parse fine and execute fine 4 | # and represent quoting scenarios that should be legit 5 | 6 | gather_facts: False 7 | 8 | roles: 9 | - { role: test_good_parsing, tags: test_good_parsing } 10 | -------------------------------------------------------------------------------- /test/integration/roles/prepare_http_tests/vars/httptester.yml: -------------------------------------------------------------------------------- 1 | # these are fake hostnames provided by docker link for the httptester container 2 | badssl_host: fail.ansible.http.tests 3 | httpbin_host: ansible.http.tests 4 | sni_host: sni1.ansible.http.tests 5 | badssl_host_substring: HTTP Client Testing Service 6 | -------------------------------------------------------------------------------- /test/integration/roles/test_var_precedence_role2/vars/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # should override the global vars_files_var since it's local to the role 3 | vars_files_var_role: "vars_files_var_role2" 4 | # should override the value in defaults/main.yml for role 2 5 | defaults_file_var_role2: "overridden by role vars" 6 | -------------------------------------------------------------------------------- /test/samples/with_flattened.yml: -------------------------------------------------------------------------------- 1 | - hosts: localhost 2 | connection: local 3 | gather_facts: 4 | vars: 5 | list_a: 6 | - ['foo', 'bar'] 7 | list_b: 8 | - [['bam', 'baz']] 9 | tasks: 10 | - debug: msg="item is {{item}}" 11 | with_flattened: 12 | - list_a 13 | - list_b 14 | -------------------------------------------------------------------------------- /test/samples/with_indexed_items.yml: -------------------------------------------------------------------------------- 1 | - hosts: localhost 2 | connection: local 3 | gather_facts: no 4 | vars: 5 | some_list: 6 | - a 7 | - b 8 | - c 9 | tasks: 10 | - debug: msg="at array position {{ item.0 }} there is a value {{ item.1 }}" 11 | with_indexed_items: some_list 12 | -------------------------------------------------------------------------------- /test/samples/with_together.yml: -------------------------------------------------------------------------------- 1 | - hosts: localhost 2 | connection: local 3 | gather_facts: no 4 | vars: 5 | alpha: [ 'a', 'b', 'c', 'd' ] 6 | numbers: [ 1, 2, 3, 4 ] 7 | tasks: 8 | - debug: msg="{{ item.0 }} and {{ item.1 }}" 9 | with_together: 10 | - alpha 11 | - numbers 12 | -------------------------------------------------------------------------------- /test/integration/roles/test_embedded_module/tasks/main.yml: -------------------------------------------------------------------------------- 1 | - name: run the embedded dummy module 2 | test_integration_module: 3 | register: result 4 | 5 | - name: assert the embedded module ran 6 | assert: 7 | that: 8 | - "'msg' in result" 9 | - result.msg == "this is the embedded module" 10 | -------------------------------------------------------------------------------- /test/integration/roles/test_includes/handlers/more_handlers.yml: -------------------------------------------------------------------------------- 1 | - name: included_handler 2 | set_fact: 3 | ca: 4001 4 | cb: 4002 5 | cc: 4003 6 | 7 | - name: verify_handler 8 | assert: 9 | that: 10 | - "ca == 4001" 11 | - "cb == 4002" 12 | - "cc == 4003" 13 | 14 | 15 | -------------------------------------------------------------------------------- /test/integration/test_async.yml: -------------------------------------------------------------------------------- 1 | - hosts: localhost 2 | gather_facts: false 3 | tasks: 4 | # make sure non-JSON data before module output is ignored 5 | - name: async ping with invalid locale via ssh 6 | ping: 7 | async: 10 8 | poll: 1 9 | register: result 10 | - debug: var=result 11 | -------------------------------------------------------------------------------- /test/utils/shippable/ci.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash -eux 2 | 3 | set -o pipefail 4 | 5 | source_root=$(python -c "from os import path; print(path.abspath(path.join(path.dirname('$0'), '../../..')))") 6 | 7 | "${source_root}/test/utils/shippable/${TEST}.sh" 2>&1 | gawk '{ print strftime("%Y-%m-%d %H:%M:%S"), $0; fflush(); }' 8 | -------------------------------------------------------------------------------- /test/integration/roles/test_cs_volume/defaults/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | test_cs_instance_1: "{{ cs_resource_prefix }}-vm1" 3 | test_cs_instance_2: "{{ cs_resource_prefix }}-vm2" 4 | test_cs_instance_template: CentOS 5.3(64-bit) no GUI (Simulator) 5 | test_cs_instance_offering_1: Small Instance 6 | test_cs_disk_offering_1: Custom 7 | -------------------------------------------------------------------------------- /test/integration/roles/test_win_script/files/test_script_with_splatting.ps1: -------------------------------------------------------------------------------- 1 | # Test script to make sure the Ansible script module works when arguments are 2 | # passed via splatting (http://technet.microsoft.com/en-us/magazine/gg675931.aspx) 3 | 4 | Write-Host $args.This 5 | Write-Host $args.That 6 | Write-Host $args.Other 7 | -------------------------------------------------------------------------------- /test/utils/ansible-playbook_integration_runner/roles/ansible_test_deps/README.md: -------------------------------------------------------------------------------- 1 | [![Build Status](https://travis-ci.org/chrismeyersfsu/ansible_test_deps.svg)](https://travis-ci.org/chrismeyersfsu/ansible_test_deps) 2 | 3 | ansible_test_deps 4 | ========= 5 | 6 | Install needed packages to run ansible integration tests. 7 | -------------------------------------------------------------------------------- /test/samples/test_free.yml: -------------------------------------------------------------------------------- 1 | - hosts: all 2 | strategy: free 3 | gather_facts: no 4 | tasks: 5 | - debug: msg="all hosts should print this" 6 | - pause: seconds=5 7 | when: inventory_hostname == 'l2' 8 | - pause: seconds=10 9 | when: inventory_hostname == 'l3' 10 | - debug: msg="and we're done" 11 | -------------------------------------------------------------------------------- /test/units/plugins/action/fixtures/synchronize/basic_vagrant/task_args_out.json: -------------------------------------------------------------------------------- 1 | { 2 | "dest": "/tmp/deleteme", 3 | "src": "/tmp/deleteme", 4 | "private_key": "/home/jtanner/workspace/issues/AP-15905/.vagrant/machines/default/virtualbox/private_key", 5 | "dest_port": 2202, 6 | "_local_rsync_path": "rsync" 7 | } 8 | -------------------------------------------------------------------------------- /test/units/plugins/action/fixtures/synchronize/basic_vagrant_sudo/task_args_out.json: -------------------------------------------------------------------------------- 1 | { 2 | "dest": "/tmp/deleteme", 3 | "src": "/tmp/deleteme", 4 | "private_key": "/home/jtanner/workspace/issues/AP-15905/.vagrant/machines/default/virtualbox/private_key", 5 | "dest_port": 2202, 6 | "_local_rsync_path": "rsync" 7 | } -------------------------------------------------------------------------------- /test/integration/roles/setup_postgresql_db/vars/Debian-8.yml: -------------------------------------------------------------------------------- 1 | postgresql_service: "postgresql" 2 | 3 | postgresql_packages: 4 | - "postgresql" 5 | - "postgresql-common" 6 | - "python-psycopg2" 7 | 8 | pg_hba_location: "/etc/postgresql/9.4/main/pg_hba.conf" 9 | pg_dir: "/var/lib/postgresql/9.4/main" 10 | pg_ver: 9.4 11 | -------------------------------------------------------------------------------- /test/integration/roles/setup_postgresql_db/vars/Ubuntu-14.yml: -------------------------------------------------------------------------------- 1 | postgresql_service: "postgresql" 2 | 3 | postgresql_packages: 4 | - "postgresql" 5 | - "postgresql-common" 6 | - "python-psycopg2" 7 | 8 | pg_hba_location: "/etc/postgresql/9.3/main/pg_hba.conf" 9 | pg_dir: "/var/lib/postgresql/9.3/main" 10 | pg_ver: 9.3 11 | -------------------------------------------------------------------------------- /test/integration/roles/setup_postgresql_db/vars/Ubuntu-16.yml: -------------------------------------------------------------------------------- 1 | postgresql_service: "postgresql" 2 | 3 | postgresql_packages: 4 | - "postgresql" 5 | - "postgresql-common" 6 | - "python-psycopg2" 7 | 8 | pg_hba_location: "/etc/postgresql/9.5/main/pg_hba.conf" 9 | pg_dir: "/var/lib/postgresql/9.5/main" 10 | pg_ver: 9.5 11 | -------------------------------------------------------------------------------- /test/integration/roles/test_win_get_url/defaults/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | 3 | test_win_get_url_link: http://docs.ansible.com 4 | test_win_get_url_invalid_link: http://docs.ansible.com/skynet_module.html 5 | test_win_get_url_invalid_path: "Q:\\Filez\\Cyberdyne.html" 6 | test_win_get_url_path: "{{ test_win_get_url_dir_path }}\\docs_index.html" -------------------------------------------------------------------------------- /test/units/plugins/action/fixtures/synchronize/basic_vagrant_become_cli/task_args_out.json: -------------------------------------------------------------------------------- 1 | { 2 | "dest": "/tmp/deleteme", 3 | "src": "/tmp/deleteme", 4 | "private_key": "/home/jtanner/workspace/issues/AP-15905/.vagrant/machines/default/virtualbox/private_key", 5 | "dest_port": 2202, 6 | "_local_rsync_path": "rsync" 7 | } -------------------------------------------------------------------------------- /test/integration/consul_running.py: -------------------------------------------------------------------------------- 1 | ''' Checks that the consul agent is running locally. ''' 2 | 3 | if __name__ == '__main__': 4 | 5 | try: 6 | import consul 7 | consul = consul.Consul(host='0.0.0.0', port=8500) 8 | consul.catalog.nodes() 9 | print("True") 10 | except: 11 | pass 12 | -------------------------------------------------------------------------------- /test/integration/roles/test_cs_instance/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - include: setup.yml 3 | - include: present.yml 4 | - include: tags.yml 5 | - include: absent.yml 6 | - include: cleanup.yml 7 | 8 | - include: setup.yml 9 | - include: present_display_name.yml 10 | - include: absent_display_name.yml 11 | - include: cleanup.yml 12 | -------------------------------------------------------------------------------- /test/integration/roles/test_var_precedence_role3/defaults/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # should be overridden by vars_files in the main play 3 | vars_files_var: "BAD!" 4 | # should override the defaults var for role 1 and 2 5 | defaults_file_var: "last one wins" 6 | # should be overridden from the inventory value 7 | defaults_file_var_role3: "BAD!" 8 | -------------------------------------------------------------------------------- /test/integration/roles/test_win_msi/defaults/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | 3 | msi_url: https://ansible-ci-files.s3.amazonaws.com/test/integration/roles/test_win_msi/7z922-x64.msi 4 | msi_download_path: "C:\\Program Files\\7z922-x64.msi" 5 | msi_install_path: "C:\\Program Files\\7-Zip" 6 | msi_product_code: "{23170F69-40C1-2702-0922-000001000000}" 7 | -------------------------------------------------------------------------------- /test/integration/roles/setup_postgresql_db/vars/Ubuntu-12.yml: -------------------------------------------------------------------------------- 1 | postgresql_service: "postgresql" 2 | 3 | postgresql_packages: 4 | - "postgresql" 5 | - "postgresql-common" 6 | - "python-psycopg2" 7 | 8 | pg_hba_location: "/etc/postgresql/9.1/main/pg_hba.conf" 9 | pg_dir: "/var/lib/postgresql/9.1/main" 10 | pg_ver: 9.1 11 | 12 | -------------------------------------------------------------------------------- /test/integration/roles/test_win_package/defaults/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | 3 | msi_url: https://ansible-ci-files.s3.amazonaws.com/test/integration/roles/test_win_msi/7z922-x64.msi 4 | msi_download_path: "C:\\Program Files\\7z922-x64.msi" 5 | msi_install_path: "C:\\Program Files\\7-Zip" 6 | msi_product_code: "{23170F69-40C1-2702-0922-000001000000}" 7 | -------------------------------------------------------------------------------- /test/integration/test_win_group3.yml: -------------------------------------------------------------------------------- 1 | - hosts: windows 2 | gather_facts: false 3 | roles: 4 | - { role: test_win_service, tags: test_win_service } 5 | - { role: test_win_feature, tags: test_win_feature } 6 | - { role: test_win_user, tags: test_win_user } 7 | - { role: test_win_async_wrapper, tags: test_win_async_wrapper } 8 | -------------------------------------------------------------------------------- /test/samples/lookup_password.yml: -------------------------------------------------------------------------------- 1 | - hosts: localhost 2 | gather_facts: no 3 | #vars: 4 | # my_password: "{{ lookup('password', '/tmp/test_lookup_password length=15') }}" 5 | tasks: 6 | #- debug: msg="the password is {{my_password}}" 7 | - debug: msg="the password is {{ lookup('password', '/tmp/test_lookup_password length=15') }}" 8 | -------------------------------------------------------------------------------- /test/samples/with_nested.yml: -------------------------------------------------------------------------------- 1 | - hosts: localhost 2 | connection: local 3 | gather_facts: no 4 | vars: 5 | users: 6 | - foo 7 | - bar 8 | - bam 9 | tasks: 10 | - debug: msg="item.0={{ item[0] }} item.1={{ item[1] }}" 11 | with_nested: 12 | - users 13 | - [ 'clientdb', 'employeedb', 'providerdb' ] 14 | -------------------------------------------------------------------------------- /packaging/debian/rules: -------------------------------------------------------------------------------- 1 | #!/usr/bin/make -f 2 | # -- makefile -- 3 | 4 | DEB_PYTHON2_MODULE_PACKAGES=ansible 5 | ifneq ($(shell dpkg-query -f '$${Version}' -W python-support 2>/dev/null),) 6 | DEB_PYTHON_SYSTEM=pysupport 7 | endif 8 | 9 | include /usr/share/cdbs/1/rules/debhelper.mk 10 | include /usr/share/cdbs/1/class/python-distutils.mk 11 | -------------------------------------------------------------------------------- /test/integration/roles/test_conditionals/vars/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # foo is a dictionary that will be used to check that 3 | # a conditional passes a with_items loop on a variable 4 | # with a missing attribute (ie. foo.results) 5 | cond_bad_attribute: 6 | bar: a 7 | 8 | cond_list_of_items: 9 | results: 10 | - a 11 | - b 12 | - c 13 | 14 | -------------------------------------------------------------------------------- /test/integration/vars_file.yml: -------------------------------------------------------------------------------- 1 | # this file is here to support testing vars_files in the blending tests only. 2 | # in general define test data in the individual role: 3 | # roles/role_name/vars/main.yml 4 | 5 | foo: "Hello" 6 | things1: 7 | - 1 8 | - 2 9 | things2: 10 | - "{{ foo }}" 11 | - "{{ foob }}" 12 | vars_file_var: 321 13 | -------------------------------------------------------------------------------- /test/integration/roles/test_mysql_user/defaults/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # defaults file for test_mysql_user 3 | db_name: 'data' 4 | user_name_1: 'db_user1' 5 | user_name_2: 'db_user2' 6 | 7 | user_password_1: '12345' 8 | user_password_2: '98765' 9 | 10 | db_names: 11 | - clientdb 12 | - employeedb 13 | - providerdb 14 | 15 | tmp_dir: '/tmp' 16 | 17 | -------------------------------------------------------------------------------- /test/integration/galaxy_rolesfile: -------------------------------------------------------------------------------- 1 | # deliberate non-empty whitespace line to follow 2 | 3 | 4 | git+https://bitbucket.org/willthames/git-ansible-galaxy,pr-10620 5 | hg+https://bitbucket.org/willthames/hg-ansible-galaxy 6 | https://bitbucket.org/willthames/http-ansible-galaxy/get/master.tar.gz,,http-role 7 | # comment 8 | git+git@github.com:geerlingguy/ansible-role-php.git 9 | -------------------------------------------------------------------------------- /test/integration/roles/test_special_vars/templates/foo.j2: -------------------------------------------------------------------------------- 1 | test_template_host: "{{template_host}}" 2 | test_template_path: "{{template_path}}" 3 | test_template_mtime: "{{template_mtime}}" 4 | test_template_uid: "{{template_uid}}" 5 | test_template_fullpath: "{{template_fullpath}}" 6 | test_template_run_date: "{{template_run_date}}" 7 | test_ansible_managed: "{{ansible_managed}}" 8 | -------------------------------------------------------------------------------- /test/integration/bad_parsing.yml: -------------------------------------------------------------------------------- 1 | - hosts: testhost 2 | 3 | # the following commands should all parse fine and execute fine 4 | # and represent quoting scenarios that should be legit 5 | 6 | gather_facts: False 7 | 8 | roles: 9 | 10 | # this one has a lot of things that should fail, see makefile for operation w/ tags 11 | 12 | - { role: test_bad_parsing } 13 | -------------------------------------------------------------------------------- /test/code-smell/use-compat-six.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Do we want to check dynamic inventory, bin, etc? 4 | BASEDIR=${1-"lib"} 5 | 6 | SIX_USERS=$(find "$BASEDIR" -name '*.py' -exec grep -wH six \{\} \;|grep import |grep -v ansible.compat| grep -v ansible.module_utils.six) 7 | if test -n "$SIX_USERS" ; then 8 | printf "$SIX_USERS" 9 | exit 1 10 | else 11 | exit 0 12 | fi 13 | -------------------------------------------------------------------------------- /test/integration/test_tags.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: verify tags work as expected 3 | hosts: localhost 4 | gather_facts: False 5 | connection: local 6 | tasks: 7 | - name: Task_with_tag 8 | debug: msg= 9 | tags: tag 10 | - name: Task_with_always_tag 11 | debug: msg= 12 | tags: always 13 | - name: Task_without_tag 14 | debug: msg= 15 | 16 | -------------------------------------------------------------------------------- /test/integration/roles/test_var_precedence/tasks/main.yml: -------------------------------------------------------------------------------- 1 | - debug: var=extra_var 2 | - debug: var=vars_var 3 | - debug: var=vars_files_var 4 | - debug: var=vars_files_var_role 5 | - assert: 6 | that: 7 | - 'extra_var == "extra_var"' 8 | - 'vars_var == "vars_var"' 9 | - 'vars_files_var == "vars_files_var"' 10 | - 'vars_files_var_role == "vars_files_var_role3"' 11 | -------------------------------------------------------------------------------- /test/integration/roles/test_service/tasks/sysv_cleanup.yml: -------------------------------------------------------------------------------- 1 | - name: remove the sysV init file 2 | file: path=/etc/init.d/ansible_test state=absent 3 | register: remove_sysv_result 4 | 5 | - name: assert that the sysV init file was removed 6 | assert: 7 | that: 8 | - "remove_sysv_result.path == '/etc/init.d/ansible_test'" 9 | - "remove_sysv_result.state == 'absent'" 10 | 11 | -------------------------------------------------------------------------------- /test/samples/test_become.yml: -------------------------------------------------------------------------------- 1 | - hosts: all 2 | gather_facts: no 3 | remote_user: root 4 | roles: 5 | - { role: test_become_r2 } 6 | - { role: test_become_r2, sudo_user: testing } 7 | tasks: 8 | - command: whoami 9 | - command: whoami 10 | become_user: testing 11 | - block: 12 | - command: whoami 13 | - block: 14 | - command: whoami 15 | become_user: testing 16 | -------------------------------------------------------------------------------- /test/integration/vault-secret.txt: -------------------------------------------------------------------------------- 1 | $ANSIBLE_VAULT;1.1;AES256 2 | 39303432393062643236616234306333383838333662386165616633303735336537613337396337 3 | 6662666233356462326631653161663663363166323338320a653131656636666339633863346530 4 | 32326238646631653133643936306666643065393038386234343736663239363665613963343661 5 | 3230353633643361650a363034323631613864326438396665343237383566336339323837326464 6 | 3930 7 | -------------------------------------------------------------------------------- /test/integration/roles/test_task_ordering/tasks/main.yml: -------------------------------------------------------------------------------- 1 | - shell: mktemp 2 | register: temppath 3 | - include: taskorder-include.yml 4 | with_items: 5 | - 1 6 | - 2 7 | - 3 8 | 9 | - assert: 10 | that: lookup('file', temppath.stdout) == "one.1.two.1.three.1.four.1.one.2.two.2.three.2.four.2.one.3.two.3.three.3.four.3." 11 | 12 | - file: path="{{temppath.stdout}}" state=absent 13 | 14 | -------------------------------------------------------------------------------- /test/integration/roles/test_template/vars/main.yml: -------------------------------------------------------------------------------- 1 | templated_var: templated_var_loaded 2 | 3 | number_var: 5 4 | string_num: "5" 5 | bool_var: true 6 | part_1: 1 7 | part_2: "Foo" 8 | null_type: !!null 9 | 10 | templated_dict: 11 | number: "{{ number_var }}" 12 | string_num: "{{ string_num }}" 13 | null_type: "{{ null_type }}" 14 | bool: "{{ bool_var }}" 15 | multi_part: "{{ part_1 }}{{ part_2 }}" 16 | 17 | -------------------------------------------------------------------------------- /test/integration/roles/test_filters/vars/main.yml: -------------------------------------------------------------------------------- 1 | some_structure: 2 | - "this is a list element" 3 | - 4 | this: "is a hash element in a list" 5 | warp: 9 6 | where: endor 7 | 8 | users: 9 | - name: steve 10 | hosts: 11 | - host: host_a 12 | password: abc 13 | - host: host_b 14 | - name: bill 15 | hosts: 16 | - host: host_c 17 | password: default 18 | - host: host_d 19 | -------------------------------------------------------------------------------- /contrib/inventory/nagios_ndo.ini: -------------------------------------------------------------------------------- 1 | # Ansible Nagios external inventory script settings 2 | # 3 | 4 | [ndo] 5 | # NDO database URI 6 | # Make sure that data is returned as strings and not bytes if using python 3. 7 | # See http://docs.sqlalchemy.org/en/rel_1_0/core/engines.html 8 | # for supported databases and URI format. 9 | # Example for mysqlclient module : 10 | database_uri=mysql+mysqldb://user:passwd@hostname/ndo?charset=utf8&use_unicode=1 11 | -------------------------------------------------------------------------------- /test/utils/docker/ubuntu1204/init-fake.conf: -------------------------------------------------------------------------------- 1 | # fake some events needed for correct startup other services 2 | 3 | description "In-Container Upstart Fake Events" 4 | 5 | start on startup 6 | 7 | script 8 | rm -rf /var/run/*.pid 9 | rm -rf /var/run/network/* 10 | /sbin/initctl emit stopped JOB=udevtrigger --no-wait 11 | /sbin/initctl emit started JOB=udev --no-wait 12 | /sbin/initctl emit runlevel RUNLEVEL=3 --no-wait 13 | end script 14 | -------------------------------------------------------------------------------- /test/utils/docker/ubuntu1404/init-fake.conf: -------------------------------------------------------------------------------- 1 | # fake some events needed for correct startup other services 2 | 3 | description "In-Container Upstart Fake Events" 4 | 5 | start on startup 6 | 7 | script 8 | rm -rf /var/run/*.pid 9 | rm -rf /var/run/network/* 10 | /sbin/initctl emit stopped JOB=udevtrigger --no-wait 11 | /sbin/initctl emit started JOB=udev --no-wait 12 | /sbin/initctl emit runlevel RUNLEVEL=3 --no-wait 13 | end script 14 | -------------------------------------------------------------------------------- /docsite/rst_common/ansible_ssh_changes_note.rst: -------------------------------------------------------------------------------- 1 | .. note:: 2 | 3 | Ansible 2.0 has deprecated the “ssh” from ``ansible_ssh_user``, ``ansible_ssh_host``, and ``ansible_ssh_port`` to become ``ansible_user``, ``ansible_host``, and ``ansible_port``. If you are using a version of Ansible prior to 2.0, you should continue using the older style variables (``ansible_ssh_*``). These shorter variables are ignored, without warning, in older versions of Ansible. 4 | -------------------------------------------------------------------------------- /packaging/arch/README.md: -------------------------------------------------------------------------------- 1 | Arch Packaging Files 2 | -------------------- 3 | 4 | The PKGBUILD in this directory is here for reference. 5 | You should use AUR to install [ansible-git][1], using `yaourt` for instance: 6 | 7 | yaourt -S ansible-git 8 | 9 | You can also use a AUR package for the stable version of [ansible][2]. 10 | 11 | [1]: https://aur.archlinux.org/packages/ansible-git/ 12 | [2]: https://aur.archlinux.org/packages/ansible/ 13 | 14 | -------------------------------------------------------------------------------- /docsite/rst/quickstart.rst: -------------------------------------------------------------------------------- 1 | Quickstart Video 2 | ```````````````` 3 | 4 | We've recorded a short video that shows how to get started with Ansible that you may like to use alongside the documentation. 5 | 6 | The `quickstart video `_ is about 30 minutes long and will show you some of the basics about your 7 | first steps with Ansible. 8 | 9 | Enjoy, and be sure to visit the rest of the documentation to learn more. 10 | -------------------------------------------------------------------------------- /hacking/yamlcheck.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | # long version of this one liner: python -c 'import yaml,sys;yaml.safe_load(sys.stdin)' < yamltest.txt 3 | import yaml 4 | import sys 5 | 6 | if len(sys.argv) > 1: 7 | check_file = open(sys.argv[1]) 8 | else: 9 | check_file = sys.stdin 10 | 11 | try: 12 | yaml.safe_load(check_file) 13 | except yaml.scanner.ScannerError as e: 14 | sys.exit('Invalid YAML:\n%s' % str(e)) 15 | 16 | print('valid YAML') 17 | -------------------------------------------------------------------------------- /test/samples/with_dict.yml: -------------------------------------------------------------------------------- 1 | - hosts: localhost 2 | connection: local 3 | gather_facts: no 4 | vars: 5 | users: 6 | alice: 7 | name: Alice Appleworth 8 | telephone: 123-456-7890 9 | bob: 10 | name: Bob Bananarama 11 | telephone: 987-654-3210 12 | tasks: 13 | - name: Print phone records 14 | debug: msg="User {{ item.key }} is {{ item.value.name }} ({{ item.value.telephone }})" 15 | with_dict: users 16 | -------------------------------------------------------------------------------- /test/samples/with_sequence.yml: -------------------------------------------------------------------------------- 1 | - hosts: localhost 2 | connection: local 3 | gather_facts: no 4 | tasks: 5 | 6 | - debug: msg="name={{ item }} state=present groups=evens" 7 | with_sequence: start=0 end=32 format=testuser%02x 8 | 9 | - debug: msg="dest=/var/stuff/{{ item }} state=directory" 10 | with_sequence: start=4 end=16 stride=2 11 | 12 | - debug: msg="name=group{{ item }} state=present" 13 | with_sequence: count=4 14 | -------------------------------------------------------------------------------- /test/integration/test_templating_settings.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: 'Test templating in name' 3 | hosts: localhost 4 | connection: local 5 | vars: 6 | a_list: 7 | - 'part' 8 | - 'of a' 9 | - 'name' 10 | 11 | tasks: 12 | # Note: this only tests that we do not traceback. It doesn't test that the 13 | # name goes through templating correctly 14 | - name: 'Task: {{ a_list | to_json }}' 15 | debug: msg='{{ a_list | to_json }}' 16 | 17 | -------------------------------------------------------------------------------- /docsite/_themes/srtd/__init__.py: -------------------------------------------------------------------------------- 1 | """Sphinx ReadTheDocs theme. 2 | 3 | From https://github.com/ryan-roemer/sphinx-bootstrap-theme. 4 | 5 | """ 6 | import os 7 | 8 | VERSION = (0, 1, 5) 9 | 10 | __version__ = ".".join(str(v) for v in VERSION) 11 | __version_full__ = __version__ 12 | 13 | 14 | def get_html_theme_path(): 15 | """Return list of HTML theme paths.""" 16 | cur_dir = os.path.abspath(os.path.dirname(os.path.dirname(__file__))) 17 | return cur_dir 18 | -------------------------------------------------------------------------------- /test/integration/group_vars/all: -------------------------------------------------------------------------------- 1 | a: 999 2 | b: 998 3 | c: 997 4 | d: 996 5 | uno: 1 6 | dos: 2 7 | tres: 3 8 | etest: 'from group_vars' 9 | inventory_beats_default: 'narf' 10 | # variables used for hash merging behavior testing 11 | test_hash: 12 | group_vars_all: "this is in group_vars/all" 13 | # variables used for conditional testing 14 | test_bare: true 15 | test_bare_var: 123 16 | test_bare_nested_good: "{{test_bare_var}} == 123" 17 | test_bare_nested_bad: "{{test_bare_var}} == 321" 18 | -------------------------------------------------------------------------------- /test/samples/with_subelements.yml: -------------------------------------------------------------------------------- 1 | - hosts: localhost 2 | connection: local 3 | gather_facts: no 4 | vars: 5 | users: 6 | - name: alice 7 | authorized: 8 | - /tmp/alice/onekey.pub 9 | - /tmp/alice/twokey.pub 10 | - name: bob 11 | authorized: 12 | - /tmp/bob/id_rsa.pub 13 | 14 | tasks: 15 | - debug: msg="user={{ item.0.name }} key='{{ item.1 }}'" 16 | with_subelements: 17 | - "{{ users }}" 18 | - authorized 19 | -------------------------------------------------------------------------------- /test/integration/lookup.ini: -------------------------------------------------------------------------------- 1 | [global] 2 | # A comment 3 | value1=Text associated with value1 and global section 4 | value2=Same for value2 and global section 5 | value.dot=Properties with dot 6 | field.with.space = another space 7 | 8 | [section1] 9 | value1=section1/value1 10 | value2=section1/value2 11 | 12 | [value_section] 13 | value1=1 14 | value2=2 15 | value3=3 16 | other1=4 17 | other2=5 18 | 19 | [other_section] 20 | value1=1 21 | value2=2 22 | value3=3 23 | other1=4 24 | other2=5 25 | -------------------------------------------------------------------------------- /test/samples/test_blocks_of_blocks.yml: -------------------------------------------------------------------------------- 1 | - hosts: localhost 2 | gather_facts: no 3 | tasks: 4 | - block: 5 | - block: 6 | - block: 7 | - block: 8 | - debug: msg="are we there yet {{foo}}?" 9 | always: 10 | - debug: msg="a random always block" 11 | - fail: 12 | rescue: 13 | - debug: msg="rescuing from the fail" 14 | when: not skip_me|default(False) 15 | - debug: msg="i am the last task" 16 | vars: 17 | foo: bar 18 | -------------------------------------------------------------------------------- /hacking/authors.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # script from http://stackoverflow.com/questions/12133583 3 | set -e 4 | 5 | # Get a list of authors ordered by number of commits 6 | # and remove the commit count column 7 | AUTHORS=$(git --no-pager shortlog -nse --no-merges | cut -f 2- ) 8 | if [ -z "$AUTHORS" ] ; then 9 | echo "Authors list was empty" 10 | exit 1 11 | fi 12 | 13 | # Display the authors list and write it to the file 14 | echo "$AUTHORS" | tee "$(git rev-parse --show-toplevel)/AUTHORS.TXT" 15 | -------------------------------------------------------------------------------- /test/code-smell/replace-urlopen.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | BASEDIR=${1-"."} 4 | 5 | URLLIB_USERS=$(find "$BASEDIR" -name '*.py' -exec grep -H urlopen \{\} \;) 6 | URLLIB_USERS=$(echo "$URLLIB_USERS" | sed '/\(\n\|lib\/ansible\/module_utils\/urls.py\|lib\/ansible\/module_utils\/six.py\|lib\/ansible\/compat\/six\/_six.py\|.tox\)/d') 7 | URLLIB_USERS=$(echo "$URLLIB_USERS" | sed '/^[^:]\+:#/d') 8 | if test -n "$URLLIB_USERS" ; then 9 | printf "$URLLIB_USERS" 10 | exit 1 11 | else 12 | exit 0 13 | fi 14 | -------------------------------------------------------------------------------- /test/integration/roles/test_task_ordering/tasks/taskorder-include.yml: -------------------------------------------------------------------------------- 1 | # This test ensures that included tasks are run in order. 2 | # There have been regressions where included tasks and 3 | # nested blocks ran out of order... 4 | 5 | - shell: printf one.{{ item }}. >> {{ temppath.stdout }} 6 | - block: 7 | - shell: printf two.{{ item }}. >> {{ temppath.stdout }} 8 | - block: 9 | - shell: printf three.{{ item }}. >> {{ temppath.stdout }} 10 | - shell: printf four.{{ item }}. >> {{ temppath.stdout }} 11 | -------------------------------------------------------------------------------- /test/integration/roles/test_uri/vars/main.yml: -------------------------------------------------------------------------------- 1 | uri_os_packages: 2 | RedHat: 3 | - python-pyasn1 4 | - pyOpenSSL 5 | - python-urllib3 6 | Debian: 7 | - python-pyasn1 8 | - python-openssl 9 | - python-urllib3 10 | 11 | # Needs to be a url to a site that is hosted using SNI. 12 | # Eventually we should make this a test server that we stand up as part of the test run. 13 | #SNI_URI: 'https://sni.velox.ch' 14 | SNI_URI: "https://www.mnot.net/blog/2014/05/09/if_you_can_read_this_youre_sniing" 15 | -------------------------------------------------------------------------------- /test/integration/roles/test_azure/defaults/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # defaults file for test_azure 3 | instance_name: "{{ resource_prefix|lower }}" 4 | cert_path: "{{ azure_cert_path }}" 5 | subscription_id: "{{ azure_subscription_id }}" 6 | storage_account: "{{ azure_storage_account|default('ansibleeast') }}" 7 | role_size: "{{ azure_role_size|default('Basic_A0') }}" 8 | user: "{{ azure_user|default('ansible_user') }}" 9 | location: "{{ azure_location|default('East US') }}" 10 | password: "{{ azure_password|default('abc123Q%') }}" 11 | -------------------------------------------------------------------------------- /test/integration/roles/test_vault_embedded/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Assert that a embedded vault of a string with no newline works 3 | assert: 4 | that: 5 | - '"{{ vault_encrypted_one_line_var }}" == "Setec Astronomy"' 6 | 7 | - name: Assert that a multi line embedded vault works, including new line 8 | assert: 9 | that: 10 | - vault_encrypted_var == "Setec Astronomy\n" 11 | 12 | # TODO: add a expected fail here 13 | # - debug: var=vault_encrypted_one_line_var_with_embedded_template 14 | 15 | -------------------------------------------------------------------------------- /docsite/_themes/srtd/breadcrumbs.html: -------------------------------------------------------------------------------- 1 | 10 |
11 | 12 | -------------------------------------------------------------------------------- /test/integration/galaxy_roles.yml: -------------------------------------------------------------------------------- 1 | # change these to some ansible owned test roles 2 | - src: briancoca.oracle_java7 3 | name: oracle_java7 4 | 5 | - src: git+http://bitbucket.org/willthames/git-ansible-galaxy 6 | version: pr-10620 7 | 8 | - src: http://bitbucket.org/willthames/hg-ansible-galaxy 9 | scm: hg 10 | 11 | - src: https://bitbucket.org/willthames/http-ansible-galaxy/get/master.tar.gz 12 | name: http-role 13 | 14 | - src: git@github.com:geerlingguy/ansible-role-php.git 15 | scm: git 16 | name: php 17 | 18 | -------------------------------------------------------------------------------- /docs-api/index.rst: -------------------------------------------------------------------------------- 1 | .. ansible documentation master file, created by 2 | sphinx-quickstart on Tue Jun 14 10:43:24 2016. 3 | You can adapt this file completely to your liking, but it should at least 4 | contain the root `toctree` directive. 5 | 6 | Welcome to ansible's documentation! 7 | =================================== 8 | 9 | Contents: 10 | 11 | .. toctree:: 12 | :maxdepth: 2 13 | 14 | 15 | 16 | Indices and tables 17 | ================== 18 | 19 | * :ref:`genindex` 20 | * :ref:`modindex` 21 | * :ref:`search` 22 | 23 | -------------------------------------------------------------------------------- /test/integration/cloudflare.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - hosts: localhost 3 | connection: local 4 | gather_facts: no 5 | tags: 6 | - cloudflare 7 | roles: 8 | - { role: test_cloudflare_dns, tags: test_cloudflare_dns } 9 | -------------------------------------------------------------------------------- /test/integration/roles/test_service/tasks/sysv_setup.yml: -------------------------------------------------------------------------------- 1 | - name: install the sysV init file 2 | copy: src=ansible.sysv dest=/etc/init.d/ansible_test mode=0755 3 | register: install_sysv_result 4 | 5 | - name: assert that the sysV init file was installed 6 | assert: 7 | that: 8 | - "install_sysv_result.dest == '/etc/init.d/ansible_test'" 9 | - "install_sysv_result.state == 'file'" 10 | - "install_sysv_result.mode == '0755'" 11 | - "install_sysv_result.checksum == '174fa255735064b420600e4c8637ea0eff28d0c1'" 12 | 13 | -------------------------------------------------------------------------------- /contrib/inventory/nsot.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | juniper_routers: 3 | query: 'deviceType=ROUTER manufacturer=JUNIPER' 4 | vars: 5 | group: juniper_routers 6 | netconf: true 7 | os: junos 8 | 9 | cisco_asa: 10 | query: 'manufacturer=CISCO deviceType=FIREWALL' 11 | vars: 12 | group: cisco_asa 13 | routed_vpn: false 14 | stateful: true 15 | 16 | old_cisco_asa: 17 | query: 'manufacturer=CISCO deviceType=FIREWALL -softwareVersion=8.3+' 18 | vars: 19 | old_nat: true 20 | 21 | not_f10: 22 | query: '-manufacturer=FORCE10' 23 | -------------------------------------------------------------------------------- /test/integration/test_win_group1.yml: -------------------------------------------------------------------------------- 1 | - hosts: windows 2 | gather_facts: false 3 | roles: 4 | - { role: test_win_raw, tags: test_win_raw } 5 | - { role: test_win_script, tags: test_win_script } 6 | - { role: test_win_ping, tags: test_win_ping } 7 | - { role: test_win_setup, tags: test_win_setup } 8 | - { role: test_win_slurp, tags: test_win_slurp } 9 | - { role: test_win_fetch, tags: test_win_fetch } 10 | - { role: test_win_regmerge, tags: test_win_regmerge } 11 | - { role: test_win_regedit, tags: test_win_regedit } 12 | -------------------------------------------------------------------------------- /packaging/release/templates/RELEASES.tmpl: -------------------------------------------------------------------------------- 1 | Ansible Releases at a Glance 2 | ============================ 3 | 4 | VERSION RELEASE CODE NAME 5 | ++++++++++++++++++++++++++++++ 6 | 7 | {% for version in versions %} 8 | {% for vkey, vdata in version.iteritems() %} 9 | {% for release in vdata.releases %} 10 | {% for rkey, rdata in release.iteritems() %} 11 | {% set major_minor = vkey + "." + rkey %} 12 | {{"%-8s"|format(major_minor)}} {{"%-10s"|format(rdata)}} "{{vdata.code_name}}" 13 | {% endfor %} 14 | {% endfor %} 15 | {% endfor %} 16 | {% endfor %} 17 | -------------------------------------------------------------------------------- /test/integration/roles/test_win_user/files/lockout_user.ps1: -------------------------------------------------------------------------------- 1 | trap 2 | { 3 | Write-Error -ErrorRecord $_ 4 | exit 1; 5 | } 6 | 7 | $username = $args[0] 8 | [void][system.reflection.assembly]::LoadWithPartialName('System.DirectoryServices.AccountManagement') 9 | $pc = New-Object -TypeName System.DirectoryServices.AccountManagement.PrincipalContext 'Machine', $env:COMPUTERNAME 10 | For ($i = 1; $i -le 10; $i++) { 11 | try { 12 | $pc.ValidateCredentials($username, 'b@DP@ssw0rd') 13 | } 14 | catch { 15 | break 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /test/integration/roles/setup_postgresql_db/files/pg_hba.conf: -------------------------------------------------------------------------------- 1 | # !!! This file managed by Ansible. Any local changes may be overwritten. !!! 2 | 3 | # Database administrative login by UNIX sockets 4 | # note: you may wish to restrict this further later 5 | local all postgres trust 6 | 7 | # TYPE DATABASE USER CIDR-ADDRESS METHOD 8 | local all all md5 9 | host all all 127.0.0.1/32 md5 10 | host all all ::1/128 md5 11 | -------------------------------------------------------------------------------- /test/integration/roles/test_loops/tasks/main.yml: -------------------------------------------------------------------------------- 1 | - name: Measure time before 2 | shell: date +%s 3 | register: before 4 | 5 | - debug: 6 | var: i 7 | with_sequence: count=3 8 | loop_control: 9 | loop_var: i 10 | pause: 2 11 | 12 | - name: Measure time after 13 | shell: date +%s 14 | register: after 15 | 16 | # since there is 3 rounds, and 2 seconds between, it should last 4 seconds 17 | # we do not test the upper bound, since CI can lag significantly 18 | - assert: 19 | that: 20 | - '(after.stdout |int) - (before.stdout|int) >= 4' 21 | -------------------------------------------------------------------------------- /test/integration/lookup_paths/testplay.yml: -------------------------------------------------------------------------------- 1 | - name: test initial state 2 | hosts: testhost 3 | connection: local 4 | gather_facts: false 5 | roles: 6 | - showfile 7 | tasks: 8 | - name: from play 9 | set_fact: play_result="{{lookup('file', 'testfile')}}" 10 | 11 | - name: output output {{stage}} 12 | debug: msg="play> {{play_out}}, role> {{role_out}}" 13 | 14 | - name: verify that result match expected 15 | assert: 16 | that: 17 | - 'play_result == play_out' 18 | - 'role_result == role_out' 19 | 20 | -------------------------------------------------------------------------------- /test/integration/roles/test_var_precedence_dep/tasks/main.yml: -------------------------------------------------------------------------------- 1 | - debug: var=extra_var 2 | - debug: var=param_var 3 | - debug: var=vars_var 4 | - debug: var=vars_files_var 5 | - debug: var=vars_files_var_role 6 | - debug: var=defaults_file_var_role1 7 | - assert: 8 | that: 9 | - 'extra_var == "extra_var"' 10 | - 'param_var == "param_var_role1"' 11 | - 'vars_var == "vars_var"' 12 | - 'vars_files_var == "vars_files_var"' 13 | - 'vars_files_var_role == "vars_files_var_dep"' 14 | - 'defaults_file_var_role1 == "defaults_file_var_role1"' 15 | -------------------------------------------------------------------------------- /test/integration/roles/test_var_precedence_role1/tasks/main.yml: -------------------------------------------------------------------------------- 1 | - debug: var=extra_var 2 | - debug: var=param_var 3 | - debug: var=vars_var 4 | - debug: var=vars_files_var 5 | - debug: var=vars_files_var_role 6 | - debug: var=defaults_file_var_role1 7 | - assert: 8 | that: 9 | - 'extra_var == "extra_var"' 10 | - 'param_var == "param_var_role1"' 11 | - 'vars_var == "vars_var"' 12 | - 'vars_files_var == "vars_files_var"' 13 | - 'vars_files_var_role == "vars_files_var_role1"' 14 | - 'defaults_file_var_role1 == "defaults_file_var_role1"' 15 | -------------------------------------------------------------------------------- /test/integration/roles/test_var_precedence_role2/tasks/main.yml: -------------------------------------------------------------------------------- 1 | - debug: var=extra_var 2 | - debug: var=param_var 3 | - debug: var=vars_var 4 | - debug: var=vars_files_var 5 | - debug: var=vars_files_var_role 6 | - debug: var=defaults_file_var_role1 7 | - assert: 8 | that: 9 | - 'extra_var == "extra_var"' 10 | - 'param_var == "param_var_role2"' 11 | - 'vars_var == "vars_var"' 12 | - 'vars_files_var == "vars_files_var"' 13 | - 'vars_files_var_role == "vars_files_var_role2"' 14 | - 'defaults_file_var_role2 == "overridden by role vars"' 15 | -------------------------------------------------------------------------------- /test/integration/roles/test_var_precedence_role3/tasks/main.yml: -------------------------------------------------------------------------------- 1 | - debug: var=extra_var 2 | - debug: var=param_var 3 | - debug: var=vars_var 4 | - debug: var=vars_files_var 5 | - debug: var=vars_files_var_role 6 | - debug: var=defaults_file_var_role1 7 | - assert: 8 | that: 9 | - 'extra_var == "extra_var"' 10 | - 'param_var == "param_var_role3"' 11 | - 'vars_var == "vars_var"' 12 | - 'vars_files_var == "vars_files_var"' 13 | - 'vars_files_var_role == "vars_files_var_role3"' 14 | - 'defaults_file_var_role3 == "overridden from inventory"' 15 | -------------------------------------------------------------------------------- /docsite/rst/guides.rst: -------------------------------------------------------------------------------- 1 | Detailed Guides 2 | ``````````````` 3 | 4 | This section is new and evolving. The idea here is to explore particular use cases in greater depth and provide a more "top down" explanation of some basic features. 5 | 6 | .. toctree:: 7 | :maxdepth: 1 8 | 9 | guide_aws 10 | guide_azure 11 | guide_rax 12 | guide_gce 13 | guide_cloudstack 14 | guide_vagrant 15 | guide_rolling_upgrade 16 | guide_docker 17 | 18 | Pending topics may include: Docker, Jenkins, Google Compute Engine, Linode/DigitalOcean, Continuous Deployment, and more. 19 | -------------------------------------------------------------------------------- /test/utils/ansible-playbook_integration_runner/roles/ansible_test_deps/meta/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | galaxy_info: 3 | author: Chris Meyers 4 | description: install ansible integration test dependencies 5 | company: Ansible 6 | license: license (GPLv2, CC-BY, etc) 7 | min_ansible_version: 1.2 8 | platforms: 9 | - name: EL 10 | versions: 11 | - 6 12 | - 7 13 | - name: Ubuntu 14 | versions: 15 | - precise 16 | - trusty 17 | galaxy_tags: 18 | - testing 19 | - integration 20 | - ansible 21 | - dependencies 22 | dependencies: [] 23 | 24 | -------------------------------------------------------------------------------- /test/samples/test_include.yml: -------------------------------------------------------------------------------- 1 | - hosts: all 2 | gather_facts: no 3 | tasks: 4 | - block: 5 | - include: include.yml a=1 6 | when: 1 == 1 7 | notify: foo 8 | - include: include.yml a={{item}} 9 | with_items: 10 | - foo 11 | - bar 12 | - bam 13 | - include: "{{inventory_hostname}}_include.yml" 14 | - fail: 15 | 16 | rescue: 17 | - include: include.yml a=rescue 18 | 19 | always: 20 | - include: include.yml a=always 21 | 22 | #handlers: 23 | #- name: foo 24 | # include: include.yml a="this is a handler" 25 | 26 | -------------------------------------------------------------------------------- /test/utils/shippable/code-smell.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash -eux 2 | 3 | source_root=$(python -c "from os import path; print(path.abspath(path.join(path.dirname('$0'), '../../..')))") 4 | 5 | install_deps="${INSTALL_DEPS:-}" 6 | 7 | cd "${source_root}" 8 | 9 | if [ "${install_deps}" != "" ]; then 10 | pip install -r "${source_root}/test/utils/shippable/code-smell-requirements.txt" --upgrade 11 | pip list 12 | fi 13 | 14 | yamllint . 15 | test/code-smell/replace-urlopen.sh . 16 | test/code-smell/use-compat-six.sh lib 17 | test/code-smell/boilerplate.sh 18 | test/code-smell/required-and-default-attributes.sh 19 | -------------------------------------------------------------------------------- /ticket_stubs/wider_discussion.md: -------------------------------------------------------------------------------- 1 | Submission Received 2 | =================== 3 | 4 | Hi! 5 | 6 | Thanks very much for your submission to Ansible. It sincerely means a lot to us. 7 | 8 | We are interested in this idea and would like to see a wider discussion on it 9 | on one of our lists. Reasons for this include: 10 | 11 | * INSERT REASONS! 12 | 13 | Can you please post on ansible-development list so we can talk about this idea with the wider group? 14 | 15 | * https://groups.google.com/forum/#!forum/ansible-devel 16 | 17 | Thank you once again for this and your interest in Ansible! 18 | 19 | -------------------------------------------------------------------------------- /test/integration/test_win_group2.yml: -------------------------------------------------------------------------------- 1 | - hosts: windows 2 | gather_facts: false 3 | roles: 4 | - { role: test_win_group, tags: test_win_group } 5 | - { role: test_win_file, tags: test_win_file } 6 | - { role: test_win_copy, tags: test_win_copy } 7 | - { role: test_win_template, tags: test_win_template } 8 | - { role: test_win_lineinfile, tags: test_win_lineinfile } 9 | - { role: test_win_stat, tags: test_win_stat } 10 | - { role: test_win_get_url, tags: test_win_get_url } 11 | - { role: test_win_msi, tags: test_win_msi } 12 | - { role: test_win_package, tags: test_win_package } 13 | -------------------------------------------------------------------------------- /ticket_stubs/README.md: -------------------------------------------------------------------------------- 1 | Ticket Stubs 2 | ============ 3 | 4 | What's this? 5 | 6 | This is a directory of common responses to save some typing when responding to GitHub tickets to avoid 7 | some carpal tunnel syndrome events as Ansible takes off into stratosphere territory. 8 | 9 | These are actually on GitHub so it's easy for people to make these snippets of text even more helpful 10 | or to correct typos. 11 | 12 | (It's just expected that folks like @mpdehaan and @jimi-c will be pasting these in though, we'd ask 13 | that others not do this) 14 | 15 | If there are questions, email michael@ansible.com! 16 | 17 | -------------------------------------------------------------------------------- /test/integration/roles/test_apt_repository/tasks/cleanup.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # tasks to cleanup a repo and assert it is gone 3 | 4 | - name: remove existing ppa 5 | apt_repository: repo={{test_ppa_name}} state=absent 6 | ignore_errors: true 7 | 8 | - name: test that ppa does not exist (expect pass) 9 | shell: cat /etc/apt/sources.list /etc/apt/sources.list.d/* | grep "{{test_ppa_spec}}" 10 | register: command 11 | failed_when: command.rc == 0 12 | changed_when: false 13 | 14 | # Should this use apt-key, maybe? 15 | - name: remove ppa key 16 | apt_key: id={{test_ppa_key}} state=absent 17 | ignore_errors: true 18 | 19 | -------------------------------------------------------------------------------- /test/code-smell/no-basestring.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | BASEDIR=${1-"."} 4 | 5 | # Not entirely correct but 6 | # * basestring is still present and harmless in comments 7 | # * basestring is also currently present in modules. Porting of modules is more 8 | # of an Ansible 2.3 or greater goal. 9 | BASESTRING_USERS=$(grep -r basestring $BASEDIR |grep isinstance| grep -v lib/ansible/compat/six/_six.py|grep -v lib/ansible/module_utils/six.py|grep -v lib/ansible/modules/core|grep -v lib/ansible/modules/extras) 10 | 11 | if test -n "$BASESTRING_USERS" ; then 12 | printf "$BASESTRING_USERS" 13 | exit 1 14 | else 15 | exit 0 16 | fi 17 | -------------------------------------------------------------------------------- /test/units/plugins/action/fixtures/synchronize/basic/meta.yaml: -------------------------------------------------------------------------------- 1 | fixtures: 2 | taskvars_in: taskvars_in.json 3 | taskvars_out: taskvars_out.json 4 | connection: 5 | transport: 'ssh' 6 | hostvars: 7 | '127.0.0.1': {} 8 | '::1': {} 9 | 'localhost': {} 10 | asserts: 11 | - "hasattr(SAM._connection, 'ismock')" 12 | - "SAM._connection.transport == 'local'" 13 | - "self._play_context.shell == 'sh'" 14 | - "self.execute_called" 15 | - "self.task.args['_local_rsync_path'] == 'rsync'" 16 | - "self.task.args['src'] == '/tmp/deleteme'" 17 | - "self.task.args['dest'] == 'root@el6host:/tmp/deleteme'" 18 | -------------------------------------------------------------------------------- /test/integration/roles/test_uri/files/README: -------------------------------------------------------------------------------- 1 | The files were taken from http://www.json.org/JSON_checker/ 2 | > If the JSON_checker is working correctly, it must accept all of the pass*.json files and reject all of the fail*.json files. 3 | 4 | Difference with JSON_checker dataset: 5 | - *${n}.json renamed to *${n-1}.json to be 0-based 6 | - fail0.json renamed to pass3.json as python json module allows JSON payload to be string 7 | - fail17.json renamed to pass4.json as python json module has no problems with deep structures 8 | - fail32.json renamed to fail0.json to fill gap 9 | - fail31.json renamed to fail17.json to fill gap 10 | -------------------------------------------------------------------------------- /test/samples/test_block.yml: -------------------------------------------------------------------------------- 1 | - hosts: all 2 | gather_facts: yes 3 | tasks: 4 | - block: 5 | - debug: msg="this is the first task" 6 | - fail: 7 | when: inventory_hostname == "l2" 8 | - debug: msg="only l1 and l3 should see me" 9 | rescue: 10 | - debug: msg="this is the rescue" 11 | - command: /bin/false 12 | - debug: msg="no host should see this run" 13 | always: 14 | - debug: msg="this is the always block, it will always be seen" 15 | when: foo|default('') != "some value" 16 | tags: 17 | - foo 18 | - bar 19 | - debug: msg="you should only see l1 and l3 run this" 20 | -------------------------------------------------------------------------------- /.yamllint: -------------------------------------------------------------------------------- 1 | extends: default 2 | 3 | # Disable all cosmetic rules 4 | # (see https://github.com/ansible/ansible/pull/15470#issuecomment-214437876) 5 | # Only keep 'key-duplicates' and 'new-lines: {type: unix}' checks enabled. 6 | 7 | rules: 8 | braces: disable 9 | brackets: disable 10 | colons: disable 11 | commas: disable 12 | comments: disable 13 | comments-indentation: disable 14 | document-start: disable 15 | empty-lines: disable 16 | hyphens: disable 17 | indentation: disable 18 | key-duplicates: enable 19 | line-length: disable 20 | new-line-at-end-of-file: disable 21 | new-lines: {type: unix} 22 | trailing-spaces: disable 23 | -------------------------------------------------------------------------------- /test/integration/roles/test_cs_instance/tasks/setup.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: setup ssh key 3 | cs_sshkeypair: name={{ cs_resource_prefix }}-sshkey 4 | register: sshkey 5 | - name: verify setup ssh key 6 | assert: 7 | that: 8 | - sshkey|success 9 | 10 | - name: setup affinity group 11 | cs_affinitygroup: name={{ cs_resource_prefix }}-ag 12 | register: ag 13 | - name: verify setup affinity group 14 | assert: 15 | that: 16 | - ag|success 17 | 18 | - name: setup security group 19 | cs_securitygroup: name={{ cs_resource_prefix }}-sg 20 | register: sg 21 | - name: verify setup security group 22 | assert: 23 | that: 24 | - sg|success 25 | -------------------------------------------------------------------------------- /test/integration/test_includes2.yml: -------------------------------------------------------------------------------- 1 | 2 | - name: verify playbook includes can take parameters 3 | hosts: testhost 4 | tasks: 5 | - assert: 6 | that: 7 | - "parameter1 == 'asdf'" 8 | - "parameter2 == 'jkl'" 9 | 10 | - name: verify task include logic 11 | hosts: testhost 12 | gather_facts: True 13 | roles: 14 | - { role: test_includes, tags: test_includes } 15 | tasks: 16 | - include: roles/test_includes/tasks/not_a_role_task.yml 17 | - include: roles/test_includes/tasks/empty.yml 18 | - assert: 19 | that: 20 | - "ca == 33000" 21 | - "cb == 33001" 22 | - "cc == 33002" 23 | -------------------------------------------------------------------------------- /test/integration/roles/test_docker/tasks/docker-setup-rht.yml: -------------------------------------------------------------------------------- 1 | - name: Install docker packages (rht family) 2 | package: 3 | state: present 4 | name: docker-io,docker-registry,python-docker-py,nginx 5 | 6 | - name: Install netcat (Fedora) 7 | package: 8 | state: present 9 | name: nmap-ncat 10 | when: ansible_distribution == 'Fedora' or (ansible_os_family == 'RedHat' and ansible_distribution_version|version_compare('>=', 7)) 11 | 12 | - name: Install netcat (RHEL) 13 | package: 14 | state: present 15 | name: nc 16 | when: ansible_distribution != 'Fedora' and (ansible_os_family == 'RedHat' and ansible_distribution_version|version_compare('<', 7)) 17 | 18 | -------------------------------------------------------------------------------- /test/integration/roles/test_vault/vars/main.yml: -------------------------------------------------------------------------------- 1 | $ANSIBLE_VAULT;1.1;AES256 2 | 31626536666232643662346539623662393436386162643439643434656231343435653936343235 3 | 6139346364396166336636383734333430373763336434310a303137623539653939336132626234 4 | 64613232396532313731313935333433353330666466646663303233323331636234326464643166 5 | 6538653264636166370a613161313064653566323037393962643032353230396536313865326362 6 | 34396262303130326632623162623230346238633932393938393766313036643835613936356233 7 | 33323730373331386337353339613165373064323134343930333031623036326164353534646631 8 | 31313963666234623731316238656233396638643331306231373539643039383434373035306233 9 | 30386230363730643561 10 | -------------------------------------------------------------------------------- /test/integration/vars/test_var_encrypted.yml: -------------------------------------------------------------------------------- 1 | $ANSIBLE_VAULT;1.1;AES256 2 | 31626536666232643662346539623662393436386162643439643434656231343435653936343235 3 | 6139346364396166336636383734333430373763336434310a303137623539653939336132626234 4 | 64613232396532313731313935333433353330666466646663303233323331636234326464643166 5 | 6538653264636166370a613161313064653566323037393962643032353230396536313865326362 6 | 34396262303130326632623162623230346238633932393938393766313036643835613936356233 7 | 33323730373331386337353339613165373064323134343930333031623036326164353534646631 8 | 31313963666234623731316238656233396638643331306231373539643039383434373035306233 9 | 30386230363730643561 10 | -------------------------------------------------------------------------------- /lib/ansible/galaxy/data/travis.j2: -------------------------------------------------------------------------------- 1 | --- 2 | language: python 3 | python: "2.7" 4 | 5 | # Use the new container infrastructure 6 | sudo: false 7 | 8 | # Install ansible 9 | addons: 10 | apt: 11 | packages: 12 | - python-pip 13 | 14 | install: 15 | # Install ansible 16 | - pip install ansible 17 | 18 | # Check ansible version 19 | - ansible --version 20 | 21 | # Create ansible.cfg with correct roles_path 22 | - printf '[defaults]\nroles_path=../' >ansible.cfg 23 | 24 | script: 25 | # Basic role syntax check 26 | - ansible-playbook tests/test.yml -i tests/inventory --syntax-check 27 | 28 | notifications: 29 | webhooks: https://galaxy.ansible.com/api/v1/notifications/ -------------------------------------------------------------------------------- /test/integration/roles/ec2_elb_instance_setup/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # tasks file for ec2_elb_setup 3 | 4 | # ============================================================ 5 | # install apache on the ec2 instances 6 | 7 | - name: install apache on new ec2 instances 8 | package: name=httpd 9 | when: ansible_os_family == 'RedHat' 10 | 11 | - name: install apache on new ec2 instances 12 | package: name=apache 13 | when: ansible_os_family == 'Debian' 14 | 15 | - name: start and enable apache 16 | service: name=httpd state=started enabled=yes 17 | 18 | - name: create an index.html landing page 19 | copy: dest=/var/www/html/index.html src=index.html owner=root group=root mode=0644 20 | -------------------------------------------------------------------------------- /hacking/templates/playbooks_directives.rst.j2: -------------------------------------------------------------------------------- 1 | Directives Glossary 2 | =================== 3 | 4 | Here we list the common playbook objects and their directives. 5 | Note that not all directives affect the object itself and might just be there to be inherited by other contained objects. 6 | Aliases for the directives are not reflected here, nor are mutable ones, for example `action` in task can be substituted by the name of any module plugin. 7 | 8 | .. contents:: 9 | :local: 10 | :depth: 1 11 | 12 | {% for name in clist %} 13 | 14 | {{ name }} 15 | {{ '-' * name|length }} 16 | {% for attribute in oblist[name]|sort %} 17 | * {{ attribute }} 18 | {% endfor %} 19 | 20 | {% endfor %} 21 | -------------------------------------------------------------------------------- /ticket_stubs/bug_is_really_a_question.md: -------------------------------------------------------------------------------- 1 | List Information 2 | ================ 3 | 4 | Hi! 5 | 6 | Thanks very much for your interest in Ansible. It sincerely means a lot to us. 7 | 8 | This appears to be a user question, and we'd like to direct these kinds of things to either the mailing list or the IRC channel. 9 | 10 | * IRC: #ansible on irc.freenode.net 11 | * mailing list: https://groups.google.com/forum/#!forum/ansible-project 12 | 13 | If you can stop by there, we'd appreciate it. This allows us to keep the issue tracker for bugs, pull requests, RFEs and the like. 14 | 15 | Thank you once again and we look forward to seeing you on the list or IRC. Thanks! 16 | 17 | 18 | -------------------------------------------------------------------------------- /contrib/inventory/linode.ini: -------------------------------------------------------------------------------- 1 | # Ansible Linode external inventory script settings 2 | # 3 | 4 | [linode] 5 | 6 | # API calls to Linode are slow. For this reason, we cache the results of an API 7 | # call. Set this to the path you want cache files to be written to. Two files 8 | # will be written to this directory: 9 | # - ansible-Linode.cache 10 | # - ansible-Linode.index 11 | cache_path = /tmp 12 | 13 | # The number of seconds a cache file is considered valid. After this many 14 | # seconds, a new API call will be made, and the cache file will be updated. 15 | cache_max_age = 300 16 | 17 | # If set to true use the hosts public ip in the dictionary instead of the label 18 | use_public_ip = false -------------------------------------------------------------------------------- /test/integration/test_test_infra.yml: -------------------------------------------------------------------------------- 1 | - hosts: testhost 2 | gather_facts: no 3 | tags: 4 | - always 5 | tasks: 6 | - name: ensure fail action produces a failing result 7 | fail: 8 | ignore_errors: yes 9 | register: fail_out 10 | 11 | - debug: 12 | msg: fail works ({{ fail_out.failed }}) 13 | 14 | - name: ensure assert produces a failing result 15 | assert: 16 | that: false 17 | ignore_errors: yes 18 | register: assert_out 19 | 20 | - debug: 21 | msg: assert works ({{ assert_out.failed }}) 22 | 23 | - name: EXPECTED FAILURE ensure fail action stops execution 24 | fail: 25 | msg: fail actually failed (this is expected) 26 | 27 | -------------------------------------------------------------------------------- /test/samples/test_tags.yml: -------------------------------------------------------------------------------- 1 | - hosts: localhost 2 | gather_facts: no 3 | vars: 4 | a: "tags" 5 | tags: 6 | - play 7 | tasks: 8 | - block: 9 | - debug: msg="this is the tagged block" 10 | tags: 11 | - block 12 | - include: include.yml 13 | tags: 14 | - include 15 | - block: 16 | - debug: msg="tagged debug from second block" 17 | tags: 18 | - tag1 19 | - fail: 20 | tags: 21 | - tag1 22 | rescue: 23 | - debug: msg="tagged rescue from second block" 24 | tags: 25 | - rescue_tag 26 | always: 27 | - debug: msg="tagged always from second block" 28 | tags: 29 | - always_tag 30 | -------------------------------------------------------------------------------- /ticket_stubs/proposal.md: -------------------------------------------------------------------------------- 1 | Switch to Proposal 2 | =================== 3 | 4 | Hi! 5 | 6 | As of April of 2016, we have started using the Ansible Proposal process for large feature ideas or changes in current functionality, such as this. If you are still interested in seeing this new feature get into Ansible, please submit a proposal for it using this process. 7 | 8 | https://github.com/ansible/proposals/blob/master/proposals_process_proposal.md 9 | 10 | If you have any further questions, please let us know by stopping by our devel mailing list, or our devel IRC channel: 11 | 12 | * #ansible-devel on Freenode 13 | * https://groups.google.com/forum/#!forum/ansible-devel 14 | 15 | Thank you! 16 | -------------------------------------------------------------------------------- /contrib/inventory/spacewalk.ini: -------------------------------------------------------------------------------- 1 | # Put this ini-file in the same directory as spacewalk.py 2 | # Command line options have precedence over options defined in here. 3 | 4 | [spacewalk] 5 | # To limit the script on one organization in spacewalk, uncomment org_number 6 | # and fill in the organization ID: 7 | # org_number=2 8 | 9 | # To prefix the group names with the organization ID set prefix_org_name=true. 10 | # This is convenient when org_number is not set and you have the same group names 11 | # in multiple organizations within spacewalk 12 | # The prefix is "org_number-" 13 | prefix_org_name=false 14 | 15 | # Default cache_age for files created with spacewalk-report is 300sec. 16 | cache_age=300 17 | -------------------------------------------------------------------------------- /docsite/rst/developing.rst: -------------------------------------------------------------------------------- 1 | Developer Information 2 | ````````````````````` 3 | 4 | Learn how to build modules of your own in any language, and also how to extend Ansible through several kinds of plugins. Explore Ansible's Python API and write Python plugins to integrate with other solutions in your environment. 5 | 6 | .. toctree:: 7 | :maxdepth: 1 8 | 9 | developing_api 10 | developing_inventory 11 | developing_modules 12 | developing_plugins 13 | developing_core 14 | developing_test_pr 15 | developing_releases 16 | 17 | Developers will also likely be interested in the fully-discoverable in :doc:`tower`. It's great for embedding Ansible in all manner of applications. 18 | 19 | -------------------------------------------------------------------------------- /test/integration/roles/test_service/tasks/upstart_cleanup.yml: -------------------------------------------------------------------------------- 1 | - name: remove the upstart init file 2 | file: path=/etc/init/ansible_test.conf state=absent 3 | register: remove_upstart_result 4 | 5 | - name: remove the upstart init file 6 | file: path=/etc/init/ansible_test_broken.conf state=absent 7 | register: remove_upstart_broken_result 8 | 9 | - name: assert that the upstart init file was removed 10 | assert: 11 | that: 12 | - "remove_upstart_result.path == '/etc/init/ansible_test.conf'" 13 | - "remove_upstart_result.state == 'absent'" 14 | - "remove_upstart_broken_result.path == '/etc/init/ansible_test_broken.conf'" 15 | - "remove_upstart_broken_result.state == 'absent'" 16 | -------------------------------------------------------------------------------- /test/integration/credentials.template: -------------------------------------------------------------------------------- 1 | --- 2 | # Rackspace Credentials 3 | rackspace_username: 4 | rackspace_api_key: 5 | rackspace_region: 6 | 7 | # AWS Credentials 8 | ec2_access_key: 9 | ec2_secret_key: 10 | 11 | # GCE Credentials 12 | service_account_email: 13 | pem_file: 14 | project_id: 15 | 16 | # Azure Credentials 17 | azure_subscription_id: "{{ lookup('env', 'AZURE_SUBSCRIPTION_ID') }}" 18 | azure_cert_path: "{{ lookup('env', 'AZURE_CERT_PATH') }}" 19 | 20 | # GITHUB SSH private key - a path to a SSH private key for use with github.com 21 | github_ssh_private_key: "{{ lookup('env','HOME') }}/.ssh/id_rsa" 22 | 23 | # Cloudflare Credentials 24 | cloudflare_api_token: 25 | cloudflare_email: 26 | cloudflare_zone: 27 | -------------------------------------------------------------------------------- /test/integration/test_handlers.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: run handlers 3 | hosts: A 4 | gather_facts: False 5 | connection: local 6 | roles: 7 | - { role: test_handlers_meta, tags: ['scenario1'] } 8 | 9 | - name: verify final handler was run 10 | hosts: A 11 | gather_facts: False 12 | connection: local 13 | tasks: 14 | - name: verify handler2 ran 15 | assert: 16 | that: 17 | - "not hostvars[inventory_hostname]['handler1_called']" 18 | - "'handler2_called' in hostvars[inventory_hostname]" 19 | tags: ['scenario1'] 20 | 21 | - name: test handlers 22 | hosts: testgroup 23 | gather_facts: False 24 | connection: local 25 | roles: 26 | - { role: test_handlers } 27 | -------------------------------------------------------------------------------- /test/integration/consul_inventory.yml: -------------------------------------------------------------------------------- 1 | - hosts: all;!localhost 2 | gather_facts: false 3 | 4 | pre_tasks: 5 | - name: check that the consul agent is running locally 6 | local_action: wait_for port=8500 timeout=5 7 | ignore_errors: true 8 | register: consul_running 9 | 10 | roles: 11 | 12 | - {role: test_consul_inventory, 13 | when: not consul_running.failed is defined} 14 | 15 | tasks: 16 | 17 | - name: warn that tests are ignored if consul agent is not running 18 | debug: msg="A consul agent needs to be running inorder to run the tests. To setup a vagrant cluster for use in testing see http://github.com/sgargan/consul-vagrant" 19 | when: consul_running.failed is defined 20 | -------------------------------------------------------------------------------- /contrib/README.md: -------------------------------------------------------------------------------- 1 | inventory 2 | ========= 3 | 4 | Inventory scripts allow you to store your hosts, groups, and variables in any way 5 | you like. Examples include discovering inventory from EC2 or pulling it from 6 | Cobbler. These could also be used to interface with LDAP or database. 7 | 8 | chmod +x an inventory plugin and either name it /etc/ansible/hosts or use ansible 9 | with -i to designate the path to the script. You might also need to copy a configuration 10 | file with the same name and/or set environment variables, the scripts or configuration 11 | files have more details. 12 | 13 | contributions welcome 14 | ===================== 15 | 16 | Send in pull requests to add plugins of your own. The sky is the limit! 17 | 18 | -------------------------------------------------------------------------------- /test/code-smell/inappropriately-private.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # 4 | # Test that we do not access private attributes of other objects. 5 | # 6 | # * private attributes of ourself are okay: self._private. 7 | # * Private attributes of other objects are not: self.other._private 8 | # 9 | 10 | # Currently the code has many places where we're violating this test so we need 11 | # to clean up the code before we can enable this. Maybe we'll need to 12 | # selectively blacklist modules so that we can work on this a piece at a time. 13 | # 14 | # Also need to implement whitelist for certain things like bundled libraries 15 | # that violate this. 16 | # 17 | # 23-10-2015: Count was 508 lines 18 | grep -Pri '(? 3 | ssh-dss DATA_BASIC root@testing 4 | dss_key_unquoted_option: > 5 | idle-timeout=5m ssh-dss DATA_UNQUOTED_OPTION root@testing 6 | dss_key_command: > 7 | command="/bin/true" ssh-dss DATA_COMMAND root@testing 8 | dss_key_complex_command: > 9 | command="echo foo 'bar baz'" ssh-dss DATA_COMPLEX_COMMAND root@testing 10 | dss_key_command_single_option: > 11 | no-port-forwarding,command="/bin/true" ssh-dss DATA_COMMAND_SINGLE_OPTIONS root@testing 12 | dss_key_command_multiple_options: > 13 | no-port-forwarding,idle-timeout=5m,command="/bin/true" ssh-dss DATA_COMMAND_MULTIPLE_OPTIONS root@testing 14 | dss_key_trailing: > 15 | ssh-dss DATA_TRAILING root@testing foo bar baz 16 | -------------------------------------------------------------------------------- /ticket_stubs/change_applied.md: -------------------------------------------------------------------------------- 1 | Change Applied 2 | ============== 3 | 4 | Hi! 5 | 6 | A change has been applied for this ticket, which should resolve this item for you. 7 | 8 | If you believe this ticket is not resolved, or have further questions, please let us know by stopping by one of the two mailing lists, as appropriate: 9 | 10 | * https://groups.google.com/forum/#!forum/ansible-project - for user questions, tips, and tricks 11 | * https://groups.google.com/forum/#!forum/ansible-devel - for strategy, future planning, and questions about writing code 12 | 13 | Because this project is very active, we're unlikely to see comments on closed tickets, though the mailing list is a great way to get involved or discuss this one further. 14 | 15 | Thanks! 16 | 17 | -------------------------------------------------------------------------------- /ticket_stubs/pr_merged.md: -------------------------------------------------------------------------------- 1 | Merged 2 | =================== 3 | 4 | Hi! 5 | 6 | This has been merged in, and will also be included in the next major release. 7 | 8 | If you or anyone else has any further questions, please let us know by stopping by one of the two mailing lists, as appropriate: 9 | 10 | * https://groups.google.com/forum/#!forum/ansible-project - for user questions, tips, and tricks 11 | * https://groups.google.com/forum/#!forum/ansible-devel - for strategy, future planning, and questions about writing code 12 | 13 | Because this project is very active, we're unlikely to see comments made on closed tickets, but the mailing list is a great way to ask questions, or post if you don't think this particular 14 | issue is resolved. 15 | 16 | Thank you! 17 | -------------------------------------------------------------------------------- /contrib/inventory/cobbler.ini: -------------------------------------------------------------------------------- 1 | # Ansible Cobbler external inventory script settings 2 | # 3 | 4 | [cobbler] 5 | 6 | host = http://PATH_TO_COBBLER_SERVER/cobbler_api 7 | 8 | # If API needs authentication add 'username' and 'password' options here. 9 | #username = foo 10 | #password = bar 11 | 12 | # API calls to Cobbler can be slow. For this reason, we cache the results of an API 13 | # call. Set this to the path you want cache files to be written to. Two files 14 | # will be written to this directory: 15 | # - ansible-cobbler.cache 16 | # - ansible-cobbler.index 17 | cache_path = /tmp 18 | 19 | # The number of seconds a cache file is considered valid. After this many 20 | # seconds, a new API call will be made, and the cache file will be updated. 21 | cache_max_age = 900 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /test/units/modules/core/test_docker.py: -------------------------------------------------------------------------------- 1 | import collections 2 | import os 3 | import unittest 4 | 5 | from ansible.modules.core.cloud.docker._docker import get_split_image_tag 6 | 7 | class DockerSplitImageTagTestCase(unittest.TestCase): 8 | 9 | def test_trivial(self): 10 | self.assertEqual(get_split_image_tag('test'), ('test', 'latest')) 11 | 12 | def test_with_org_name(self): 13 | self.assertEqual(get_split_image_tag('ansible/centos7-ansible'), ('ansible/centos7-ansible', 'latest')) 14 | 15 | def test_with_tag(self): 16 | self.assertEqual(get_split_image_tag('test:devel'), ('test', 'devel')) 17 | 18 | def test_with_tag_and_org_name(self): 19 | self.assertEqual(get_split_image_tag('ansible/centos7-ansible:devel'), ('ansible/centos7-ansible', 'devel')) 20 | -------------------------------------------------------------------------------- /docsite/_themes/srtd/static/js/theme.js: -------------------------------------------------------------------------------- 1 | $( document ).ready(function() { 2 | // Shift nav in mobile when clicking the menu. 3 | $("[data-toggle='wy-nav-top']").click(function() { 4 | $("[data-toggle='wy-nav-shift']").toggleClass("shift"); 5 | $("[data-toggle='rst-versions']").toggleClass("shift"); 6 | }); 7 | // Close menu when you click a link. 8 | $(".wy-menu-vertical .current ul li a").click(function() { 9 | $("[data-toggle='wy-nav-shift']").removeClass("shift"); 10 | $("[data-toggle='rst-versions']").toggleClass("shift"); 11 | }); 12 | $("[data-toggle='rst-current-version']").click(function() { 13 | $("[data-toggle='rst-versions']").toggleClass("shift-up"); 14 | }); 15 | $("table.docutils:not(.field-list").wrap("
"); 16 | }); 17 | -------------------------------------------------------------------------------- /test/integration/roles/test_iterators/vars/main.yml: -------------------------------------------------------------------------------- 1 | element_data: 2 | - id: x 3 | the_list: 4 | - "f" 5 | - "d" 6 | the: 7 | sub: 8 | key: 9 | list: 10 | - "q" 11 | - "r" 12 | - id: y 13 | the_list: 14 | - "e" 15 | - "f" 16 | the: 17 | sub: 18 | key: 19 | list: 20 | - "i" 21 | - "o" 22 | element_data_missing: 23 | - id: x 24 | the_list: 25 | - "f" 26 | - "d" 27 | the: 28 | sub: 29 | key: 30 | list: 31 | - "k" 32 | - "l" 33 | - id: y 34 | the_list: 35 | - "f" 36 | - "d" 37 | - id: z 38 | the_list: 39 | - "e" 40 | - "f" 41 | the: 42 | sub: 43 | key: 44 | -------------------------------------------------------------------------------- /.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | ##### ISSUE TYPE 2 | 3 | - Feature Pull Request 4 | - New Module Pull Request 5 | - Bugfix Pull Request 6 | - Docs Pull Request 7 | 8 | ##### COMPONENT NAME 9 | 10 | 11 | ##### ANSIBLE VERSION 12 | 13 | ``` 14 | 15 | ``` 16 | 17 | ##### SUMMARY 18 | 19 | 20 | 25 | 26 | 27 | ``` 28 | 29 | ``` 30 | -------------------------------------------------------------------------------- /test/integration/test_hash.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - hosts: testhost 3 | vars_files: 4 | - vars/test_hash_vars.yml 5 | vars: 6 | test_hash: 7 | playbook_vars: "this is a playbook variable" 8 | replaced_hash: 9 | extra_args: "this is an extra arg" 10 | merged_hash: 11 | default_vars: "this is in role defaults/main.yml" 12 | extra_args: "this is an extra arg" 13 | group_vars_all: "this is in group_vars/all" 14 | host_vars_testhost: "this is in host_vars/testhost" 15 | playbook_vars: "this is a playbook variable" 16 | role_argument: "this is a role argument variable" 17 | role_vars: "this is in role vars/main.yml" 18 | vars_file: "this is in a vars_file" 19 | roles: 20 | - { role: test_hash_behavior, test_hash: {'role_argument':'this is a role argument variable'} } 21 | -------------------------------------------------------------------------------- /ticket_stubs/bug_misunderstanding.md: -------------------------------------------------------------------------------- 1 | Possible Misunderstanding 2 | ========================= 3 | 4 | Hi! 5 | 6 | Thanks very much for your submission to Ansible. It sincerely means a lot to us. 7 | 8 | We believe the ticket you have filed is being somewhat misunderstood, as one thing works a little differently than stated. 9 | 10 | In particular, we believe you have said: 11 | 12 | * THING ONE 13 | 14 | However, however what is happening is that: 15 | 16 | * THING TWO 17 | 18 | We would suggest: 19 | 20 | * THING THREE 21 | 22 | In the future, this might be a topic more well suited for the user list, which you can also post here if you'd like some more help with the above. 23 | 24 | * https://groups.google.com/forum/#!forum/ansible-project 25 | 26 | Thank you once again for this and your interest in Ansible! 27 | 28 | -------------------------------------------------------------------------------- /test/integration/test_force_handlers.yml: -------------------------------------------------------------------------------- 1 | --- 2 | 3 | - name: test force handlers (default) 4 | tags: normal 5 | hosts: testgroup 6 | gather_facts: False 7 | connection: local 8 | roles: 9 | - { role: test_force_handlers } 10 | tasks: 11 | - debug: msg="you should see this with --tags=normal" 12 | 13 | - name: test force handlers (set to true) 14 | tags: force_true_in_play 15 | hosts: testgroup 16 | gather_facts: False 17 | connection: local 18 | force_handlers: True 19 | roles: 20 | - { role: test_force_handlers, tags: force_true_in_play } 21 | 22 | 23 | - name: test force handlers (set to false) 24 | tags: force_false_in_play 25 | hosts: testgroup 26 | gather_facts: False 27 | connection: local 28 | force_handlers: False 29 | roles: 30 | - { role: test_force_handlers, tags: force_false_in_play } 31 | -------------------------------------------------------------------------------- /ticket_stubs/file_under_another_project.md: -------------------------------------------------------------------------------- 1 | Should This Be Filed Elsewhere? 2 | =============================== 3 | 4 | Hi! 5 | 6 | Thanks very much for your interest in Ansible. It sincerely means a lot to us. 7 | 8 | This appears to be something that should be filed against another project or bug tracker, and let us explain our reasons for thinking this: 9 | 10 | * FILL IN 11 | 12 | If you can stop by the tracker or forum for one of those projects, we'd appreciate it. 13 | 14 | Should you still wish to discuss things further, or if you disagree with our thought process, please stop by one of our two mailing lists: 15 | 16 | * https://groups.google.com/forum/#!forum/ansible-project 17 | * https://groups.google.com/forum/#!forum/ansible-devel 18 | 19 | We'd be happy to discuss things. 20 | 21 | Thank you once again! 22 | 23 | 24 | -------------------------------------------------------------------------------- /test/integration/download_binary_modules.yml: -------------------------------------------------------------------------------- 1 | - hosts: testhost_binary_modules 2 | tasks: 3 | - debug: var=ansible_system 4 | 5 | - name: set module filename (POSIX) 6 | set_fact: 7 | module_filename: "helloworld_{{ ansible_system | lower }}" 8 | when: ansible_system != 'Win32NT' 9 | 10 | - name: set module filename (Win32NT) 11 | set_fact: 12 | module_filename: "helloworld_{{ ansible_system | lower }}.exe" 13 | when: ansible_system == 'Win32NT' 14 | 15 | - name: download binary module 16 | tags: test_binary_modules 17 | local_action: 18 | module: get_url 19 | url: "https://ansible-ci-files.s3.amazonaws.com/test/integration/roles/test_binary_modules/{{ module_filename }}" 20 | dest: "{{ playbook_dir }}/library/{{ module_filename }}" 21 | mode: 0755 22 | -------------------------------------------------------------------------------- /test/units/plugins/action/fixtures/synchronize/delegate_remote/meta.yaml: -------------------------------------------------------------------------------- 1 | fixtures: 2 | taskvars_in: task_vars_in.json 3 | taskvars_out: task_vars_out.json 4 | task_args: 5 | src: /tmp/deleteme 6 | dest: /tmp/deleteme 7 | _task: 8 | delegate_to: u1404 9 | _play_context: 10 | shell: None 11 | remote_addr: u1404 12 | remote_user: root 13 | connection: 14 | transport: 'ssh' 15 | hostvars: 16 | '127.0.0.1': {} 17 | '::1': {} 18 | 'localhost': {} 19 | asserts: 20 | - "hasattr(SAM._connection, 'ismock')" 21 | - "SAM._connection.transport == 'ssh'" 22 | - "self._play_context.shell == None" 23 | - "self.execute_called" 24 | - "self.task.args['_local_rsync_path'] == 'rsync'" 25 | - "self.task.args['src'] == '/tmp/deleteme'" 26 | - "self.task.args['dest'] == 'el6host:/tmp/deleteme'" 27 | -------------------------------------------------------------------------------- /ticket_stubs/bug_confirmed_p1_or_p2.md: -------------------------------------------------------------------------------- 1 | Confirmed, Thanks! 2 | ================== 3 | 4 | Hi! 5 | 6 | Thanks very much for your submission to Ansible. It sincerely means a lot to us. 7 | 8 | We've confirmed this is an issue and have marked as a high priority item to resolve. 9 | 10 | Additionally: 11 | 12 | * INSERT REASONS! 13 | 14 | We will definitely see your comments on this issue when reading this ticket, but may not be able to reply promptly. You may also wish to join one of our two mailing lists 15 | which are very active: 16 | 17 | * https://groups.google.com/forum/#!forum/ansible-project - for user questions, tips, and tricks 18 | * https://groups.google.com/forum/#!forum/ansible-devel - for strategy, future planning, and questions about writing code 19 | 20 | Thank you once again for this and your interest in Ansible! 21 | 22 | -------------------------------------------------------------------------------- /test/integration/roles/test_always_run/meta/main.yml: -------------------------------------------------------------------------------- 1 | # test code for the always_run option 2 | # (c) 2014, James Cammarata 3 | 4 | # This file is part of Ansible 5 | # 6 | # Ansible is free software: you can redistribute it and/or modify 7 | # it under the terms of the GNU General Public License as published by 8 | # the Free Software Foundation, either version 3 of the License, or 9 | # (at your option) any later version. 10 | # 11 | # Ansible is distributed in the hope that it will be useful, 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | # GNU General Public License for more details. 15 | # 16 | # You should have received a copy of the GNU General Public License 17 | # along with Ansible. If not, see . 18 | 19 | -------------------------------------------------------------------------------- /test/integration/roles/test_force_handlers/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | 3 | # We notify for A and B, and hosts B and C fail. 4 | # When forcing, we expect A and B to run handlers 5 | # When not forcing, we expect only B to run handlers 6 | 7 | - name: notify the handler for host A and B 8 | shell: echo 9 | notify: 10 | - echoing handler 11 | when: inventory_hostname == 'A' or inventory_hostname == 'B' 12 | 13 | - name: EXPECTED FAILURE fail task for all 14 | fail: msg="Fail All" 15 | when: fail_all is defined and fail_all 16 | 17 | - name: EXPECTED FAILURE fail task for A 18 | fail: msg="Fail A" 19 | when: inventory_hostname == 'A' 20 | 21 | - name: EXPECTED FAILURE fail task for C 22 | fail: msg="Fail C" 23 | when: inventory_hostname == 'C' 24 | 25 | - name: echo after A and C have failed 26 | command: echo CALLED_TASK_{{ inventory_hostname }} -------------------------------------------------------------------------------- /test/integration/roles/test_hash_behavior/meta/main.yml: -------------------------------------------------------------------------------- 1 | # test code for the hash variable behavior 2 | # (c) 2014, James Cammarata 3 | 4 | # This file is part of Ansible 5 | # 6 | # Ansible is free software: you can redistribute it and/or modify 7 | # it under the terms of the GNU General Public License as published by 8 | # the Free Software Foundation, either version 3 of the License, or 9 | # (at your option) any later version. 10 | # 11 | # Ansible is distributed in the hope that it will be useful, 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | # GNU General Public License for more details. 15 | # 16 | # You should have received a copy of the GNU General Public License 17 | # along with Ansible. If not, see . 18 | 19 | --------------------------------------------------------------------------------