Thanks to visit codestin.com
Credit goes to Github.com

Skip to content

andytengca/ansible-role-common

Repository files navigation

roles/common/README.md

Build Status Travis CI Platforms

Description

common is an Ansible role used to

  • change default shell from dash to bash \
    • dash is set by default and need to change it to bash shell
  • change umask default permission from 022 to 027
    • The default umask on Ubuntu is 022 which means that newly created files are readable by everyone, but only writable by the owner and group if USERGROUPS_ENAB: "yes" in /etc/login.defs
    • to better protect the directories and files, we will set the umask to remove all permissions for others and remove write permission for groups.
    • afterwards, the permission of directory is 750 and the permission of file is 640.
  • others ...

Recommended

Running Ansible in a virtual environment allows for a lot of testing flexibility.

Requirements

  • Ansible

Variables

project_name/common.yml

To install:

cd project_directory
cp roles/common/files/example_playbook.yml common.yml
# edit if required
nano common.yml

project_name/site.yml

From the projects main directory run the following:

cp roles/common/files/example_playbook.yml common.yml
cat common.yml

project/group_vars/all/project_defaults.yml

files/group_vars/all/example_defaults.yml

cp roles/common/files/group_vars/all/example_defaults.yml group_vars/all/project_defaults.yml
cat group_vars/all/project_defaults.yml

role variables

common_options:
  umask: "027"
  USERGROUPS_ENAB: "no"

Ansible command to run

Move into the ace directory and run ansible-playbook

cd projects/ace
ansible-playbook -i inventory/dev systems.yml --limit "workstation" -u ansible

Move into the role directory and run vagrant:

cd roles/common
vagrant up

Authors and license

License: AGPLv3


About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages