Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Running playbook only achieves taps and cask installation #168

Closed
joshbarrington opened this issue Dec 1, 2022 · 10 comments
Closed

Running playbook only achieves taps and cask installation #168

joshbarrington opened this issue Dec 1, 2022 · 10 comments
Labels

Comments

@joshbarrington
Copy link

joshbarrington commented Dec 1, 2022

I am running the playbook with the following custom config:

downloads: ~/.ansible-downloads/

configure_dotfiles: true
configure_terminal: false
configure_osx: true

configure_dock: false
dockitems_remove: []
dockitems_persist: []

configure_sudoers: false
sudoers_custom_config: ""

dotfiles_repo: https://github.com/Joshbarrington/dotfiles.git
dotfiles_repo_accept_hostkey: true
dotfiles_repo_local_destination: ~/github/dotfiles
dotfiles_files:
  - .gitconfig
  - .gitignoreglobal
  - .osx
  - .zshrc
  - .treeignore

homebrew_installed_packages:
  - aws-shell
  - awscli
  - azure-cli
  - asdf
  - bat
  - broot
  - ccls
  - clang-format
  - cmake
  - ctags
  - curl
  - exa
  - fd
  - ffmpeg
  - fswatch
  - fzf
  - fx
  - gh
  - gcc
  - git
  - httpie
  - hub
  - jq
  - mas
  - neovim
  - node
  - openssl
  - ripgrep
  - rename
  - tig
  - tree
  - tmuxinator
  - rustup-init
  - unzip
  - wget
  - zsh
  - zsh-autosuggestions
  - youtube-dl
  - git-lfs
  - pre-commit

homebrew_taps:
  - homebrew/core
  - homebrew/cask-fonts

homebrew_cask_appdir: /Applications
homebrew_cask_apps:
  - docker
  - rectangle
  - firefox
  - google-chrome
  - licecap
  - slack
  - iterm2
  - dash
  - tunnelblick
  - keybase
  - spotify
  - visual-studio-code
  - postman
  - font-fira-code
  - font-fira-code-nerd-font
  - maccy
  - vlc
  - xld
  - audio-hijack
  - keycastr
  - beardedspice
  - chromedriver
  - keepassxc
  - signal
  - whatsapp
  - touchdesigner
  - pgadmin4
  - nordvpn
  - soulseek
  - rekordbox

# See https://github.com/geerlingguy/mac-dev-playbook for below config options.
mas_installed_apps: []
mas_email: ""
mas_password: ""

osx_script: "sudo bash ~/.osx --no-restart"

composer_packages: []

gem_packages: []

npm_packages: []

pip_packages: []

configure_sublime: false

post_provision_tasks: []

The playbook runs successfully but the only tasks that actually take place are homebrew_taps and homebrew_cask_apps.

Do you have any idea why this happens?

@stale
Copy link

stale bot commented Mar 18, 2023

This issue has been marked 'stale' due to lack of recent activity. If there is no further activity, the issue will be closed in another 30 days. Thank you for your contribution!

Please read this blog post to see the reasons why I mark issues as stale.

@stale stale bot added the stale label Mar 18, 2023
@DS-Matt
Copy link

DS-Matt commented Apr 1, 2023

Similar/same issue here. Hopefully someone can respond on this.

@hodgesd
Copy link

hodgesd commented Apr 1, 2023

I had the same question. Is there an active discourse or discord forum on ansible?

@stale
Copy link

stale bot commented Apr 1, 2023

This issue is no longer marked for closure.

@stale stale bot removed the stale label Apr 1, 2023
@DS-Matt
Copy link

DS-Matt commented Apr 1, 2023

It looks like

I am running the playbook with the following custom config:

downloads: ~/.ansible-downloads/

configure_dotfiles: true
configure_terminal: false
configure_osx: true

configure_dock: false
dockitems_remove: []
dockitems_persist: []

configure_sudoers: false
sudoers_custom_config: ""

dotfiles_repo: https://github.com/Joshbarrington/dotfiles.git
dotfiles_repo_accept_hostkey: true
dotfiles_repo_local_destination: ~/github/dotfiles
dotfiles_files:
  - .gitconfig
  - .gitignoreglobal
  - .osx
  - .zshrc
  - .treeignore

