php-lang-installed

Example:

# Install php.
- php-lang-installed

Description

Installs PHP on RedHat/CentOS and Debian/Ubuntu servers.

Currently it's not possible selecting the version of php to install. That will be fixed later.

Resources

Variables

Name Type Default Description

extra_packages

list --

A list of extra php packages to install.

Examples

Example 1

Install php.

Code
- php-lang-installed

Code

doc:
  short_help: Make sure PHP is installed.
  help: |
    Installs PHP on RedHat/CentOS and Debian/Ubuntu servers.

    Currently it's not possible selecting the version of php to install. That will be fixed later.
  references:
    geerlingguy.php Ansible role: https://github.com/geerlingguy/ansible-role-php
  examples:
  - title: Install php.

args:
  extra_packages:
    doc:
      short_help: A list of extra php packages to install.
    type: list
    schema:
      type: string
    required: false

meta:
  tags:
  - featured-frecklecutable
  - php
  - language
  - install

frecklets:
- frecklet:
    name: geerlingguy.php
    type: ansible-role
    resources:
      ansible-role:
      - geerlingguy.php
    properties:
      idempotent: true
      internet: true
      elevated: true
    desc:
      references:
        "'geerlingguy.php' Ansible role": https://github.com/geerlingguy/ansible-role-php
  task:
    include-type: import
    become: true
  vars:
    php_packages_extra: '{{:: extra_packages ::}}'
frecklecute php-lang-installed --help

Usage: frecklecute php-lang-installed [OPTIONS]

  Installs PHP on RedHat/CentOS and Debian/Ubuntu servers.

  Currently it's not possible selecting the version of php to install. That
  will be fixed later.

Options:
  --extra-packages EXTRA_PACKAGES
                                  A list of extra php packages to install.
  --help                          Show this message and exit.
# -*- coding: utf-8 -*-


#
# module path: pycklets.php_lang_installed.PhpLangInstalled
#


from dataclasses import dataclass
from pyckles import AutoPycklet
from typing import *    # noqa

@dataclass
class PhpLangInstalled(AutoPycklet):
    """Installs PHP on RedHat/CentOS and Debian/Ubuntu servers.

     Currently it's not possible selecting the version of php to install. That will be fixed later.

       Args:
         extra_packages: A list of extra php packages to install.

    """

    FRECKLET_ID = "php-lang-installed"

    extra_packages: List = None


    def __post_init__(self):
        super(PhpLangInstalled, self).__init__(var_names=["extra_packages"])


frecklet_class = PhpLangInstalled
# -*- coding: utf-8 -*-


#
# module path: pycklets.php_lang_installed.PhpLangInstalled
#


from pyckles import AutoPycklet

class PhpLangInstalled(AutoPycklet):
    """Installs PHP on RedHat/CentOS and Debian/Ubuntu servers.

     Currently it's not possible selecting the version of php to install. That will be fixed later.

       Args:
         extra_packages: A list of extra php packages to install.

    """

    FRECKLET_ID = "php-lang-installed"

    def __init__(self, extra_packages=None):

        super(PhpLangInstalled, self).__init__(var_names=["extra_packages"])
        self._extra_packages = extra_packages

    @property
    def extra_packages(self):
        return self._extra_packages

    @extra_packages.setter
    def extra_packages(self, extra_packages):
        self._extra_packages = extra_packages



frecklet_class = PhpLangInstalled