diff --git a/ansible/bakery.yml b/ansible/bakery.yml index 4282248..d547c6a 100644 --- a/ansible/bakery.yml +++ b/ansible/bakery.yml @@ -8,14 +8,14 @@ hosts: 127.0.0.1 connection: local become: yes - roles: + roles: - cloudwatch-agent - name: Install New Relic Infrastructure hosts: 127.0.0.1 connection: local become: yes - roles: + roles: - newrelic.newrelic-infra vars: nrinfragent_os_name: CentOS diff --git a/ansible/requirements.yml b/ansible/requirements.yml index 5978c53..41d2fbe 100644 --- a/ansible/requirements.yml +++ b/ansible/requirements.yml @@ -1,10 +1,11 @@ # Install roles from Ansible Galaxy # CIS hardening -- src: MindPointGroup.RHEL7-CIS +- src: mindpointgroup.rhel7_cis # NGINX web server - src: nginxinc.nginx + version: 0.14.0 # AWS CodeDeploy agent # The original version of this role in Ansible Galaxy @@ -17,4 +18,3 @@ # New Relic Infrastructure - src: newrelic.newrelic-infra - diff --git a/bin/ansible.sh b/bin/ansible.sh index f5dee25..13e7496 100755 --- a/bin/ansible.sh +++ b/bin/ansible.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -# Run ansible +# Run ansible # # Set bash unofficial strict mode http://redsymbol.net/articles/unofficial-bash-strict-mode/ set -euo pipefail @@ -20,5 +20,7 @@ DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" ensure_not_root +sudo yum -y install yum-utils pcre2 + cd "$DIR/../ansible" ansible-playbook -l localhost "$@" diff --git a/bin/install-ansible.sh b/bin/install-ansible.sh index 0e8c04c..d5571db 100755 --- a/bin/install-ansible.sh +++ b/bin/install-ansible.sh @@ -16,6 +16,8 @@ DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" #shellcheck disable=SC1090 . "$DIR/common.sh" +ls -al /etc/yum.repos.d + ensure_not_root quick_yum_install epel-release