Module - tripleo_host_prep

This module provides for the following ansible plugin:

  • tripleo_host_prep

Module Documentation

This module processes a complex hash provided to it that expresses users, groups, files, directories and some selinux related options that should applied to the host. This module leverages the existing ansible modules to apply the data. users (ansible.builtin.user), groups (ansible.builtin.group), files (ansible.builtin.copy), directories (ansible.builtin.file), seboolean (ansible.posix.seboolean), sefcontext (community.general.sefcontext). All options exposed by these modules are available.

Options

host_prep_data

Dictionary containing users, groups, files, directories, etc to apply.

debug

Whether or not debug is enabled.

Authors

Alex Schultz <aschultz@redhat.com>

Example Tasks

- name: Apply host prep
  tripleo_host_prep:
    host_prep_data:
      service_a:
        users:
          foo:
            uid: 1233
            group: foobar
        groups:
          foobar:
            gid: 1233
        files:
          /var/tmp/foo/bar:
            content: |
              data
            mode: '0644'
        directories:
          /var/tmp/foo:
            mode: '0700'
        seboolean:
          virt_sandbox_use_netlink:
            persistent: true
            state: true
        sefcontext:
          /var/tmp/foo(/.*)?:
            setype: container_file_t
      service_b:
        directories:
          /var/tmp/bar:
            mode: '0750'
        files:
          /var/tmp/bar/baz:
            content: fizz
            mode: '0600'
            owner: root