homebrew_installed_packages:
  - aws-shell
  - awscli
  - azure-cli
  - asdf
  - bat
  - broot
  - ccls
  - clang-format
  - cmake
  - ctags
  - curl
  - exa
  - fd
  - ffmpeg
  - fswatch
  - fzf
  - fx
  - gh
  - gcc
  - git
  - httpie
  - hub
  - jq
  - mas
  - neovim
  - node
  - openssl
  - ripgrep
  - rename
  - tig
  - tree
  - tmuxinator
  - rustup-init
  - unzip
  - wget
  - zsh
  - zsh-autosuggestions
  - youtube-dl
  - git-lfs
  - pre-commit

homebrew_taps:
  - homebrew/core
  - homebrew/cask-fonts

homebrew_cask_appdir: /Applications
homebrew_cask_apps:
  - docker
  - rectangle
  - firefox
  - google-chrome
  - licecap
  - slack
  - iterm2
  - dash
  - tunnelblick
  - keybase
  - spotify
  - visual-studio-code
  - postman
  - font-fira-code
  - font-fira-code-nerd-font
  - maccy
  - vlc
  - xld
  - audio-hijack
  - keycastr
  - beardedspice
  - chromedriver
  - keepassxc
  - signal
  - whatsapp
  - touchdesigner
  - pgadmin4
  - nordvpn
  - soulseek
  - rekordbox

# See https://github.com/geerlingguy/mac-dev-playbook for below config options.
mas_installed_apps: []
mas_email: ""
mas_password: ""

osx_script: "sudo bash ~/.osx --no-restart"

composer_packages: []

gem_packages: []

npm_packages: []

pip_packages: []

configure_sublime: false

post_provision_tasks: []

The playbook runs successfully but the only tasks that actually take place are homebrew_taps and homebrew_cask_apps.

Do you have any idea why this happens?

I just noticed you don't have any variables defined for the composer, gem, npm, and pip packages, so that might by why the install additional packages doesn't work, but I would expect it to do the dotfiles and osx script setup.

Again, hopefully someone with more experience than me can respond with a solution.

@S-git1
Copy link

S-git1 commented Apr 10, 2023

I am having a similar issue where the .osx script setup does not work. Perhaps it doesn't work for MacOS 13?
Still very new to Ansible. Ran the script and this is what I get:

studioadmin@Mac-Studio mac-dev-playbook-master % ansible-galaxy install -r requirements.yml
Starting galaxy role install process

  • downloading role 'osx-command-line-tools', owned by elliotweiser
  • downloading role from https://github.com/elliotweiser/ansible-osx-command-line-tools/archive/2.3.0.tar.gz
  • extracting elliotweiser.osx-command-line-tools to /Users/studioadmin/Downloads/mac-dev-playbook-master/roles/elliotweiser.osx-command-line-tools
  • elliotweiser.osx-command-line-tools (2.3.0) was installed successfully
  • downloading role 'dotfiles', owned by geerlingguy
  • downloading role from https://github.com/geerlingguy/ansible-role-dotfiles/archive/1.2.1.tar.gz
  • extracting geerlingguy.dotfiles to /Users/studioadmin/Downloads/mac-dev-playbook-master/roles/geerlingguy.dotfiles
  • geerlingguy.dotfiles (1.2.1) was installed successfully
    Starting galaxy collection install process
    Process install dependency map
    Starting collection install process
    Downloading https://galaxy.ansible.com/download/geerlingguy-mac-2.1.1.tar.gz to /Users/studioadmin/.ansible/tmp/ansible-local-7465_98l4fh6/tmp4tgovnsv/geerlingguy-mac-2.1.1-bqvu6tgk
    Downloading https://galaxy.ansible.com/download/community-general-6.5.0.tar.gz to /Users/studioadmin/.ansible/tmp/ansible-local-7465_98l4fh6/tmp4tgovnsv/community-general-6.5.0-obe9irct
    Installing 'geerlingguy.mac:2.1.1' to '/Users/studioadmin/.ansible/collections/ansible_collections/geerlingguy/mac'
    geerlingguy.mac:2.1.1 was installed successfully
    Installing 'community.general:6.5.0' to '/Users/studioadmin/.ansible/collections/ansible_collections/community/general'
    community.general:6.5.0 was installed successfully
    studioadmin@Mac-Studio mac-dev-playbook-master % ansible-playbook main.yml -K --tags "dotfiles"
    BECOME password:

