Variables

The following variables are supported:

expand

Boolean value indicating if load items from file paths or URLs or just treat files and URLs as plain text.

If set to true this role will attempt to load items from the especified paths and URLs.

If set to false each file path or URL found on system_skeleton will be treated as plain text.

This variable is set to true by default.

ansible localhost -m include_role -a name=constrict0r.sysconfig \
    -e "expand=true configuration='/home/username/my-config.yml' titles='system_skeleton'"

If you wish to override the value of this variable, specify an item_path and an item_expand attributes when passing the item, the item_path attribute can be used with URLs too:

ansible localhost -m include_role -a name=constrict0r.sysconfig \
    -e "{expand: false,
        system_skeleton: [ \
            item_path: '/home/username/my-config.yml', \
            item_expand: false \
        ], titles: 'system_skeleton'}"

To prevent any unexpected behaviour, it is recommended to always specify this variable when calling this role.

system_skeleton

URL or list of URLs pointing to git skeleton repositories containing layouts of directories and configuration files.

Each URL on system_skeleton will be checked to see if it points to a valid git repository, and if it does, the git repository is cloned.

The contents of each cloned repository will then be copied to the root of the filesystem as a simple method to apply system-wide configuration.

This variable is empty by default.

# Including from terminal.
ansible localhost -m include_role -a name=constrict0r.sysconfig -K -e \
    "{system_skeleton: [https://gitlab.com/huertico/server]}"

# Including on a playbook.
- hosts: servers
  roles:
    - role: constrict0r.sysconfig
      system_skeleton:
        - https://gitlab.com/huertico/server
        - https://gitlab.com/huertico/client

# To a playbook from terminal.
ansible-playbook -i tests/inventory tests/test-playbook.yml -K -e \
    "{system_skeleton: [https://gitlab.com/huertico/server]}"

configuration

Absolute file path or URL to a .yml file that contains all or some of the variables supported by this role.

It is recommended to use a .yml or .yaml extension for the configuration file.

This variable is empty by default.

# Using file path.
ansible localhost -m include_role -a name=constrict0r.sysconfig -K -e \
    "configuration=/home/username/my-config.yml"

# Using URL.
ansible localhost -m include_role -a name=constrict0r.sysconfig -K -e \
    "configuration=https://my-url/my-config.yml"

To see how to write a configuration file see the YAML file format section.