https://github.com/mahdi22/ansible-install-puppet-agent
https://github.com/mahdi22/ansible-install-puppet-agent
ansible automation debian devops linux puppet redhat ubuntu
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/mahdi22/ansible-install-puppet-agent
- Owner: mahdi22
- License: mit
- Created: 2020-10-23T15:52:03.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2022-03-25T23:25:50.000Z (over 3 years ago)
- Last Synced: 2025-03-14T22:22:31.374Z (3 months ago)
- Topics: ansible, automation, debian, devops, linux, puppet, redhat, ubuntu
- Language: Jinja
- Homepage: https://galaxy.ansible.com/mahdi22/puppet_agent
- Size: 25.4 KB
- Stars: 5
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README


[](https://galaxy.ansible.com/mahdi22/puppet_agent)
# Ansible role `puppet_agent`An Ansible role for installing agent puppet (supported version 6 and 7 if install agent from puppetlabs repository, else all version is supported) in RHEL/CentOS, Debian and Ubunut distributions. Specifically, the responsibilities of this role are to:
- Install puppet from official repositories
- Configuration puppet agent
- Generate certification
- Enable puppet service
- Start puppet service## Installation
``` bash
$ ansible-galaxy install mahdi22.puppet_agent
```## Role Variables
This role has multiple variables. The defaults for all these variables are the following:
```yaml
---
# Specify if the role must use a proxy web
# Default is False
use_proxy: yes# If use_proxy: yes, set http proxy variables environment
# Replace proxy.local with your web proxy adresse or name
# Replace 8080 with your web proxy port
proxy_env:
http_proxy: http://proxy.local:8080/
https_proxy: http://proxy.local:8080/# Set install_from_puppetlabs: True - install puppet agent from puppetlabs repository.
# Set install_from_puppetlabs: False - do not install puppetlabs repositry
# Default is true.
install_from_puppetlabs: True# Specifie puppet version
# Supported values are "6" and "7"
# This parameter is valid if install_from_puppetlabs: True
# Default is 6
puppet_version: "6"# Generate or Re-generate a new certificat
# Turne this variable to false to edit configuration without generate a new certificat
# Default is True
puppet_agent_certification: True# The master server to request configurations from.
# Defaults to puppet
puppet_server_name: puppet.lab# The environment to request when contacting the master.
# Default is production
environment: production# How often to do a Puppet run, when running as a service.
# Default is 30m
runinterval: 30m
```## Dependencies
None
## Example Playbook
Playbook example to execute role without proxy web
```Yaml
- hosts: puppet
roles:
- role: mahdi22.puppet_agent
become: yes
vars:
puppet_server_name: puppet.lab
puppet_version: "7"
```
Playbook example to execute role with proxy web
```Yaml
- hosts: puppet
roles:
- role: mahdi22.puppet_agent
become: yes
vars:
puppet_server_name: puppet.lab
puppet_version: "7"
use_proxy: yes
proxy_env:
http_proxy: http://proxy.local:8080/
https_proxy: http://proxy.local:8080/
```Playbook example to execute role with proxy web and without using puppetlabs repository
```Yaml
- hosts: puppet
roles:
- role: mahdi22.puppet_agent
become: yes
vars:
puppet_server_name: puppet
use_proxy: yes
proxy_env:
http_proxy: http://proxy.local:8080/
https_proxy: http://proxy.local:8080/
install_from_puppetlabs: False
```
## TestingThis role is tested on Linux distributions:
- RHEL/CentOS 8
- RHEL/CentOS 7
- Debian 10
- Debian 9
- Debian 8
- Ubuntu 20.04
- Ubuntu 18.04
- Ubuntu 16.04