PLAY [Configure host.] *********************************************************

TASK [Gathering Facts] *********************************************************
[WARNING]: Platform darwin on host 127.0.0.1 is using the discovered Python
interpreter at /opt/homebrew/bin/python3.11, but future installation of another
Python interpreter could change the meaning of that path. See
https://docs.ansible.com/ansible-
core/2.14/reference_appendices/interpreter_discovery.html for more information.
ok: [127.0.0.1]

TASK [Include playbook configuration.] *****************************************
skipping: [127.0.0.1]

TASK [geerlingguy.dotfiles : Ensure dotfiles repository is cloned locally.] ****
changed: [127.0.0.1]

TASK [geerlingguy.dotfiles : Ensure all configured dotfiles are links.] ********
ok: [127.0.0.1] => (item=.osx)

TASK [geerlingguy.dotfiles : Remove existing dotfiles file if a replacement is being linked.] ***
ok: [127.0.0.1] => (item=[0, {'changed': False, 'stdout': '', 'stderr': 'ls: /Users/studioadmin/.osx: No such file or directory', 'rc': 1, 'cmd': ['ls', '-F', '~/.osx'], 'start': '2023-04-11 00:13:41.988786', 'end': '2023-04-11 00:13:41.993541', 'delta': '0:00:00.004755', 'failed': False, 'msg': 'non-zero return code', 'invocation': {'module_args': {'_raw_params': 'ls -F ~/.osx', '_uses_shell': False, 'stdin_add_newline': True, 'strip_empty_ends': True, 'argv': None, 'chdir': None, 'executable': None, 'creates': None, 'removes': None, 'stdin': None}}, 'stdout_lines': [], 'stderr_lines': ['ls: /Users/studioadmin/.osx: No such file or directory'], 'failed_when_result': False, 'item': '.osx', 'ansible_loop_var': 'item'}])

TASK [geerlingguy.dotfiles : Link dotfiles into home folder.] ******************
changed: [127.0.0.1] => (item=.osx)

PLAY RECAP *********************************************************************
127.0.0.1 : ok=5 changed=2 unreachable=0 failed=0 skipped=1 rescued=0 ignored=0

studioadmin@Mac-Studio mac-dev-playbook-master %

@DS-Matt
Copy link

DS-Matt commented Apr 10, 2023

I am having a similar issue where the .osx script setup does not work. Perhaps it doesn't work for MacOS 13? Still very new to Ansible. Ran the script and this is what I get:

studioadmin@Mac-Studio mac-dev-playbook-master % ansible-galaxy install -r requirements.yml Starting galaxy role install process

* downloading role 'osx-command-line-tools', owned by elliotweiser

* downloading role from https://github.com/elliotweiser/ansible-osx-command-line-tools/archive/2.3.0.tar.gz

* extracting elliotweiser.osx-command-line-tools to /Users/studioadmin/Downloads/mac-dev-playbook-master/roles/elliotweiser.osx-command-line-tools

* elliotweiser.osx-command-line-tools (2.3.0) was installed successfully

* downloading role 'dotfiles', owned by geerlingguy

* downloading role from https://github.com/geerlingguy/ansible-role-dotfiles/archive/1.2.1.tar.gz

* extracting geerlingguy.dotfiles to /Users/studioadmin/Downloads/mac-dev-playbook-master/roles/geerlingguy.dotfiles

