Commit 7020052c authored by Thorstein Buind Nordby's avatar Thorstein Buind Nordby
Browse files

updates to latest version

parent 6bb574e4
---
# Based on ansible-lint config
extends: default
rules:
braces:
max-spaces-inside: 1
level: error
brackets:
max-spaces-inside: 1
level: error
colons:
max-spaces-after: -1
level: error
commas:
max-spaces-after: -1
level: error
comments: disable
comments-indentation: disable
document-start: disable
empty-lines:
max: 3
level: error
hyphens:
level: error
indentation: disable
key-duplicates: enable
line-length: disable
new-line-at-end-of-file: disable
new-lines:
type: unix
trailing-spaces: disable
truthy: disable
......@@ -3,7 +3,7 @@
awx_repo_url: https://github.com/ansible/awx.git # Where to pull the AWX code from
awx_repo_dir: ~/awx # Where to store the AWX code locally
awx_update_repo: true # Signals if we shold keep the local repo updated
awx_repo_version: 12.0.0 # What AWX Repo version to use
awx_repo_version: 12.0.0 # What AWX Repo version to use
awx_postgres_data_dir: /var/lib/pgdocker # Where to store persistent postgres data files
awx_compose_dir: /var/lib/awx_docker # Path to place AWX docker compose file(s)
awx_web_ssl: true # Should AWX use https
......
......@@ -4,4 +4,4 @@
docker_compose:
restarted: yes
state: present
project_src: '{{ awx_compose_dir }}'
project_src: '{{ awx_compose_dir }}'
\ No newline at end of file
......@@ -35,7 +35,7 @@ galaxy_info:
- name: Centos
versions:
- 7
galaxy_tags: []
# 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
......
*********************************
Vagrant driver installation guide
*********************************
Requirements
============
* Vagrant
* Virtualbox, Parallels, VMware Fusion, VMware Workstation or VMware Desktop
Install
=======
Please refer to the `Virtual environment`_ documentation for installation best
practices. If not using a virtual environment, please consider passing the
widely recommended `'--user' flag`_ when invoking ``pip``.
.. _Virtual environment: https://virtualenv.pypa.io/en/latest/
.. _'--user' flag: https://packaging.python.org/tutorials/installing-packages/#installing-to-the-user-site
.. code-block:: bash
$ pip install 'molecule_vagrant'
---
- name: Converge
hosts: all
become: yes
tasks:
- name: "Include ansible-role-awx-docker"
include_role:
name: "ansible-role-awx-docker"
---
dependency:
name: galaxy
driver:
name: vagrant
lint: |
set -e
yamllint .
ansible-lint
platforms:
- name: centos7
box: centos/7
memory: 1024
cpus: 2
instance_raw_config_args:
- "vm.network 'forwarded_port', guest: 80, host: 8081"
- "vm.network 'forwarded_port', guest: 443, host: 4431"
- name: centos8
box: centos/8
memory: 1024
cpus: 2
instance_raw_config_args:
- "vm.network 'forwarded_port', guest: 80, host: 8082"
- "vm.network 'forwarded_port', guest: 443, host: 4432"
- name: debian9
box: debian/stretch64
memory: 1024
cpus: 2
instance_raw_config_args:
- "vm.network 'forwarded_port', guest: 80, host: 8083"
- "vm.network 'forwarded_port', guest: 443, host: 4433"
- name: debian10
box: debian/buster64
memory: 1024
cpus: 2
instance_raw_config_args:
- "vm.network 'forwarded_port', guest: 80, host: 8084"
- "vm.network 'forwarded_port', guest: 443, host: 4434"
provisioner:
name: ansible
verifier:
name: ansible
---
# This is an example playbook to execute Ansible tests.
- name: Verify
hosts: all
tasks:
- name: Example assertion
assert:
that: true
......@@ -2,20 +2,20 @@
- name: Set dockerhub base with local registry
set_fact:
awx_docker_registry_ansible_base: "{{ awx_docker_registry }}/ansible"
when: awx_docker_registry != ""
when: awx_docker_registry | length > 0
- name: Run AWX playbook from source with local registry
command: "ansible-playbook -i inventory install.yml -e postgres_data_dir={{ awx_postgres_data_dir }} -e dockerhub_base={{ awx_docker_registry_ansible_base }} -e ansible_python_interpreter={{ python_path }}"
command: "ansible-playbook -i inventory install.yml -e postgres_data_dir={{ awx_postgres_data_dir }} -e dockerhub_base={{ awx_docker_registry_ansible_base }} -e ansible_python_interpreter={{ python_path }}" # noqa 204
args:
chdir: "{{ awx_repo_dir }}/installer"
when: awx_docker_registry != ""
when: awx_docker_registry | length > 0
notify: restart containers
- name: Run AWX playbook from source whith official registry
command: "ansible-playbook -i inventory install.yml -e postgres_data_dir={{ awx_postgres_data_dir }} -e ansible_python_interpreter={{ python_path }}"
args:
chdir: "{{ awx_repo_dir }}/installer"
when: awx_docker_registry == ""
when: awx_docker_registry | length == 0
notify: restart containers
- name: SELinux normal
......@@ -54,7 +54,7 @@
- name: Apply new SELinux file context to filesystem
command: restorecon -irv {{ awx_compose_dir }}
#notify: restart containers
- name: Set SELinux label for database folder
command: semanage fcontext -a -t container_file_t '{{ awx_postgres_data_dir }}(/.*)?'
......
......@@ -32,7 +32,7 @@
provider: selfsigned
register: cert_created
- name: Make pem from self-signed
- name: Make pem from self-signed # noqa 503
shell: cat {{ awx_web_ssl_key_folder }}/{{ inventory_hostname }}.key {{ awx_web_ssl_cert_folder }}/{{ inventory_hostname }}.crt > {{ awx_web_ssl_cert_folder }}/{{ inventory_hostname }}.pem # noqa 204
when: cert_created.changed
......
......@@ -4,7 +4,7 @@
include_vars: '{{ ansible_distribution }}{{ ansible_distribution_major_version }}.yml'
- name: Setup needed repositories
include_tasks: 'os_tasks/repo_{{ ansible_distribution}}.yml'
include_tasks: 'os_tasks/repo_{{ ansible_distribution }}.yml'
- name: Install requirements for target OS
package:
......@@ -15,11 +15,11 @@
- name: Set ansible python interpreter
set_fact:
ansible_python_interpreter: '{{ python_path }}'
- name: Install required pip packages
pip:
name: '{{ item }}'
state: latest
state: present
executable: '{{ pip_executable }}'
loop: '{{ awx_required_pip_dependencies|flatten(levels=1) }}'
......
---
- name: Add docker repo
shell: 'yum-config-manager --add-repo={{ docker_repo }}'
args:
creates: /etc/yum.repos.d/docker-cerepo
get_url:
url: '{{ docker_repo }}'
dest: /etc/yum.repos.d/docker.repo
- name: Enable epel
package:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment