[ansible-project] Ansible Tower community
Is there an Ansible Tower online community expressly for Ansible Tower? -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails from it, send an email to ansible-project+unsubscr...@googlegroups.com. To post to this group, send email to ansible-project@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/70a2cfcb-c4e7-4c4e-b653-8d593a163773%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [ansible-project] odd result after migrating postgresql database off-tower
Exactly my plan. Thanks! > On Nov 15, 2016, at 10:38 AM, James Martin wrote: > > I could only assume you are referring to this 2 year old script I wrote: > https://github.com/jsmartin/ansible-tower-db-migrator > <https://github.com/jsmartin/ansible-tower-db-migrator>. That was created > long before Ansibe Tower had a proper backup restore mechanism. I suggest > you contact Ansible support and use the official method. > > On Tue, Nov 15, 2016 at 1:13 PM, Stuart Cracraft <mailto:smcracr...@gmail.com>> wrote: > > Getting a bizarre result after migrating postgresql database off-tower using > jsmartin's script. > > The gui no longer logs in. > > Shows username where admin/password are entered but then it goes to > "Working..." > > After a very long pause, it reverts to a blanks screen with > Tower/Projects/Inventories/Job Templates/Jobs across the top but nothing in > the client area. > > None of the controls in the bar across the top work. > > supervisorctl status > > awx-callback-receiverRUNNINGpid 5214, uptime 0:04:28 > > awx-celeryd RUNNINGpid 5204, uptime 0:04:29 > > awx-fact-cache-receiver RUNNINGpid 5172, uptime 0:04:31 > > awx-socketio-service RUNNINGpid 5171, uptime 0:04:31 > > awx-task-system RUNNINGpid 5189, uptime 0:04:30 > > > > ansible-tower-service status > > Showing Tower Status > > * apache2 is running > > redis-server is running > > > is running > > > > Redis log looks ok: > > tail -10 /var/log/redis/redis-server.log > > [1647] 15 Nov 18:04:09.012 * 10 changes in 300 seconds. Saving... > > [1647] 15 Nov 18:04:09.013 * Background saving started by pid 6290 > > [6290] 15 Nov 18:04:09.016 * DB saved on disk > > [6290] 15 Nov 18:04:09.016 * RDB: 4 MB of memory used by copy-on-write > > [1647] 15 Nov 18:04:09.113 * Background saving terminated with success > > [1647] 15 Nov 18:09:10.063 * 10 changes in 300 seconds. Saving... > > [1647] 15 Nov 18:09:10.064 * Background saving started by pid 7096 > > [7096] 15 Nov 18:09:10.066 * DB saved on disk > > [7096] 15 Nov 18:09:10.066 * RDB: 4 MB of memory used by copy-on-write > > > [1647] 15 Nov 18:09:10.164 * Background saving terminated with success > > > > Able to connect to port 5432 on the remote server which shows: > > netstat -plunt | grep 5432 > > tcp0 0 0.0.0.0 <http://0.0.0.0/>:54320.0.0.0:* > LISTEN 43939/postgres > > > tcp6 0 0 :::5432 :::*LISTEN > 43939/postgres > > > > Apache error log doesn't show anything: > > tail -10 /var/log/apache2/error.log > > [Tue Nov 15 18:00:40.895081 2016] [core:warn] [pid 2303:tid 140370545932160] > AH00045: child process 2311 still did not exit, sending a SIGTERM > > [Tue Nov 15 18:00:42.897368 2016] [core:error] [pid 2303:tid 140370545932160] > AH00046: child process 2310 still did not exit, sending a SIGKILL > > [Tue Nov 15 18:00:42.898396 2016] [core:error] [pid 2303:tid 140370545932160] > AH00046: child process 2311 still did not exit, sending a SIGKILL > > [Tue Nov 15 18:00:43.899660 2016] [mpm_event:notice] [pid 2303:tid > 140370545932160] AH00491: caught SIGTERM, shutting down > > [Tue Nov 15 18:00:47.629592 2016] [ssl:warn] [pid 5605:tid 140170835982208] > AH01906: RSA server certificate is a CA certificate (BasicConstraints: CA == > TRUE !?) > > [Tue Nov 15 18:00:47.629645 2016] [ssl:warn] [pid 5605:tid 140170835982208] > AH01909: RSA certificate configured for localhost:443 does NOT include an ID > which matches the server name > > [Tue Nov 15 18:00:47.637504 2016] [ssl:warn] [pid 5606:tid 140170835982208] > AH01906: RSA server certificate is a CA certificate (BasicConstraints: CA == > TRUE !?) > > [Tue Nov 15 18:00:47.637522 2016] [ssl:warn] [pid 5606:tid 140170835982208] > AH01909: RSA certificate configured for localhost:443 does NOT include an ID > which matches the server name > > [Tue Nov 15 18:00:47.639120 2016] [mpm_event:notice] [pid 5606:tid > 140170835982208] AH00489: Apache/2.4.7 (Ubuntu) OpenSSL/1.0.1f mod_wsgi/3.4 > Python/2.7.6 configured -- resuming normal operations > > > [Tue Nov 15 18:00:47.639148 2016] [core:notice] [pid 5606:tid > 140170835982208] AH00094: Command line: '/usr/sbin/apache2' > > > > > > > > -- > You received this message because you are subscribed to the Google Groups > "Ansible Project" group. > To unsubs
[ansible-project] odd result after migrating postgresql database off-tower
Getting a bizarre result after migrating postgresql database off-tower using jsmartin's script. The gui no longer logs in. Shows username where admin/password are entered but then it goes to "Working..." After a very long pause, it reverts to a blanks screen with Tower/Projects/Inventories/Job Templates/Jobs across the top but nothing in the client area. None of the controls in the bar across the top work. supervisorctl status awx-callback-receiverRUNNINGpid 5214, uptime 0:04:28 awx-celeryd RUNNINGpid 5204, uptime 0:04:29 awx-fact-cache-receiver RUNNINGpid 5172, uptime 0:04:31 awx-socketio-service RUNNINGpid 5171, uptime 0:04:31 awx-task-system RUNNINGpid 5189, uptime 0:04:30 ansible-tower-service status Showing Tower Status * apache2 is running redis-server is running is running Redis log looks ok: tail -10 /var/log/redis/redis-server.log [1647] 15 Nov 18:04:09.012 * 10 changes in 300 seconds. Saving... [1647] 15 Nov 18:04:09.013 * Background saving started by pid 6290 [6290] 15 Nov 18:04:09.016 * DB saved on disk [6290] 15 Nov 18:04:09.016 * RDB: 4 MB of memory used by copy-on-write [1647] 15 Nov 18:04:09.113 * Background saving terminated with success [1647] 15 Nov 18:09:10.063 * 10 changes in 300 seconds. Saving... [1647] 15 Nov 18:09:10.064 * Background saving started by pid 7096 [7096] 15 Nov 18:09:10.066 * DB saved on disk [7096] 15 Nov 18:09:10.066 * RDB: 4 MB of memory used by copy-on-write [1647] 15 Nov 18:09:10.164 * Background saving terminated with success Able to connect to port 5432 on the remote server which shows: netstat -plunt | grep 5432 tcp0 0 0.0.0.0:54320.0.0.0:* LISTEN 43939/postgres tcp6 0 0 :::5432 :::*LISTEN 43939/postgres Apache error log doesn't show anything: tail -10 /var/log/apache2/error.log [Tue Nov 15 18:00:40.895081 2016] [core:warn] [pid 2303:tid 140370545932160] AH00045: child process 2311 still did not exit, sending a SIGTERM [Tue Nov 15 18:00:42.897368 2016] [core:error] [pid 2303:tid 140370545932160] AH00046: child process 2310 still did not exit, sending a SIGKILL [Tue Nov 15 18:00:42.898396 2016] [core:error] [pid 2303:tid 140370545932160] AH00046: child process 2311 still did not exit, sending a SIGKILL [Tue Nov 15 18:00:43.899660 2016] [mpm_event:notice] [pid 2303:tid 140370545932160] AH00491: caught SIGTERM, shutting down [Tue Nov 15 18:00:47.629592 2016] [ssl:warn] [pid 5605:tid 140170835982208] AH01906: RSA server certificate is a CA certificate (BasicConstraints: CA == TRUE !?) [Tue Nov 15 18:00:47.629645 2016] [ssl:warn] [pid 5605:tid 140170835982208] AH01909: RSA certificate configured for localhost:443 does NOT include an ID which matches the server name [Tue Nov 15 18:00:47.637504 2016] [ssl:warn] [pid 5606:tid 140170835982208] AH01906: RSA server certificate is a CA certificate (BasicConstraints: CA == TRUE !?) [Tue Nov 15 18:00:47.637522 2016] [ssl:warn] [pid 5606:tid 140170835982208] AH01909: RSA certificate configured for localhost:443 does NOT include an ID which matches the server name [Tue Nov 15 18:00:47.639120 2016] [mpm_event:notice] [pid 5606:tid 140170835982208] AH00489: Apache/2.4.7 (Ubuntu) OpenSSL/1.0.1f mod_wsgi/3.4 Python/2.7.6 configured -- resuming normal operations [Tue Nov 15 18:00:47.639148 2016] [core:notice] [pid 5606:tid 140170835982208] AH00094: Command line: '/usr/sbin/apache2' -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails from it, send an email to ansible-project+unsubscr...@googlegroups.com. To post to this group, send email to ansible-project@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/a2f3bf79-670d-411c-97a2-63828767ea56%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[ansible-project] ansible won't install python-keyczar on selected hosts - manual apt-get install python-keyczar -y works
I get this series of errors when trying to do a service install using the apt module with Ansible on an Ubuntu 14.x box. On most of the other Ubuntu 14.x boxes it works fine. There's a handful that it doesn't run on. The relevant area of the playbook in tasks main yaml: - name: Install the required packages for keyczar apt: name={{ keyczar_name }} state=installed The definition in vars main and debian yaml: keyczar_name: python-keyczar Prior to the run, the lock file /var/lib/dpkg/lock does not exist. After the failed run, it does exist. Manually removing it with rm and rerunning does nothing. The equivalent CLI being run is apt-get install python-keyczar -y which if run manually works. This concerns me because it is the first time I have seen a package get rejected when run under Ansible but works fine when installing manually. Makes no sense. The specific error is: fatal: [qaevt5.channel-corp.com]: FAILED! => {"cache_update_time": 0, "cache_updated": false, "changed": false, "failed": true, "msg": "'/usr/bin/ap\ t-get -y -o \"Dpkg::Options::=--force-confdef\" -o \"Dpkg::Options::=--force-confold\" --simulate install 'python-keyczar'' failed: E: Could not ge\ t lock /var/lib/dpkg/lock - open (11: Resource temporarily unavailable)\nE: Unable to lock the administration directory (/var/lib/dpkg/), is another\ process using it?\n", "stderr": "E: Could not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unavailable)\nE: Unable to lock the admi\ nistration directory (/var/lib/dpkg/), is another process using it?\n", "stdout": "", "stdout_lines": []} fuser and lsof show no other processes holding the lock. After the apt-get install python-keyczar -y is run manually, and the ansible run rerun, fine no problem. Package "ok". I am also cross-posting this to askubuntu.com. The above lock file has other associated files post-manual run. ls -l /var/cache/apt/archives/lock /var/lib/apt/lists/lock /var/lib/dpkg/lock -rw-r- 1 root root 0 Aug 5 2015 /var/cache/apt/archives/lock -rw-r- 1 root root 0 Mar 30 00:03 /var/lib/apt/lists/lock -rw-r- 1 root root 0 Mar 30 15:13 /var/lib/dpkg/lock I am going to do the manual run on the half-dozen boxes where this is happening on. The other several dozen had no such issue. Of course, until this is clarified, it has to be manually done which really defeats the purpose. -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails from it, send an email to ansible-project+unsubscr...@googlegroups.com. To post to this group, send email to ansible-project@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/ee08423e-0d69-42a5-88fc-aebe06e1db69%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[ansible-project] service "started" is creating multiple copies when run with playbook
Not sure what to make of this. I have a service X running on host Y After running the playbook with tasks/main.yml: - name: keep process running but do not recycle it service: name=X state=started enabled=yes ansible-playbook service-X.yml TASK [keep process running] changed: [bunch of hosts] PLAY RECAP bunch-of-hosts: ok=2changed=1 unreachable=0failed=0 The host now has two X process running Yet if I go and kill them, rerun, it leaves just one. Now if I run it again, it puts in a second one. Run again, a third, etc. Fortunately I caught this before running it across the hosts in test. This is ansible 2.0.0.2 -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails from it, send an email to ansible-project+unsubscr...@googlegroups.com. To post to this group, send email to ansible-project@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/6cb6fb4a-379f-480b-bb52-db250e2ec4e8%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[ansible-project] Ansible playbook to deploy a VM in a PXEBOOT envrionment
My present Ansible playbook can spin-up a VM in the interactive Ubuntu installation (e.g. waiting for you to select the language on the first screen), but I've not been able to get it instead to go to the PXEBOOT/KICKSTART server on the same network. The P/K works fine when F12 is pressed and it goes off and builds a complete server of any kind on my stack but I want to be able to initiate that with a transformation of the Ansible playbook below and have no idea how to do it after a pretty thorough review of documents on the Internet. If anyone knows how this can be accomplished and could comment, I'd sure appreciate it. - hosts: 127.0.0.1 connection: local user: root sudo: false gather_facts: false serial: 1 tasks: - vsphere_guest: vcenter_hostname: sna-vcsa.SOMEDOMAIN.com username: ansible password: SOMEPASSWORD guest: SOMEHOSTNAME state: powered_on vm_extra_config: vcpu.hotadd: yes mem.hotadd: yes vm_disk: disk1: size_gb: 100 type: thin datastore: SOMEDATASTORE vm_nic: nic1: type: vmxnet3 network: SOMENETWORK network_type: standard vm_hardware: memory_mb: 2048 num_cpus: 2 osid: ubuntu64Guest scsi: paravirtual vm_cdrom: type: "iso" iso_path: "SOMEISODATASTORE/ISO/ubuntu-14.04.3-server-amd64.iso" esxi: datacenter: SNA hostname: sna1.SOMEDOMAIN.com -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails from it, send an email to ansible-project+unsubscr...@googlegroups.com. To post to this group, send email to ansible-project@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/4a79ce46-080b-4a71-a875-8722472e6cf6%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[ansible-project] ansible and dependencies
Hi - trying to ensure I can make tasks dependent on prior task successes in roles inside playbooks. So far it doesn't happen. I'm using a combination of register/when. What is the method within a series of tasks in a role's tasks/main.yml to make one dependent upon the prior one's running as success? This only partially works: --- # tasks file for host - name: Add the OS specific variables include_vars: "{{ ansible_os_family }}.yml" - name: Install /etc/hosts template: > src=hosts.j2 dest=/etc/hosts owner=root group=root mode=0644 register: filechanged tags: hosts - name: Install /etc/hostname template: > src=hostname.j2 dest=/etc/hostname owner=root group=root mode=0644 register: filechanged tags: hostname - name: Install /etc/network/interfaces template: > src=interfaces.j2 dest=/etc/network/interfaces owner=root group=root mode=0644 register: filechanged tags: interfaces - name: Run hostname command: /bin/hostname {{ hostalias }} when: filechanged|success tags: hostname-run - name: Restart networking service: name=networking state=restarted when: filechanged|success tags: network which produces this even though nothing is changed: ansible-playbook host.yml --check --ask-sudo-pass PLAY [testers] GATHERING FACTS *** ok: [tstsmc1] TASK: [host | Add the OS specific variables] ** ok: [tstsmc1] TASK: [host | Install /etc/hosts] * ok: [tstsmc1] TASK: [host | Install /etc/hostname] ** ok: [tstsmc1] TASK: [host | Install /etc/network/interfaces] ok: [tstsmc1] TASK: [host | Run hostname] *** skipping: [tstsmc1] TASK: [host | Restart networking] * changed: [tstsmc1] PLAY RECAP tstsmc1: ok=6changed=1unreachable=0failed=0 My concern is why the restart networking would be run given that filechanged is not asserted by the first four tasks (nor any of the tasks.) -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails from it, send an email to ansible-project+unsubscr...@googlegroups.com. To post to this group, send email to ansible-project@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/cb7cc93b-b68a-4103-8223-10cfc249d43f%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.