Skip to content
This repository has been archived by the owner on Sep 23, 2023. It is now read-only.

Latest commit

 

History

History
178 lines (143 loc) · 5.59 KB

README.md

File metadata and controls

178 lines (143 loc) · 5.59 KB

nephelaiio.playbooks-awx

Build Status

A set of ansible playbooks to install and configure Ansible AWX.

Playbook descriptions

The following lists the group targets and descriptions for every playbook

playbook description target
local.yml perform a local install of awx awx_app
configure.yml configure awx projects/templates/... awx_proxy
nginx.yml install an ngnix reverse proxy for awx awx_proxy

Playbook variables

The following parameters are available/required for playbook invocation

required variable description default
no awx_release target awx release '8.0.0'
no awx_pg_user postgresql connection user 'awx'
yes awx_pg_pass postgresql connection password n/a
no awx_admin_user awx administrator user 'admin'
yes awx_admin_pass awx administrator password n/a
no awx_rabbitmq_user awx administrator user 'awx
yes awx_rabbitmq_pass awx administrator password n/a

| required | variable | description | default | | no | awx_users | list of awx users | [] | | no | awx_schedules | list of awx template schedules | [] | | no | awx_templates | list of awx template | [] | | no | awx_organizations | list of awx template | [] |

Data Formats

Users

awx_users:
  - first_name: First Name
    last_name: Last Name
    username: testuser
    password: supersecret
    superuser: yes

Templates

awx_templates:
  - name: ping
    state: absent
    job_type: run
    project: awx
    inventory: awx
    playbook: ping.yml
    credentials:
      - name: awx.ssh
        kind: ssh

Schedules

awx_schedules:
  - name: ping.daily
    job_template: ping
    enabled: true
    rrule: "DTSTART:20190705T002000Z RRULE:FREQ=DAILY;INTERVAL=1"
  - name: ping.fortnight
    job_template: ping
    enabled: true
    rrule: "DTSTART:20190705T002000Z RRULE:FREQ=WEEKLY;INTERVAL=2"
  - name: ping.monthly
    job_template: ping
    enabled: true
    rrule: "DTSTART:20190705T002000Z RRULE:FREQ=MONTHLY;INTERVAL=1"

Organizations

awx_organizations:

  - name: Demo Organization
    state: absent

  - name: nephelai.io
    state: present

    credentials:
      - name: awx.github
        kind: scm
        username: user
        password: pass
      - name: awx.vault
        kind: vault
        vault_password: password
      - name: awx.ssh
        kind: ssh
        username: user
        ssh_key_data: ....

    projects:
      - name: Demo Project
        state: absent
      - name: awx
        scm_type: git
        scm_url: https://github.com/nephelaiio/ansible-playbooks-awx.git
        scm_branch: master
        scm_delete_on_update: false
        scm_credential: awx.github
        scm_update_on_launch: false
        scm_update_cache_timeout: 60
        scm_clean: false
      - name: inventory
        scm_type: git
        scm_url: https://github.com/nephelaiio/ansible-playbooks.git
        scm_branch: master
        scm_delete_on_update: false
        scm_credential: awx.github
        scm_update_on_launch: false
        scm_update_cache_timeout: 60
        scm_clean: false

    inventories:
      - name: Demo Inventory
        state: absent
      - name: awx
        source: scm
        source_project: inventory
        source_path: inventory/awx
        overwrite: true
        overwrite_vars: true
        update_on_launch: false
        update_on_project_update: true

    workflows: []

Dependencies

This playbook has the following git submodule dependencies:

And the following role dependencies by play (no dependencies if play is not listed):

See the requirements and meta files for more details

Example Invocation

git checkout https://galaxy.ansible.com/nephelaiio/ansible-playbooks-awx awx
ansible-playbook -i inventory/ awx/local.yml

Testing (TODO)

Please make sure your environment has docker installed in order to run role validation tests. Additional python dependencies are listed in the requirements

This role is tested automatically against the following distributions (docker images):

  • Ubuntu Bionic
  • Ubuntu Xenial

You can test the role directly from sources using command molecule test

License

This project is licensed under the terms of the BSD License