diff options
Diffstat (limited to 'roles')
-rw-r--r-- | roles/ansible_install/tasks/main.yaml | 7 | ||||
-rw-r--r-- | roles/ansible_tower/files/inventory | 5 | ||||
-rw-r--r-- | roles/ansible_tower/files/tower_setup_conf.yml | 10 | ||||
-rw-r--r-- | roles/ansible_tower/tasks/main.yaml | 38 | ||||
-rw-r--r-- | roles/base_os/tasks/main.yaml | 5 | ||||
-rw-r--r-- | roles/os_ipv6_disable/tasks/main.yaml | 11 |
6 files changed, 76 insertions, 0 deletions
diff --git a/roles/ansible_install/tasks/main.yaml b/roles/ansible_install/tasks/main.yaml new file mode 100644 index 000000000..67a04b919 --- /dev/null +++ b/roles/ansible_install/tasks/main.yaml @@ -0,0 +1,7 @@ +--- +# Install ansible client + +- name: Install Ansible + yum: + pkg: ansible + state: installed diff --git a/roles/ansible_tower/files/inventory b/roles/ansible_tower/files/inventory new file mode 100644 index 000000000..c4f03c7fb --- /dev/null +++ b/roles/ansible_tower/files/inventory @@ -0,0 +1,5 @@ +[primary] +localhost + +[all:children] +primary diff --git a/roles/ansible_tower/files/tower_setup_conf.yml b/roles/ansible_tower/files/tower_setup_conf.yml new file mode 100644 index 000000000..023e6cd3e --- /dev/null +++ b/roles/ansible_tower/files/tower_setup_conf.yml @@ -0,0 +1,10 @@ +admin_password: Wd97YLJkqt0Z +database: external +munin_password: Wd97YLJkqt0Z +pg_database: tower +pg_host: use-tower1.cx5dyo4uindu.us-east-1.rds.amazonaws.com +pg_password: qG3JwuXb6uXi +pg_port: 5432 +pg_username: tower_admin +primary_machine: localhost +redis_password: wbTneuaKu4YSLSmWqCYVQaB83bREadRg8HRvNJX4 diff --git a/roles/ansible_tower/tasks/main.yaml b/roles/ansible_tower/tasks/main.yaml new file mode 100644 index 000000000..8fe0634d2 --- /dev/null +++ b/roles/ansible_tower/tasks/main.yaml @@ -0,0 +1,38 @@ +--- +- name: install some useful packages + yum: name={{ item }} + with_items: + - git + - python-pip + - unzip + - python-psphere + - ansible + - telnet + - ack + +- name: download Tower setup + #get_url: url=http://releases.ansible.com/ansible-tower/setup/ansible-tower-setup-{{tower_version}}.tar.gz + get_url: url=http://releases.ansible.com/ansible-tower/setup/ansible-tower-setup-2.1.1.tar.gz + dest=/opt/ force=yes + +#- name: extract Tower +# unarchive: src=/opt/ansible-tower-setup-2.1.1.tar.gz dest=/opt copy=no +# +#- name: copy tower_setup_conf.yml +# copy: src=tower_setup_conf.yml dest=/opt/ansible-tower-setup-2.1.1 owner=root group=root mode=0644 +# +#- name: copy inventory +# copy: src=inventory dest=/opt/ansible-tower-setup-2.1.1 owner=root group=root mode=0644 + +- name: run the Tower installer + command: chdir=/opt/ansible-tower-setup-2.1.1 creates=/etc/awx/settings.py ./setup.sh + +- name: Open firewalld port for http + firewalld: port=80/tcp permanent=true state=enabled + +- name: Open firewalld port for https + firewalld: port=443/tcp permanent=true state=enabled + +- name: Open firewalld port for https + firewalld: port=8080/tcp permanent=true state=enabled + diff --git a/roles/base_os/tasks/main.yaml b/roles/base_os/tasks/main.yaml index 2bb2b4ec7..448221cfb 100644 --- a/roles/base_os/tasks/main.yaml +++ b/roles/base_os/tasks/main.yaml @@ -19,6 +19,11 @@ state: present insertafter: EOF +- name: Bash Completion + yum: + pkg: bash-completion + state: installed + - name: Install firewalld yum: pkg: firewalld diff --git a/roles/os_ipv6_disable/tasks/main.yaml b/roles/os_ipv6_disable/tasks/main.yaml new file mode 100644 index 000000000..fae5beee7 --- /dev/null +++ b/roles/os_ipv6_disable/tasks/main.yaml @@ -0,0 +1,11 @@ +--- +# Disable ipv6 on RHEL7 + +- name: Disable all ipv6 + sysctl: name="net.ipv6.conf.all.disable_ipv6" value=1 sysctl_set=yes state=present reload=yes + +- name: Disable default ipv6 + sysctl: name="net.ipv6.conf.default.disable_ipv6" value=1 sysctl_set=yes state=present reload=yes + +- name: Remove ipv6 localhost from /etc/hosts + lineinfile: dest='/etc/hosts' regexp='^::1 ' state=absent owner=root group=root mode=0644 |