tripleo-ansible/playbooks/step_preserve_password_file.yml
Julia Kreger fa3c816396 CORE-1779 Reset mnt/state/var folder permissions
Due to launchpad bug # 1374626, UIDs can change between full image
deployments as accounts are burned into the image and depending on
the elements included between images, may have differing owners.

As a result, this commit, while it does not fix the root cause, is
intended to reset the permissions so applications can start after
an upgrade.

Change-Id: I83b7efda5dbf8a7d587d1a638916b8f6f755cb2d
2014-10-14 20:57:28 -07:00

24 lines
1016 B
YAML

# Copyright (c) 2014 Hewlett-Packard Development Company, L.P.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
# implied.
# See the License for the specific language governing permissions and
# limitations under the License.
- name: "Ensure /mnt/state/etc exists"
sudo: yes
file: path=/mnt/state/etc owner=root group=root mode=0755 state=directory
- name: "Saving a copy of /etc/passwd to /mnt/state/etc/passwd.backup"
sudo: yes
command: cp -a /etc/passwd /mnt/state/etc/passwd.backup
- name: "Saving a copy of /etc/group to /mnt/state/etc/passwd.backup"
sudo: yes
command: cp -a /etc/group /mnt/state/etc/group.backup