Skip to content

Commit

Permalink
initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Wolfgang Hotwagner committed Feb 14, 2024
0 parents commit e7a79f0
Show file tree
Hide file tree
Showing 5 changed files with 123 additions and 0 deletions.
34 changes: 34 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Ansible-Role: atb-ansible-puppetclient

AECID-TESTBED: Installs a puppet agent using a preconfigured tar-ball


## Requirements

- Debian or Ubuntu

## Role Variables

```yaml
puppetclient_release: "bullseye"
puppetclient_repourl: "https://apt.puppet.com/puppet7-release-{{puppetclient_release}}.deb"
puppetclient_config: "linuxshare.tar.gz"
```
## Example Playbook
```yaml
- hosts: localhost
roles:
- puppetclient
vars:
puppetclient_release: "bookworm"
```
## License
GPL-3.0
## Author
- Wolfgang Hotwagner
5 changes: 5 additions & 0 deletions defaults/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
# defaults file for puppetclient
puppetclient_release: "bullseye"
puppetclient_repourl: "https://apt.puppet.com/puppet7-release-{{puppetclient_release}}.deb"
puppetclient_config: "linuxshare.tar.gz"
Binary file added files/linuxshare.tar.gz
Binary file not shown.
55 changes: 55 additions & 0 deletions meta/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
galaxy_info:
author: Wolfgang Hotwagner
description: Installs a puppet agent using a preconfigured tar-ball
company: Austrian Institute of Technology

# If the issue tracker for your role is not on github, uncomment the
# next line and provide a value
# issue_tracker_url: http://example.com/issue/tracker

# Choose a valid license ID from https://spdx.org - some suggested licenses:
# - BSD-3-Clause (default)
# - MIT
# - GPL-2.0-or-later
# - GPL-3.0-only
# - Apache-2.0
# - CC-BY-4.0
license: GPL-3.0-only

min_ansible_version: 2.1

# If this a Container Enabled role, provide the minimum Ansible Container version.
# min_ansible_container_version:

#
# Provide a list of supported platforms, and for each platform a list of versions.
# If you don't wish to enumerate all versions for a particular platform, use 'all'.
# To view available platforms and versions (or releases), visit:
# https://galaxy.ansible.com/api/v1/platforms/
#
# platforms:
# - name: Fedora
# versions:
# - all
# - 25
# - name: SomePlatform
# versions:
# - all
# - 1.0
# - 7
# - 99.99

galaxy_tags:
- puppet
- puppet-agent
- testbed
# List tags for your role here, one per line. A tag is a keyword that describes
# and categorizes the role. Users find roles by searching for tags. Be sure to
# remove the '[]' above, if you add tags to this list.
#
# NOTE: A tag is limited to a single word comprised of alphanumeric characters.
# Maximum 20 tags per role.

dependencies: []
# List your role dependencies here, one per line. Be sure to remove the '[]' above,
# if you add dependencies to this list.
29 changes: 29 additions & 0 deletions tasks/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
# tasks file for puppetclient
- name: Download Puppet-Repo-Config
ansible.builtin.shell: "wget -O /opt/puppet-release.deb {{puppetclient_repourl}}"
args:
creates: /opt/puppet-release.deb

- name: Install Puppet-Repo-Config
ansible.builtin.apt:
deb: /opt/puppet-release.deb

- name: Upload Configuration
ansible.builtin.unarchive:
owner: "root"
group: "root"
src: "{{puppetclient_config}}"
dest: /etc
tags:
- config

- name: Install Puppet-Agent
ansible.builtin.apt:
name: puppet-agent
update_cache: true

- name: Start Puppet
ansible.builtin.service:
name: puppet.service
state: started

0 comments on commit e7a79f0

Please sign in to comment.