No description
Find a file
ivovangeel 23349911f1 Fixed bug in find_mount_point function
The find_mount_point function does not resolve the mount point of paths with a soft-link correctly and returns the wrong mount-point.

I have mounted an NFS filesystem on /nfs-mount. This directory contains a directory called "directory". I also created a soft-link to this last directory: /soft-link-to-directory -> /nfs-mount/directory. I created the following task to copy a file into /soft-link-to-directory:

    - name: copy file to nfs-mount
      copy:
        src: "file"
        dest: "/soft-link-to-directory/file"

This throws an exception:

invalid selinux context: [Errno 95] Operation not supported

This is caused by the find_mount_point function to return '/' as the mount point for '/soft-link-to-directory/file'. This should have been /nfs-mount. Because the find_mount_point returns the wrong mount-point, the is_special_selinux_path function does not recognise the file is on an NFS mount and tries to set the default SELinux context (system_u:object_r:default_t:s0), which fails. The context should have been: system_u:object_r:nfs_t:s0

Full Ansible output:

TASK [copy file to nfs-mount] **************************************************
fatal: [hostname]: FAILED! => {"changed": false, "checksum": "f34b60930a5d6d689cf49a4c16bd7f9806be608c", "cur_context": ["system_u", "object_r", "nfs_t", "s0"], "failed": true, "gid": 24170, "group": "foundation", "input_was": ["system_u", "object_r", "default_t", "s0"], "mode": "0644", "msg": "invalid selinux context: [Errno 95] Operation not supported", "new_context": ["system_u", "object_r", "default_t", "s0"], "owner": "root", "path": "/soft-link-to-directory/.ansible_tmpWCT6Z4file", "secontext": "system_u:object_r:nfs_t:s0", "size": 37, "state": "file", "uid": 0}
2016-02-24 15:57:16 +01:00
bin Transform tracebacks into unicode before printing 2016-01-25 19:18:59 -08:00
contrib Merge pull request #8561 from sivel/vault-keyring-example 2016-02-18 14:40:50 -06:00
docs Proposal for auto updating roles 2016-02-19 10:49:23 +00:00
docsite Merge pull request #13654 from sivel/paramiko-proxy-command 2016-02-23 11:30:43 -06:00
examples Add a configuration setting that allows the user to specify printing of task arguments in the header. 2016-02-18 04:20:35 -08:00
hacking clarify that requirements are on host that runs it 2016-02-18 05:09:42 -08:00
lib/ansible Fixed bug in find_mount_point function 2016-02-24 15:57:16 +01:00
packaging Add python-setuptools to the requirements for running ansible as 2016-01-13 17:24:47 -08:00
samples Break apart a looped dependency to show a warning when parsing playbooks 2015-10-27 12:39:42 -07:00
test Assert things against the recursive copy result to make sure it did something 2016-02-23 16:29:08 -05:00
ticket_stubs for ansibot compensation 2015-07-08 10:12:08 -04:00
.coveragerc Add tox and travis-ci support 2015-03-13 08:20:24 -04:00
.gitattributes updated changelog with 1.8.2-4 content, added .gitattributes 2015-02-23 22:20:33 +00:00
.gitignore Removing .out file for integration tests and adding to .gitignore 2016-02-03 15:00:37 -05:00
.gitmodules remove old dead code 2015-08-27 12:27:38 -04:00
.travis.yml Code smell test for specifying both required and default in FieldAttributes 2015-12-09 08:25:29 -08:00
ansible-core-sitemap.xml adding sitemap for swiftype to core 2016-01-11 11:30:28 -05:00
CHANGELOG.md added json callback to chnglog 2016-02-19 07:13:12 -08:00
CODING_GUIDELINES.md CODING_GUIDELINES: Fix typo: / => \ 2014-06-28 08:21:15 -07:00
CONTRIBUTING.md Update CONTRIBUTING.md 2014-09-10 13:00:57 -04:00
COPYING license file should be in source tree 2012-03-15 20:24:22 -04:00
ISSUE_TEMPLATE.md Put the advice to the user as comments in the template 2016-02-23 12:15:24 +01:00
Makefile only send event if tqm exists 2016-01-13 10:18:36 -05:00
MANIFEST.in added galaxy data 2016-01-12 16:22:01 +01:00
PULL_REQUEST_TEMPLATE.md Put the advice to the user as comments in the template 2016-02-23 12:15:24 +01:00
README.md trigger jenkins integration tests 2015-12-08 10:03:20 -05:00
RELEASES.txt The 2.0 release has a name now 2015-11-14 09:59:04 +05:30
ROADMAP.md series of changes based on PR comments 2016-02-11 20:56:33 -05:00
setup.py Bundle a new version of python-six for compatibility along with some code to make it easy for distributions to override the bunndled copy if they have a new enough version. 2015-10-16 08:21:28 -07:00
test-requirements.txt Mock 1.1.0 lost python2.6 compatibility 2015-07-10 09:11:03 -07:00
tox.ini Start a pyflakes section to cut down on extra messages that we don't agree are problems 2015-11-11 07:50:19 -08:00
VERSION Correct VERSION in the devel branch 2015-12-04 15:17:24 -08:00

PyPI version PyPI downloads Build Status

Ansible

Ansible is a radically simple IT automation system. It handles configuration-management, application deployment, cloud provisioning, ad-hoc task-execution, and multinode orchestration - including trivializing things like zero downtime rolling updates with load balancers.

Read the documentation and more at http://ansible.com/

Many users run straight from the development branch (it's generally fine to do so), but you might also wish to consume a release.

You can find instructions here for a variety of platforms. If you decide to go with the development branch, be sure to run git submodule update --init --recursive after doing a checkout.

If you want to download a tarball of a release, go to releases.ansible.com, though most users use yum (using the EPEL instructions linked above), apt (using the PPA instructions linked above), or pip install ansible.

Design Principles

  • Have a dead simple setup process and a minimal learning curve
  • Manage machines very quickly and in parallel
  • Avoid custom-agents and additional open ports, be agentless by leveraging the existing SSH daemon
  • Describe infrastructure in a language that is both machine and human friendly
  • Focus on security and easy auditability/review/rewriting of content
  • Manage new remote machines instantly, without bootstrapping any software
  • Allow module development in any dynamic language, not just Python
  • Be usable as non-root
  • Be the easiest IT automation system to use, ever.

Get Involved

  • Read Community Information for all kinds of ways to contribute to and interact with the project, including mailing list information and how to submit bug reports and code to Ansible.
  • All code submissions are done through pull requests. Take care to make sure no merge commits are in the submission, and use git rebase vs git merge for this reason. If submitting a large code change (other than modules), it's probably a good idea to join ansible-devel and talk about what you would like to do or add first and to avoid duplicate efforts. This not only helps everyone know what's going on, it also helps save time and effort if we decide some changes are needed.
  • Users list: ansible-project
  • Development list: ansible-devel
  • Announcement list: ansible-announce - read only
  • irc.freenode.net: #ansible

Branch Info

  • Releases are named after Led Zeppelin songs. (Releases prior to 2.0 were named after Van Halen songs.)
  • The devel branch corresponds to the release actively under development.
  • As of 1.8, modules are kept in different repos, you'll want to follow core and extras
  • Various release-X.Y branches exist for previous releases.
  • We'd love to have your contributions, read Community Information for notes on how to get started.

Authors

Ansible was created by Michael DeHaan (michael.dehaan/gmail/com) and has contributions from over 1000 users (and growing). Thanks everyone!

Ansible is sponsored by Ansible, Inc