ISSUE TYPE
COMPONENT NAME
selinux
ANSIBLE VERSION
CONFIGURATION
ANSIBLE_SSH_PIPELINING(/Users/mwillsher/src/cloud-deployment/ansible-playbooks/ansible.cfg) = True
CACHE_PLUGIN(/Users/mwillsher/src/cloud-deployment/ansible-playbooks/ansible.cfg) = jsonfile
CACHE_PLUGIN_CONNECTION(/Users/mwillsher/src/cloud-deployment/ansible-playbooks/ansible.cfg) = facts
CACHE_PLUGIN_TIMEOUT(/Users/mwillsher/src/cloud-deployment/ansible-playbooks/ansible.cfg) = 600
DEFAULT_GATHERING(/Users/mwillsher/src/cloud-deployment/ansible-playbooks/ansible.cfg) = smart
DEFAULT_HOST_LIST(/Users/mwillsher/src/cloud-deployment/ansible-playbooks/ansible.cfg) = [u'/Users/mwillsher/src/cloud-deployment/ansible-playbooks/inventory/aws']
DEFAULT_ROLES_PATH(/Users/mwillsher/src/cloud-deployment/ansible-playbooks/ansible.cfg) = [u'/Users/mwillsher/src/cloud-deployment/ansible-playbooks/roles', u'/Users/mwillsher/sr
DISPLAY_SKIPPED_HOSTS(/Users/mwillsher/src/cloud-deployment/ansible-playbooks/ansible.cfg) = False
HOST_KEY_CHECKING(/Users/mwillsher/src/cloud-deployment/ansible-playbooks/ansible.cfg) = False
OS / ENVIRONMENT
MacOS running Ansible
CentOS 6 target
SUMMARY
selinux module strips newlines from /etc/sysconfig/selinux
STEPS TO REPRODUCE
Before
[root@ip-10-100-151-172 ~]# more /etc/sysconfig/selinux
~
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
# enforcing - SELinux security policy is enforced.
# permissive - SELinux prints warnings instead of enforcing.
# disabled - No SELinux policy is loaded.
SELINUX=enforcing
# SELINUXTYPE= can take one of these two values:
# targeted - Targeted processes are protected,
# mls - Multi Level Security protection.
SELINUXTYPE=targeted
ansible -m selinux -a "state=disabled" IP -vvv -u root -i inventory/aws/ec2.py
After
# This file controls the state of SELinux on the system.# SELINUX= can take one of these three values:# enforcing - SELinux security policy is enforced.# permissive - SELinux prints warnings instead of enforcing.# disabled - No SELinux policy is loaded.SELINUX=disabled# SELINUXTYPE= can take one of these two values:# targeted - Targeted processes are protected,# mls - Multi Level Security protection.SELINUXTYPE=targeted
EXPECTED RESULTS
Valuse changed in file and EOL chars left intact.
ACTUAL RESULTS
New lines removed, file invalid.
ISSUE TYPE
COMPONENT NAME
selinux
ANSIBLE VERSION
CONFIGURATION
OS / ENVIRONMENT
MacOS running Ansible
CentOS 6 target
SUMMARY
selinux module strips newlines from /etc/sysconfig/selinux
STEPS TO REPRODUCE
Before
After
EXPECTED RESULTS
Valuse changed in file and EOL chars left intact.
ACTUAL RESULTS
New lines removed, file invalid.