Skip to content

linuxhq/ansible-collection-linux

Repository files navigation

linuxhq.linux

License Ansible Galaxy Lint Release

A collection of linux roles

Collection

Build

ansible-galaxy collection build

Install

ansible-galaxy collection install linuxhq.linux

Requirements

  • Python >= 3.13
  • ansible-core >= 2.18.0
  • ansible.posix
  • community.docker >= 5.0.0
  • community.general >= 12.0.0
  • pycryptodome >= 3.23.0 (rclone filter plugins only)

Molecule

make
source venv/bin/activate

Playbook

An example playbook utilizing roles available in this collection

- hosts: server
  vars:
    global_users:
      - name: johnd
        id: 2000
        key: ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIRtpHq0ih6ZsXzskVMqHLc3bvCp82l1lS/V9i3wXwQQ
      - name: janed
        id: 2001
        key: ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEQYZwthruEeeRtn4QE2x5xeVosMNha99UOVptoNjVbs

  roles:
    - role: linuxhq.linux.group
      group_list:
        "{{ (global_users |
            json_query('[].{
              name: name,
              gid: id
            }')) |
            d([]) }}"

    - role: linuxhq.linux.user
      user_list:
        "{{ (global_users |
            json_query('[].{
              name: name,
              uid: id
            }')) |
            d([]) }}"

    - role: linuxhq.linux.authorized_key
      authorized_key_list:
        "{{ (global_users |
            json_query('[].{
              user: name,
              key: key,
              exclusive: `true`
            }')) |
            d([]) }}"

About

A collection of linux roles

Resources

Stars

1 star

Watchers

1 watching

Forks

Packages

 
 
 

Contributors

Languages