From e45695622f867734cbfd64797cf6b830a2fff604 Mon Sep 17 00:00:00 2001 From: Matt Woodson Date: Fri, 13 Feb 2015 14:55:01 -0500 Subject: more ansible tower commits --- roles/ansible_install/tasks/main.yaml | 7 +++++++ roles/base_os/tasks/main.yaml | 5 +++++ roles/ipv6_disable/tasks/main.yaml | 11 +++++++++++ 3 files changed, 23 insertions(+) create mode 100644 roles/ansible_install/tasks/main.yaml create mode 100644 roles/ipv6_disable/tasks/main.yaml (limited to 'roles') 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/base_os/tasks/main.yaml b/roles/base_os/tasks/main.yaml index 01d2898c5..dddedeaa8 100644 --- a/roles/base_os/tasks/main.yaml +++ b/roles/base_os/tasks/main.yaml @@ -16,6 +16,11 @@ src: vimrc dest: /root/.vimrc +- name: Bash Completion + yum: + pkg: bash-completion + state: installed + - name: Install firewalld yum: pkg: firewalld diff --git a/roles/ipv6_disable/tasks/main.yaml b/roles/ipv6_disable/tasks/main.yaml new file mode 100644 index 000000000..fae5beee7 --- /dev/null +++ b/roles/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 -- cgit v1.2.3 From 8120628e5a4f913e770851c1a3172126d79695fc Mon Sep 17 00:00:00 2001 From: Matt Woodson Date: Tue, 17 Feb 2015 16:41:48 -0500 Subject: ansible tower install --- roles/ansible_tower/files/inventory | 5 ++++ roles/ansible_tower/files/tower_setup_conf.yml | 10 +++++++ roles/ansible_tower/tasks/main.yaml | 38 ++++++++++++++++++++++++++ 3 files changed, 53 insertions(+) create mode 100644 roles/ansible_tower/files/inventory create mode 100644 roles/ansible_tower/files/tower_setup_conf.yml create mode 100644 roles/ansible_tower/tasks/main.yaml (limited to 'roles') 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..ccdc5a486 --- /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 + -- cgit v1.2.3 From eaeeb1ec8370c35c7010b9350d42e30e5e00dcc5 Mon Sep 17 00:00:00 2001 From: Matt Woodson Date: Thu, 19 Feb 2015 09:42:28 -0500 Subject: more updates --- roles/ansible_tower/tasks/main.yaml | 16 ++++++++-------- roles/timezone/tasks/main.yaml | 4 ++++ 2 files changed, 12 insertions(+), 8 deletions(-) create mode 100644 roles/timezone/tasks/main.yaml (limited to 'roles') diff --git a/roles/ansible_tower/tasks/main.yaml b/roles/ansible_tower/tasks/main.yaml index ccdc5a486..8fe0634d2 100644 --- a/roles/ansible_tower/tasks/main.yaml +++ b/roles/ansible_tower/tasks/main.yaml @@ -15,14 +15,14 @@ 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: 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 diff --git a/roles/timezone/tasks/main.yaml b/roles/timezone/tasks/main.yaml new file mode 100644 index 000000000..339b4e0b2 --- /dev/null +++ b/roles/timezone/tasks/main.yaml @@ -0,0 +1,4 @@ +--- +- name: Setup correct timezone + command: timedatectl set-timezone America/New_York + when: ansible_os_family == "RedHat" and ansible_lsb.major_release|int >= 7 -- cgit v1.2.3 From f780d4fa01a1e8b1559d31a7065715317a884ec4 Mon Sep 17 00:00:00 2001 From: Matt Woodson Date: Tue, 24 Feb 2015 10:14:28 -0500 Subject: renamed ipv6_disable --- roles/ipv6_disable/tasks/main.yaml | 11 ----------- roles/os_ipv6_disable/tasks/main.yaml | 11 +++++++++++ roles/timezone/tasks/main.yaml | 4 ---- 3 files changed, 11 insertions(+), 15 deletions(-) delete mode 100644 roles/ipv6_disable/tasks/main.yaml create mode 100644 roles/os_ipv6_disable/tasks/main.yaml delete mode 100644 roles/timezone/tasks/main.yaml (limited to 'roles') diff --git a/roles/ipv6_disable/tasks/main.yaml b/roles/ipv6_disable/tasks/main.yaml deleted file mode 100644 index fae5beee7..000000000 --- a/roles/ipv6_disable/tasks/main.yaml +++ /dev/null @@ -1,11 +0,0 @@ ---- -# 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 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 diff --git a/roles/timezone/tasks/main.yaml b/roles/timezone/tasks/main.yaml deleted file mode 100644 index 339b4e0b2..000000000 --- a/roles/timezone/tasks/main.yaml +++ /dev/null @@ -1,4 +0,0 @@ ---- -- name: Setup correct timezone - command: timedatectl set-timezone America/New_York - when: ansible_os_family == "RedHat" and ansible_lsb.major_release|int >= 7 -- cgit v1.2.3 From ff08486781625fcdd13210963b94e2c1d3a2e00a Mon Sep 17 00:00:00 2001 From: Matt Woodson Date: Tue, 24 Feb 2015 10:19:17 -0500 Subject: cleaned up ansible tower --- roles/ansible_tower/files/inventory | 5 ----- roles/ansible_tower/files/tower_setup_conf.yml | 10 ---------- roles/ansible_tower/tasks/main.yaml | 8 ++++---- 3 files changed, 4 insertions(+), 19 deletions(-) delete mode 100644 roles/ansible_tower/files/inventory delete mode 100644 roles/ansible_tower/files/tower_setup_conf.yml (limited to 'roles') diff --git a/roles/ansible_tower/files/inventory b/roles/ansible_tower/files/inventory deleted file mode 100644 index c4f03c7fb..000000000 --- a/roles/ansible_tower/files/inventory +++ /dev/null @@ -1,5 +0,0 @@ -[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 deleted file mode 100644 index 023e6cd3e..000000000 --- a/roles/ansible_tower/files/tower_setup_conf.yml +++ /dev/null @@ -1,10 +0,0 @@ -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 index 8fe0634d2..090f0ed00 100644 --- a/roles/ansible_tower/tasks/main.yaml +++ b/roles/ansible_tower/tasks/main.yaml @@ -11,13 +11,13 @@ - 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-{{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: 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 # -- cgit v1.2.3 From 0a6602e6ff0e1340331002e371f5379ef74934a8 Mon Sep 17 00:00:00 2001 From: Matt Woodson Date: Tue, 24 Feb 2015 12:55:41 -0500 Subject: cleaned up ansible tower --- roles/ansible/tasks/main.yaml | 7 +++++++ roles/ansible_install/tasks/main.yaml | 7 ------- roles/ansible_tower/tasks/main.yaml | 9 ++++----- 3 files changed, 11 insertions(+), 12 deletions(-) create mode 100644 roles/ansible/tasks/main.yaml delete mode 100644 roles/ansible_install/tasks/main.yaml (limited to 'roles') diff --git a/roles/ansible/tasks/main.yaml b/roles/ansible/tasks/main.yaml new file mode 100644 index 000000000..67a04b919 --- /dev/null +++ b/roles/ansible/tasks/main.yaml @@ -0,0 +1,7 @@ +--- +# Install ansible client + +- name: Install Ansible + yum: + pkg: ansible + state: installed diff --git a/roles/ansible_install/tasks/main.yaml b/roles/ansible_install/tasks/main.yaml deleted file mode 100644 index 67a04b919..000000000 --- a/roles/ansible_install/tasks/main.yaml +++ /dev/null @@ -1,7 +0,0 @@ ---- -# Install ansible client - -- name: Install Ansible - yum: - pkg: ansible - state: installed diff --git a/roles/ansible_tower/tasks/main.yaml b/roles/ansible_tower/tasks/main.yaml index 090f0ed00..f62612eff 100644 --- a/roles/ansible_tower/tasks/main.yaml +++ b/roles/ansible_tower/tasks/main.yaml @@ -12,11 +12,10 @@ - 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 + get_url: url=http://releases.ansible.com/ansible-tower/setup/ansible-tower-setup-2.1.1.tar.gz dest=/opt/ force=no - name: extract Tower - unarchive: src=/opt/ansible-tower-setup-2.1.1.tar.gz dest=/opt copy=no + unarchive: src=/opt/ansible-tower-setup-2.1.1.tar.gz dest=/opt copy=no creates=ansible-tower-setup-2.1.1 #- 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 @@ -24,8 +23,8 @@ #- 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: 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 -- cgit v1.2.3 From 44e939dba128ea0a02112af555fdf085edacf464 Mon Sep 17 00:00:00 2001 From: Matt Woodson Date: Tue, 24 Feb 2015 14:52:57 -0500 Subject: removing dead code for twiest --- roles/ansible_tower/tasks/main.yaml | 10 ---------- 1 file changed, 10 deletions(-) (limited to 'roles') diff --git a/roles/ansible_tower/tasks/main.yaml b/roles/ansible_tower/tasks/main.yaml index f62612eff..f58a5b1c2 100644 --- a/roles/ansible_tower/tasks/main.yaml +++ b/roles/ansible_tower/tasks/main.yaml @@ -11,21 +11,11 @@ - 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=no - name: extract Tower unarchive: src=/opt/ansible-tower-setup-2.1.1.tar.gz dest=/opt copy=no creates=ansible-tower-setup-2.1.1 -#- 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 -- cgit v1.2.3