* geerlingguy.dotfiles (1.2.1) was installed successfully
  Starting galaxy collection install process
  Process install dependency map
  Starting collection install process
  Downloading https://galaxy.ansible.com/download/geerlingguy-mac-2.1.1.tar.gz to /Users/studioadmin/.ansible/tmp/ansible-local-7465_98l4fh6/tmp4tgovnsv/geerlingguy-mac-2.1.1-bqvu6tgk
  Downloading https://galaxy.ansible.com/download/community-general-6.5.0.tar.gz to /Users/studioadmin/.ansible/tmp/ansible-local-7465_98l4fh6/tmp4tgovnsv/community-general-6.5.0-obe9irct
  Installing 'geerlingguy.mac:2.1.1' to '/Users/studioadmin/.ansible/collections/ansible_collections/geerlingguy/mac'
  geerlingguy.mac:2.1.1 was installed successfully
  Installing 'community.general:6.5.0' to '/Users/studioadmin/.ansible/collections/ansible_collections/community/general'
  community.general:6.5.0 was installed successfully
  studioadmin@Mac-Studio mac-dev-playbook-master % ansible-playbook main.yml -K --tags "dotfiles"
  BECOME password:

PLAY [Configure host.] *********************************************************

TASK [Gathering Facts] ********************************************************* [WARNING]: Platform darwin on host 127.0.0.1 is using the discovered Python interpreter at /opt/homebrew/bin/python3.11, but future installation of another Python interpreter could change the meaning of that path. See https://docs.ansible.com/ansible- core/2.14/reference_appendices/interpreter_discovery.html for more information. ok: [127.0.0.1]

TASK [Include playbook configuration.] ***************************************** skipping: [127.0.0.1]

TASK [geerlingguy.dotfiles : Ensure dotfiles repository is cloned locally.] **** changed: [127.0.0.1]

TASK [geerlingguy.dotfiles : Ensure all configured dotfiles are links.] ******** ok: [127.0.0.1] => (item=.osx)

TASK [geerlingguy.dotfiles : Remove existing dotfiles file if a replacement is being linked.] *** ok: [127.0.0.1] => (item=[0, {'changed': False, 'stdout': '', 'stderr': 'ls: /Users/studioadmin/.osx: No such file or directory', 'rc': 1, 'cmd': ['ls', '-F', '~/.osx'], 'start': '2023-04-11 00:13:41.988786', 'end': '2023-04-11 00:13:41.993541', 'delta': '0:00:00.004755', 'failed': False, 'msg': 'non-zero return code', 'invocation': {'module_args': {'_raw_params': 'ls -F ~/.osx', '_uses_shell': False, 'stdin_add_newline': True, 'strip_empty_ends': True, 'argv': None, 'chdir': None, 'executable': None, 'creates': None, 'removes': None, 'stdin': None}}, 'stdout_lines': [], 'stderr_lines': ['ls: /Users/studioadmin/.osx: No such file or directory'], 'failed_when_result': False, 'item': '.osx', 'ansible_loop_var': 'item'}])

TASK [geerlingguy.dotfiles : Link dotfiles into home folder.] ****************** changed: [127.0.0.1] => (item=.osx)

PLAY RECAP ********************************************************************* 127.0.0.1 : ok=5 changed=2 unreachable=0 failed=0 skipped=1 rescued=0 ignored=0

studioadmin@Mac-Studio mac-dev-playbook-master %

I don't think that is the case, as I can take the playbook data, copy it into a new tasks file and run it referencing that file and it works just fine on MacOS13. Also, your play gets farther than my playbook does, I get stopped after Homebrew installs casks, you get to Dotfiles...

@S-git1
Copy link

S-git1 commented Apr 11, 2023

Have you tried running:

ansible-playbook main.yml -K --tags "dotfiles"

By itself?

Just to clarify, I have tried running the above and the full command:

ansible-playbook main.yml --ask-become-pass

And they both run without errors on the dotfiles part, but no changes actually occur for .osx settings.

I have tried running both commands above on two different Macs (one with M1 and the other with a M2 chip) with MacOS 13.3.1 so I wanted to check if anyone had success with MacOS 12.

@github-actions
Copy link

This issue has been marked 'stale' due to lack of recent activity. If there is no further activity, the issue will be closed in another 30 days. Thank you for your contribution!

Please read this blog post to see the reasons why I mark issues as stale.

@github-actions github-actions bot added the stale label Aug 10, 2023
@github-actions
Copy link

This issue has been closed due to inactivity. If you feel this is in error, please reopen the issue or file a new issue with the relevant details.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Oct 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants